Write a constructor that initializes these values

Assignment Help Computer Engineering
Reference no: EM131145317

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 { ... } SAMPLE RUN #1: java Driver Interactive Session Standard Input Standard Error (empty) Standard Output Hide Invisibles Highlight: NoneStandard Input OnlyPrompts OnlyStandard Output w/o PromptsFull Standard OutputAllShow Highlighted Only Enter·name·of·customer:Julia·Stevens? Enter·address·of·customer:77·Massachusetts·Ave·Cambridge,·MA·02139? Enter·phone·number·of·customer:617-777-7777? Enter·customer·number:928734502? Enter·yes/no·--·does·the·customer·want·to·recieve·mail?:no? ? Customer:·? Name:·Julia·Stevens? Address:·77·Massachusetts·Ave·Cambridge,·MA·02139? Phone·Number:·617-777-7777? Customer·Number:·928734502? Recieve·

Reference no: EM131145317

Questions Cloud

Describe viable alternatives considered to resolve situation : Describe the viable alternatives you considered to resolve the situation. In this section, you will analyze which solutions/practices might be feasible for your company.
Identify and explain your competitors : Discuss the following: Identify the small business and the type of product that will be introduced internationally. Choose a country you will first introduce the product
Regarding the indirect pattern of organization : Regarding the indirect pattern of organization, is it manipulative to delay the presentation of the main idea in a message? Share an experience when you have had to indirectly present information, whether good new or bad news.
What was the net cash used by investing activities : What was the amount of net cash provided by operating activities for 2007? For 2006? What were some causes of any significant changes in cash from operations between 2006 and 2007?
Write a constructor that initializes these values : Design a class named Person with fields for holding a persons name - 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 cla..
Ethnicity and place of residence-of your target customer : Creative Homework/Short Project You are an entrepreneur who is designing a new line of boutique hotels located along Florida's coastlines. Each of the 75 guest rooms in each hotel will offer upscale decor, Wi-Fi, and iPod docks for a nightly rate of ..
Limitations and risks for the wireless technologies : How are wireless technologies used by organizations to form a communication channel with clients? Summarize the advantages and disadvantages, limitations and risks for the wireless technologies described in the article
Job analysis for teams : Write the answers of the question given below related to the topic "Job Analysis for Teams" Which of the following could harm an organization's legal defense in an EEO/AA case
Discuss the impact that you believe social networking : Discuss the impact that you believe social networking has on society .original post should be at least one developed and detailed paragraph in length

Reviews

Write a Review

Computer Engineering Questions & Answers

  Oracle provides erp solutions for mid-size business

oracle provides erp solutions for mid-size business organizations. for this assignment you are to write a research

  What do you mean by an entity

How is it possible to get more information from the equal amount of data though using a database approach as opposed to a file approach.

  Aspects of effectiveness and robustness in software

Aspects of effectiveness and robustness in software

  1 consider the following code fragment for the mips five

1. consider the following code fragment for the mips five stage pipelined processorinstruction1 add 1 8 3 1 8

  1 functional dependenciesconsider a relation r

1. functional dependenciesconsider a relation r abcdefghjnbspwith the following functional dependenciesab --gt cdh --gt

  What ordering results in an optimal tree

Inserting the values in different orders results in different shapes of trees. What ordering results in an optimal (complete) tree? Show the resulting tree.

  Questionyou have been assigned task of computing the sum of

questionyou have been assigned task of computing the sum of 1000 four-digit numbers as rapidly as possible. you hold in

  Make an application named numbers

make an application named Numbers. The Numbers class should have non-static public methods named sum and difference, each taking a pair of int variables as arguments.

  Customers of an on-line electronics

Customers of an on-line electronics store spend an average of $120 with a standard deviation of $80 and are also charged a shipping & handling fee of $5 per purchase. What is the chance that the next 100 customers will pay an average of more than ..

  Core memory consists of the cpu and arithmetic logic

Core memory consists of the CPU and arithmetic logic unit but not the attached cache memory - Does the implementation of cache memory on multi-core chips vary from one manufacturer to another? Explain and cite your sources

  Characterize the company''s personnel as its human asset

Why do we characterize the company's personnel as its human asset? Explain and exemplify.

  Data set contains a total of n numbers

A data set has a median of 43, and four of the numbers in the data set are less than median. The data set contains a total of n numbers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd