Question: 8. Define a customer class with properties: customerID, customerName, City, Rating, LastOrderSubmitDate where City has values such as San Francisco, Los Angeles, New York,,

8. Define a customer class with properties: customerID, customerName, City, Rating, LastOrderSubmitDate 

8. Define a customer class with properties: customerID, customerName, City, Rating, LastOrderSubmitDate where City has values such as San Francisco, Los Angeles, New York,, etc., Rating has three possible values A, B, or C, and the LastOrderSubmitDate stores the last time the customer submitted an order in this format: yyyy-mm-dd. This class has one method: DaysSinceLastOrder. This method returns the days from a the customer's last order submit date to current date. customerll) C101 C106 a. Write a Python program to define the customer class. b. A CSV file named customer.cs custoomerName City San Francisco New York Los Angeles C103 Peter Paul Mary er.csv is already created with customer data as follow: Rating A B A LastOrder SubmitDate 2019-08-20 2021-03-15 2020-05-15 Write a Python program to read the customer.csv file, and create a list of customer objects where each customer object is initialized with data retrieved from the csv file.

Step by Step Solution

3.41 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres the Python program import csv from datetime import date creating customer class class Customer ... View full answer

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 Accounting Questions!