Write a Python Program Write a class called Customer that has the following private attributes for...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Python Program Write a class called Customer that has the following private attributes for the following data: • CustomerNumber, • FirstName, •LastName • City, • Eircode, • PhoneNumber. The Customer class's__init___ method should accept an argument for each attribute. The Customer class should also have accessor and mutator methods for each attribute. Next write a class called Orders that represents an order of a customer. The order should have private attributes for the following data: • OrderNumber • Dateof order • Productnameoftheorder • Quantityordered • Totalprice The order class's__init__method should accept an argument for each attribute. The order class should also have accessor and mutator methods for each attribute. Next write a program that creates an instance of the Customer class, initiliazed with sample data (use any customer data). Then, create 3 instances of the order class initializing with the following data: Order number: 1 Date of order: 12/2/2023 Product Name: Piano Quantity: 1 Charge: 3200 Order number: 2 Date of order: 1/1/2021 Product Name: Covid Test Kit Quantity: 1000 Charge: 333 Order number: 3 Date of order: 1/1/2020 Product Name: Books Quantity: 10 Charge: 500 4T he program should display the Customer's information, information about all 3 of the orders, and the total charges of the 3 orders. Write a Python Program Write a class called Customer that has the following private attributes for the following data: • CustomerNumber, • FirstName, •LastName • City, • Eircode, • PhoneNumber. The Customer class's__init___ method should accept an argument for each attribute. The Customer class should also have accessor and mutator methods for each attribute. Next write a class called Orders that represents an order of a customer. The order should have private attributes for the following data: • OrderNumber • Dateof order • Productnameoftheorder • Quantityordered • Totalprice The order class's__init__method should accept an argument for each attribute. The order class should also have accessor and mutator methods for each attribute. Next write a program that creates an instance of the Customer class, initiliazed with sample data (use any customer data). Then, create 3 instances of the order class initializing with the following data: Order number: 1 Date of order: 12/2/2023 Product Name: Piano Quantity: 1 Charge: 3200 Order number: 2 Date of order: 1/1/2021 Product Name: Covid Test Kit Quantity: 1000 Charge: 333 Order number: 3 Date of order: 1/1/2020 Product Name: Books Quantity: 10 Charge: 500 4T he program should display the Customer's information, information about all 3 of the orders, and the total charges of the 3 orders.
Expert Answer:
Answer rating: 100% (QA)
Python code class Customer def initself customernumber firstname lastname city eircode phonenumber selfcustomernumber customernumber selffirstname fir... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
How can performance management strategies be tailored to accommodate diverse workforce demographics and individual needs ?
-
In Java Write a class named Patient that has fields for the following data: First name, middle name, and last name Street address, city, state, and ZIP code Phone number Name and phone number of...
-
Solution Description: For this assignment, create files with the following names: Superhero.java ChargedSuperhero.java FlyingSuperhero.java Creating a Superhero 1.Create a class called Superhero that...
-
PacTec Luggage Shop is a small retail establishment located in a large shopping mall. This shop has implemented the following procedures regarding inventory items: a. Since the display area of the...
-
Give IUPAC names for the following compounds: (a) (b) (c) CH CHCHCH2CH CH2CH2CH3 H-CH2CHCH20H (d) (e) Ph. (f) Br NEC-
-
Given the known values of sin t at t = 0, 30, 45, 60, find the following approximations: (a) The least squares linear polynomial, (b) The least squares quadratic polynomial, (c) The quadratic Taylor...
-
Given that charge separation increases the electric potential energy of a system, what can you conclude about the criteria for keeping a system of positively and negatively charged particles in...
-
Chamlee Industries Inc. manufactures recreational vehicles. Chamlee Industries uses a job order cost system. The time tickets from May jobs are summarized below. Job 5-100 ...... $6,400 Job 5-101...
-
16. Let a1, a2, 17. a <0 is: (a) 22 be in H.P. with a = 5 and a20 = 25. The least positive integer n for which " (b) 23 Sum of the series rlog. r=1 (c) 24 (d) 25 r+1 + is: r
-
A small backpack manufacturer carries four different models of backpacks, made of canvas, plastic, nylon, and leather. The bookstore, which will exclusively sell the backpacks, expects to be able to...
-
Determine the amount of ethanol present in 575 g of an aqueous solution that is 3.2% by mass in ethanol. How many grams of water should be added 39.8 g of calcium chloride to obtain a solution with a...
-
Write notes on the following: a. Hands-on testing b. Files library c. Auditing around the computer d. Utility software
-
Describe the provisions of the Companies Act relating to the audit of government companies.
-
What is audit manual?
-
State the primary purpose of generalised audit software.
-
Why are auditors generally required to express an opinion on the truth and fairness of the accounts and why they are not required to certify the accounts?
-
Question 1 0.5 pts What is the entropy of the target variable: type of chocolate? There are a total of 60 chocolates in the box: 20 milk chocolates, 10 black chocolates, and 30 almond chocolates....
-
Name some of the various types of financial intermediaries described in the chapter and indicate the primary reason(s) each was created.
-
Write an SQL statement to display the PetID, breed, and type for all pets having a four-character name starting with K . PET_OWNER ( OwnerID , OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail)...
-
What are the three sources of data for BI systems?
-
Explain the differences between a personal database system and an enterprise-class database system.
-
Prove that the product of two symmetric matrices is not necessarily symmetric.
-
a. Find the rank of the given matrix. b. Confirm the result of (a) in MATLAB. 3 5 ST TNT 2 A=1 7
-
BAw Perform the indicated operations, if defined, for the following vectors and matrices. -2 1 -3 1 1 A = 1 -3 2 1 32 B = V= W = 0 0 4 5
Study smarter with the SolutionInn App