Question: Console ` ` ` Customer Viewer Enter the customer ID to view the customer address Enter customer ID: 1 0 3 Art Venere 8 W

Console
```
Customer Viewer
Enter the customer ID to view the customer address
Enter customer ID: 103
Art Venere
8 W Cerritos Ave #54
Bridgeport, NJ 08014
Continue? (y/n):Y
Enter customer ID: 104
Lenna Paprocki
Feltz Printing
639 Main St
Anchorage, AK 99501
Continue? ( Y/n): Y
Enter customer ID: 99
No customer with that ID.
Continue? (y/n): n
Bye!
```
Specifications
- Use the CSV file named customers.csv that contains customer data.
- Create a Customer class, in its own python file named customer_class.py, to create objects that will store customer data. This class must include eight attributes: id, firstName, lastName, company, address, city, state, zip. The constructor will have parameters used to set the attributes. This must be the only way to set attributes.
- In addition, the Customer class will include a property or method that returns the full address as a string. This address should have three lines if the company attribute is empty or four lines if the company attribute is not empty. See the examples in the sample output.
- The user interface module will have a main function and will need to import the Customer class.
- In the module with the main function, create a function that reads the customer data from the CSV file, creates a list of Customer objects, and returns the list. A loop will read each row for the file, create a customer object, and append the object to a list before returning the list. This function will not take any parameters.
- Be sure to skip the first row of data in the file that has the header text for the file ("cust_id", "first_name", "last_name", "company_name", "address", "city", "state", "zip"). Remember that each row in the CSV reader is a list with one element for each of the 8 pieces of data.
- To find the customer with the specified ID, loop through each Customer object in the list of Customer objects and check whether the ID inputted from the user matches the ID stored in the Customer object.
- If the specified ID matches the ID in a Customer object print the address with the objects address method and exit the loop. If the specified ID isn't found, display an appropriate message.
Console ` ` ` Customer Viewer Enter the customer

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