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, 22.06.2019 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories is this true or false?
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
To become an audio technician, the most successful tactics might include the following. (select all that apply). learning how to persuade other people gaining different types of experience in audio technology learning as much as possible about art history establishing a reputation as a reliable professional
Answers: 1
You know the right answer?
Design a class named Person with fields for holding a person's name, address, and telephone number (...
Questions
question
Mathematics, 28.11.2020 19:40
question
Computers and Technology, 28.11.2020 19:40
question
Mathematics, 28.11.2020 19:40
question
Mathematics, 28.11.2020 19:40
question
Mathematics, 28.11.2020 19:40
question
Mathematics, 28.11.2020 19:40
question
Social Studies, 28.11.2020 19:40
question
English, 28.11.2020 19:40
question
Social Studies, 28.11.2020 19:40
question
Mathematics, 28.11.2020 19:40
question
Mathematics, 28.11.2020 19:40
Questions on the website: 13722367