Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class called Person with the following attributes lastName (string), firstName (string), adress (string). city (stringl state (strinel, sip tstring), and phone (string) initialize

image text in transcribed
Create a class called Person with the following attributes lastName (string), firstName (string), adress (string). city (stringl state (strinel, sip tstring), and phone (string) initialize all values to "xxxxxx, in a constructor Create a class called Customer, which is derived from the Person class. The Customer class has the following attributes customerNumber (integer), mailingtist (boolean), comments (string) initialize to zero, false and 'xxxox respectively retail store has a preferred customer plan where customers may earn discounts on all their purchases The amount of a customer's discount is determined by the amount of the cumulative purchases in the store * Spend >S500-5% discount on future purchases -Spend-S1000-6% discount on future purchases Spend-51500-7% discount on future purchases Spend >S2000-10% discount on future purchases * * Create a class called PreferredCustomer which is derived from the Customer class. The PreferredCustomer class has the following attributes purchasesAmount (double), discountlevel (integer, unit is percent) default both to zero unless a parameter to initialize purchasesAmount is passed when creating the instance read and display data in each class of the UMI diagram. In your main: Print data means print out ALL data fields in the entire inheiritance path, label the output data Create an instance of PreferredCustomer of Nabeel lgottaquestion (4901 Evergreen, Dearborn MI 48126, 313-436- 9145, cust number 1, mailing true, comment class questioner, default purchases) Print Nabeel data, update purchases to $1011 and print data. Create an instance of PreferredCustomer of Ben Symboltable (12903 Ehab, Dearborn MI 48126, 313-436-9145, cust number 2, mailing- false, comment- address generator, purchases $2010) Print Ben data Create an instance of Customer of Caleb Kool (1313 Mariah Blvd, Dearborn Heights MI 48127,313-836-9168, cust number 3, mailing false, comment class answerer) Print Caleb data Create an instance of Person of Arthur Aplus (903 Brehm Ave, Asfia MI 48168, 313-486 9935) Print Arthur data Note -spaces replaced with underscores in string input to read as single string

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

Evaluating Group Performance?

Answered: 1 week ago