Programming Projects
Programming Projects require more problem-solving than Practice Programs and can usually be solved many different ways. Visit www.myprogramminglab.com to complete many of these Programming Projects online and get instant feedback.
Write a program that creates
Pet
objects from data read from the keyboard. Store these objects into an instance ofArrayList
. Then sort thePet
objects into alphabetic order by pet name, and finally display the data in the sortedPet
objects on the screen. The classPet
is given in Chapter 6, Listing 6.1.Repeat the previous programming project, but sort the
Pet
objects by pet weight instead of by name. After displaying the sorted data on the screen, write the number and percentage of pets that ...
Get Java: An Introduction to Problem Solving and Programming, 8th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.