Computers and Technology

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 recieve 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. instead, simply write: class person { } class customer { }

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:20, Hcalhoun21
Write a pseudocode solution for each of these problems. 1. design a while loop that lets that user enter a number. the number should be multiplied by 10, and the result stored in a variable named product. the loop should iterate as long as product contains a value less than 100. 2. design a do-while loop that asks the user to enter two numbers. the numbers should be added and the sum displayed. the loop should ask the user whether he or she wishes to perform the operation again. if so, the loop should repeat; otherwise it should terminate. 3. design a for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 100. 4. design a nested loop that displays 10 rows of # characters. there should be 15 # characters in each row. 5. convert this for loop to a while loop. declare integer count for count = 1 to 50 display count end for 6. find the error in the following pseudocode. declare boolean finished = false declare integer value, cube while not finished display β€œenter a value to be cubed.” input value; set cube = value ^ 3 display value, β€œ cubed is β€œ, cube end while
Answers: 2
image
Computers and Technology, 22.06.2019 15:30, gudon986732
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, bowmanari2154
What is used to analyze and summarize your data without graphical support
Answers: 1
image
Computers and Technology, 23.06.2019 19:50, Aprillove7939
Which feature is selected to practice and save the timing of a presentation
Answers: 1
Do you know the correct answer?
Design a class named person with fields for holding a person's name, address, and telephone number (...

Questions in other subjects:

Konu
Mathematics, 23.04.2020 20:27
Konu
Mathematics, 23.04.2020 20:27