Arrays and the ArrayList Class pls include comments *Phone Book Arraylist 1,Writ
ID: 3546299 • Letter: A
Question
Arrays and the ArrayList Class
pls include comments
*Phone Book Arraylist
1,Write a class named phoneBookEntry that has fields for a person's name and phone number.The class should have a constructor and appropriate accessor and mutator methods. Then write a program that creats at least five PhoneBookEntry objects and stores them in an ArrayList. Use a loop to display the contents of each object in the ArrayList.
*Rainfall Class
2, write a RainFall class that stores the total rainfall for each of 12 months into an array of doubles. The program should have methods that return the following :
* the total rainfall for the year
* the average monthly rainfall
* the month with the most rain
* the month with the least rain
Demonstrate the class in a complete program.
Input Validation: Do not accept negative numbers for the monthly rainfall figures.
Explanation / Answer
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere. Java is not enabled in the web browser. If Java is already installed but applets do not work, you may need to enable Java through your web browser.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.