subject

Design a class named Person with fields for holding a person's name, address, and telephone number (all as Strings). Write a constructor that initializes all of these values, and mutator and accessor methods for every field. Next, design a class named Customer, which inherits from the Person class. The Customer class should have a String field for the customer number and a boolean field indicating whether the customer wishes to be on a mailing list. Write a constructor that initializes these values and the appropriate mutator and accessor methods for the class's fields. Demonstrate the Customer class in a program that prompts the user to enter values for the customer's name, address, phone number, and customer number, and then asks the user whether or not the customer wants to receive mail. Use this information to create a customer object and then print its information. Put all of your classes in the same file. To do this, do not declare them public.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
You know the right answer?
Design a class named Person with fields for holding a person's name, address, and telephone number (...
Questions
question
Spanish, 07.12.2020 23:30
question
Mathematics, 07.12.2020 23:30
question
Social Studies, 07.12.2020 23:30
question
Chemistry, 07.12.2020 23:30
Questions on the website: 13722359