1. Engineering
  2. Computer Science
  3. write a class called user that contains instance data that...

Question: write a class called user that contains instance data that...

Question details

Write a class called User that contains instance data that represents first name, last name, zip code, street address, city and state. Define the User constructor with six parameters for each instance data. Include getter methods for all of instance data. We do not need setter methods for this program since the other classes should not be allowed to modify values of instance data. Define a toString) method that returns information about a user in the format shown in the sample output. Name this file User.java Create a driver class called ContactList. The main method of this class should read data from contact.txt file. The file is structured similar to what is shown in the sample run. Then,it should store the data in an ArrayList object. Finally, the main method should display the data about users and the number of users. Name this file ContactList.java Sample Run Input File: Kent Brockman 123 Aspen Road: Philadelphia PA: 12345; Charles Burns: 249 Birch Street Newark NJ 24923; Martin: Prince 25 Kent Avenue: Indianapolis IN: 02532 Output: Kent Brockman 123 Aspen Road Philadelphia, PA 12345 Charles Burns 249 Birch Street Newark, NJ 24923 Martin Prince 25 Kent Avenue Indianapolis, IN 2532 Total:3

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution