Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python Design a Customer class to handle a customer loyalty marketing campaign. After accumulating $100 in purchases, the customer receives a $10 discount on

Using Python image text in transcribed

Design a Customer class to handle a customer loyalty marketing campaign. After accumulating $100 in purchases, the customer receives a $10 discount on the next purchase. Provide methods: def makePurchase(self, amout) def discountReached (self) Provides a test program and test a scenario whether two individual customers receive the discount or not. If received the discount, return "True"; otherwise return False" Assuming a customer spent $50 and another one spent $120. Ensure to leverage your methods to test. Submit two files: 1: Customer class; 2: test file Example output: Bob spent $50, would he get the discount? False Amy spent $ 120, would she get the discount? True

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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