Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

vtrying to figure out what im missing the python file wont run correctly. its is a two part program two files file 1 import customer

vtrying to figure out what im missing the python file wont run correctly. its is a two part program two files file 1 import customer
def main O : # Intro message intro O # Create four instances of Customers. customer1= customer.StoreCustomer('Frank
',5,24.87) customer2= customer.StoreCustomer('Lois',28,137.35) customer3= customer.StoreCustomer('Jessica
',85.11,14) customer4= customer.StoreCustomer('Tom',12,54.92) # Display information. print ('Customer #1: ') print (
customer1) printO print ('Customer #2:') print (customer2) printO print ('Customer #3:') print (customer3) printO print ('
Customer #4:') print (customer4) def intro (): print('This program will demonstrate the use of classes to create a Customer')
print('object to save information.') # Call the main function. mainO file 2 which is called customer class StoreCustomer: def _-
init_(self, name, items_bought, total): self._name = name self._items_bought = items_bought self.
name(self, name): self._name = name def set_items_bought(self, items_bought): self._items_bought = items_bought def
set_total(self, total): self._total = total def get_name(self): return self.__name def get_items_bought(self): return self.
bought def get_total(self): return self.(self): return 'Customer Name:'+ self._name +''+ 'Number of
Items: '+ self._items_bought +?? 'Total Cost: $ '+ self._total should print out something like this for each customer Customer
#1: Customer Name: Frank Number of Items: 5 Total Cost: $24.87
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions