Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Description: Create an object-oriented program that allows you to enter data for

ID: 3917839 • Letter: D

Question

Description:

Create an object-oriented program that allows you to enter data for customers and employees in python

Console:

Customer/Employee Data Entry

Customer or Employee? (c/e): c

DATA ENTRY
First Name: Frank
Last Name: Wilson
Email Address: frank44
Customer Number (10,000 - 99,999): 9000
Invalid Input. Please try again.
Customer Number: 10293
Country: USA

CUSTOMER INFORMATION
Wilson, Frank, frank44, N10293, USA

Continue? (y/n): y

Customer or Employee? (c/e): e

DATA ENTRY
First Name: John
Last Name: Atkins
Email Address: john@convergentlaser.com
Salary ($20,000 - $100,000): 18000
Invalid Input. Please try again.
Salary ($20,000 - $100,000): 25000
Department: Production

EMPLOYEE INFORMATION
Atkins, John, john@convergentlaser.com, $25000.00, Production

Continue? (y/n): n

Bye!

Specifications:

Create a Person class that provides private attributes for the first name, last name, and email address. This class should provide methods that set and return the person’s first name, last name, and email address.

Create a Customer class that inherits the Person class. This class should add private attributes for the customer number and country. This class should also provide necessary set and get methods. The customer number should be between 10,000 and 99,999.

Create an Employee class that inherits the Person class. This class should add private attributes for the salary and department. This class should also provide necessary set and get methods. The salary should be between $20,000 and $100,000.

In the main function, the program should create a Customer or Employee object from the data entered by the user and it should use this object to display the data on the console.

Explanation / Answer

Customer/Employee Data Entry
Customer or Employee? (c/e): c
DATA ENTRY
First Name: steve
Last Name: mark
Email Addressabc@yahoo.com
Customer Number(10,000 - 99,999)10000
countryUSA
steve mark abc@yahoo.com 10000 USA
Continue? (y/n): y
Customer/Employee Data Entry
Customer or Employee? (c/e): e
DATA ENTRY
First Name: border
Last Name: Allan
Email Addressallan#yahoo
salary(20,000 - 100,000)1000
Invalid Input. Please try again.
salary(20,000 - 100,000)25000
departmentyashin
border Allan allan#yahoo 25000 yashin
Continue? (y/n): n