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):

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 persons 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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!