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

  Describe the significance of diagramming tools for process

discuss the importance of diagramming tools for process modeling. without such tools what would analysts do to model

  Would you usually recommend a clean install or an in-place

what upgrade options exist for moving from server 2008 r2 to server 2012? what limitations or caveats should be

  Questionwrite down program that computes the cost of a long

questionwrite down program that computes the cost of a long distance call. the cost of call is determined according to

  Explain examples of type of knowledge industry

Explain examples of type of knowledge industry

  Direct and indirect measures in software process management

Introduction to Software Metrics in Software Engineering - role of direct and indirect measures in software process management

  Questionwrite down an interactive program that prompts user

questionwrite down an interactive program that prompts user for three real numbers and finds the sum average smallest

  Proceed according to the following instructionsidentify a

proceed according to the following instructions.identify a recent within the last six 6 months moral dilemma or

  Design appropriate it infrastructures to manage data

In the unlikely event of any discrepancy between the Academic Regulations and any other publication, including this module guide, the Academic Regulations, as the definitive document, take precedence over all other publications and will be applied..

  Make c program that accepts as input from the keyboard

make C program that accepts as input from the keyboard. Each of these inputs should be preceded by a prompt and stored using individual variable names.

  How to generate paper for pair of public or private rsa key

How to generate paper for a pair of public or private RSA keys? The high-class reporter for foreign affairs learned about asymmetric cryptography, and proposed to security team at the paper to generate for a pair of public or private RSA keys.

  Chomsky normal form

Requesting assistance with the Theory of Computing.Construct a PDA that accepts L.

  While assisting the coding manager in preparing for the

write 400-600 words that respond to the following questions with your thoughts ideas and comments. this will be the

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