Starting from:

$35

CSE212-New Customer Class Solved

Below, you can find the description of your lab work for today, which also contains the expected output of this lab work in the Application Walkthrough section.

As a follow up to your last week's lab work, this week you are just going to create a simple application that would create a new customer and display its information on the screen.

Your application’s menu loop should contain the following items:

(1)  Create a new customer.

(2)  Create a new customer with an ID.

(3)  Display all customers.

(0) Exit.

You are required to create a “Customer” class that has two ways of initialization - one without implicit ID request and one with implicit ID request. Accordingly, the Customer class should have two constructors, one that initiates the class by requesting an ID from the user, and another one which does not request ID but sets by using the auto increment functionality.

The application should come up with a menu where the user selects either 1, 2, 3, or 0. If the option ‘1’ is selected, the program will ask for the customer details. If option ‘2’ is selected, the program should ask for the customer details and “ID”. If option ‘3’ is selected, the program should display information about all the customers. And finally, if option ‘0’ is entered, the application should exit the program loop and terminate.

You can use basic C-style arrays to store member information.

Application Walkthrough

(1)  Create a new customer.

(2)  Create a new customer with an ID.

(3)  Display all customers.

(0)  Exit.

1

Enter name: Anakin Skywalker

Enter age:

22

(1)  Create a new customer.

(2)  Create a new customer with an ID.

(3)  Display all customers.

(0)  Exit.

2

Enter id:

5

Enter name: Obi-Wan Kenobi

Enter age:

47

(1)  Create a new customer.

(2)  Create a new customer with an ID.

(3)  Display all customers.

(0)  Exit.

3

ID : 1

Name: Anakin Skywalker

Age: 22

ID: 5

Name:Obi-Wan Kenobi

Age: 47

(1)  Create a new customer(2) Display customer information

(0) Exit.

0

More products