In you will be focusing on allowing multiple of the

In you will be focusing on allowing multiple of the four transactions listed. You will also be authenticating the user’s credentials (username and password) at least once. The customer’s account details are as follows:

CustomerUsernamePasswordAccount #Member LevelStore CreditAddressJane Smithjsmithblue123123456789Gold3000.00100 W New Haven Ave, Melbourne, FL 32901Ellen Sue Doeedoepink234234567890Blue650.00235 South Street, Bronx, NY, 21110Michael Blackmblackbrown124235765437None324.0056 N Pathway Rd, Phoenix, AZ, 56565John Carterjcartergreen289987654251Diamond9000.001060 W Addison St, Chicago, IL 60613

Product information is as follows:

SKUNameItems in unitPrice per unitQuantity on HandHF-342½ in Bolt5020.00200LK-322¼ in Nail255.7576KF-231Hammer115.23100

The information above is found in the attached file, accounts.dat and products.csv respectively. You must read the information from these files to be able to complete the program. Hint: Use parallel arrays.

For this report, update the program to allow one of the above users to safely log in to their account, complete a maximum of 3 transactions, and end the program. Three incorrect attempts at entering the username and password will end the program. 

1 – Purchase an item (make a new purchase)
2 – View all items (list all items available)
3 – Get an estimate (estimate the cost for purchasing an item)
4 – Update Account (update the user information)
5 – Log Out (exit/end the program)

Each of the 4 transactions should be defined in its own function. At the end you should have a minimum of 5 functions (including main). You may define additional functions as you see fit. The customer may purchase multiple of that item but not more than the available quantity on hand. All purchases are made with store credit; therefore, the user cannot purchase items exceeding their store credit. There is a 6% sales tax on all items. Customers are granted pre-tax discounts on purchases over specified amounts. The table below describes the discount rate based on membership level. Any incorrect transactions will display an appropriate error message. After the purchase is complete, show all details in a receipt format, including the updated credit balance.

Membership LevelDiscount RateRequired SpendDiamond12%$700+Gold8.5%$300+Blue6%$100+

Note that the Gold and Diamond level members are still allowed the lower discount rate if they do not meet their spend level. For example, if a gold or diamond member spends $200, they should receive a 6% discount. 

After updating the user account, it should display the updated account information to the user. The user cannot update their username.

 

"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"