General information/requirements/grading rules

This HW will take a look at your information on Object Oriented Programming utilizing Lessons and Inheritance
Use significant names for lessons, objects, attributes and strategies
If there are two phrases within the variable use first phrase lowercase and first letter of second phrase higher case i.e., firstName, or underscore between the 2 phrases i.e first_name
Embrace acceptable feedback within the code
Output ought to be displayed precisely as talked about towards every downside
Indent the traces of code appropriately
Q1: Worker.py : (50 factors)

Write a category named Worker that holds the next knowledge about an worker with attributes: title, ID quantity, division and job title.

After you have written a category, write a program that creates three Worker objects to carry the next knowledge:

Identify

ID Quantity

Division

Job Title

Susan Meyers

47899

Accounting

Vice President

Mark Jones

39119

IT

Programmer

Pleasure Rogers

81774

Manufacturing

Engineer

This system ought to retailer this knowledge within the three objects, then show the information for every worker on the display screen.

Instance OUTPUT:

Worker 1:
Identify: Susan Meyers
ID quantity: 47899
Division: Accounting
Title: Vice President

Worker 2:
Identify: Mark Jones
ID quantity: 39119
Division: IT
Title: Programmer

Worker three:
Identify: Pleasure Rogers
ID quantity: 81774
Division: Manufacturing
Title: Engineer

Q2: Buyer.py : (50 factors)

Write a category named Individual with knowledge attributes for an individual’s title, tackle, and phone quantity. Subsequent, write one other class named Buyer that may be a subclass of the Individual class. The Buyer class ought to have a knowledge attribute for a buyer quantity, and a Boolean knowledge attribute indicating whether or not the client needs to be on a mailing checklist. Show an occasion of the Buyer class in a easy program.

Pattern output:

Enter the title: john
Enter the tackle: 239 lovers lane
Enter the phone_number: 817-907-5367
Enter the client quantity: 0011
Does the client want to be on the mailing checklist?(Sure/No) Sure

Buyer data:
Identify: john
Tackle: 239 lovers lane
Telephone quantity: 817-907-5367
Buyer Quantity: 0011
On Mailing Checklist: True

——

General tips/necessities/grading standards

This HW will put your understanding of Object Oriented Programming with Lessons and Inheritance to the take a look at.

For lessons, objects, properties, and strategies, use smart names.

If there are two phrases within the variable, use lowercase first phrase and uppercase preliminary letter of second phrase, i.e., firstName, or underscore between the 2 phrases. e.g., first title

Embrace acceptable feedback within the code

Output ought to be displayed precisely as talked about towards every downside

Indent the traces of code appropriately

Q1: Worker.py : (50 factors)

Write a category named Worker that holds the next knowledge about an worker with attributes: title, ID quantity, division and job title.

After you have written a category, write a program that creates three Worker objects to carry the next knowledge:

Identify

ID

Published by
Write
View all posts