week 2:
This is java programming principles of software design week 2 quiz answers. you will not need any other answers to solve this java programing questions.
1.For an assignment you wro te the method sortByLargestDepth in the class QuakeSortInPlace to sort earthquakes by their depth from largest depth to smallest depth using the selection sort algorithm. Modify this method to do exactly 70 passes and then modify testSort to run this method on the file earthQuakeDataDec6sample2.atom. The file may not be completely sorted as there are many quakes in the file.
After running your program of 70 selection sort passes on this file, what is the depth of the last earthquake in the ArrayList?
Note: This question has variations. If you attempt this quiz multiple times, make sure you are using the correct number of sort passes!
the answer is here:
2.For an assignment you wrote the method sortByMagnitudeWithCheck in the class QuakeSortInPlace to sort earthquakes by their magnitude from smallest to largest using the selection sort algorithm, and stopping with passes once the ArrayList is sorted. Modify testSort to run this method on the file earthQuakeDataWeekDec6sample1.atom.
How many passes are needed to sort this file?
Note: This question has variations. If you attempt this quiz multiple times, make sure you are using the correct data file!
the answer is here:
3.For an assignment you wrote the method sortByMagnitudeWithBubbleSortWithCheck in the class QuakeSortInPlace to sort earthquakes by their magnitude from smallest to largest using the bubble sort algorithm, and stopping with passes once the ArrayList is sorted. Modify testSort to run this method on the file earthQuakeDataWeekDec6sample2.atom. Make sure you are using the updated (1/12/16) version of the EarthQuakeParser class.
How many passes are needed to sort this file?
Note: This question has variations. If you attempt this quiz multiple times, make sure you are using the correct data file!
the answer is here:
4.Consider an ArrayList of following six integers.
2 4 5 9 8 1
What does this ArrayList look like after two passes of selection sort that sorts the elements in numeric order from smallest to largest?
the answer is here:
5.Consider an ArrayList of following six integers.
4 2 5 9 8 1
What does this ArrayList look like after two passes of bubble sort that sorts the elements in numeric order from smallest to largest?
the answer is here:
6.For an assignment, you modified the compareTo operator in the class QuakeEntry to sort earthquakes by their magnitude first, from smallest magnitude to largest magnitude, and to break ties by their depth, from largest depth to smallest depth. Then you wrote the method sortWithCompareTo in the DifferentSorters class using the Collections.sort method. Modify this method to print out the QuakeEntry in position 600 after sorting the QuakeEntry’s by the above method. Run this method on the file earthQuakeDataWeekDec6sample1.atom.
What is the depth of the earthquake that is in position 600 after the earthquakes are sorted by the above method?
Note: This question has variations. If you attempt this quiz multiple times, make sure you are using the correct data file!
the answer is here:
7.For an assignment, you wrote the TitleAndDepthComparator to sort earthquakes by their title first, in alphabetical order, and to break ties by their depth, from smallest depth to largest depth. You then used the Collections.sort method with the TitleAndDepthComparator. Modify the sortByTitleAndDepth method in the DifferentSorters class to print out the QuakeEntry in position 500 after sorting the QuakeEntry’s by the above method. Run this method on the file earthQuakeDataWeekDec6sample2.atom.
What is the depth of the earthquake that is in position 500 after the earthquakes are sorted by the above method?
Note: This question has variations. If you attempt this quiz multiple times, make sure you are using the correct data file!
the answer is here:
8.For an assignment, you wrote the TitleLastAndMagnitudeComparator to sort earthquakes by the last word in their title first, in alphabetical order, and to break ties by their magnitude, from smallest to largest. You then used the Collections.sort method with the TitleLastAndMagnitudeComparator. Modify the sortByLastWordInTitleThenByMagnitude method in the DifferentSorters class to print out the QuakeEntry in position 500 after sorting the QuakeEntry’s by the above method. Run this method on the file earthQuakeDataWeekDec6sample2.atom.
What is the depth of the earthquake that is in position 500 after the earthquakes are sorted by the above method?
the answer is here:
You need to know about this java programming course that make you good in learning how to design a system.
introduction...
About this Course
Solve real world problems with Java using multiple classes. Learn how to create programming solutions that scale using Java interfaces. Recognize that software engineering is more than writing code - it also involves logical thinking and design. By the end of this course you will have written a program that analyzes and sorts earthquake data, and developed a predictive text generator.
After completing this course, you will be able to:
java programing principles of software design learn you to get your programming skills by solving some quiz by week.
1. Use sorting appropriately in solving problems. 2. Develop classes that implement the Comparable interface. 3. Use timing data to analyze empirical performance. 4. Break problems into multiple classes, each with their own methods. 5. Determine if a class from the Java API can be used in solving a particular problem.
this course show you skills you need to solve any problem in programing language with some algorithms.
6. Implement programming solutions using multiple approaches and recognize tradeoffs.
7. Use object-oriented concepts including interfaces and abstract classes when developing programs.
8. Appropriately hide implementation decisions so they are not visible in public methods; and
9. Recognize the limitations of algorithms and Java programs in solving problems.
10. Recognize standard Java classes and idioms including exception-handling, static methods, java.net, and java.io packages.
some task you will learn to solve anther time graph needed to wright with coding. anther courses help you explore high level tools to make development and help any web site developed by adding new features. and computer science is very enjoyable capturing various information, it's like university to you help you practice getting natural job. you can look or search about java programing, and you can choose to start today or not developing android, but you have to make correct decision and discover projects (written specialization, designed content).
cited for generate and engine building collaborative machine, using software programming techniques.
some reviews:
-My confidence level in Java programming has grown significantly since completing this specialization, It gave me the necessary knowledge and practice I need to take up a role as a software engineer.
-I was more difficult than the previous three courses in the specialization, but all in all, I enjoyed it very much and learned a lot! Thanks for such a great course, keep up the good work! :)
-Well designed and well structured with the packages, resources, programming exercises and practice quiz. I appreciate the team's hard work in delivering good knowledge on the subject efficiently.
-These set of four made not only learning Java fun and also explored on the applications software engineering it has on the real world, touching a little bit of everything in the same field.
so for sure java programing principles of software design course is the best course to get to do some developments in your programming skills.
Post a Comment
Leave a message