Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Implement the class SuperMarket that has: Method called greetings: ask the customer name; check the time, greeting the customer properly; e.g. good morning, afternoon,

C++

Implement the class SuperMarket that has:

Method called greetings: ask the customer name; check the time, greeting the customer properly; e.g. good morning, afternoon, evening

Method called menu: like an ATM, ask the user to select from a list of 5 items which items was purchased, how many of each item

Method called bill: calculates the amount to be paid by customer

Method printInvoice: print in a formatted way, just like as in a supermarket receipt, item description, amount purchased, total on that item, and final total to be paid

Method read_datafile: this method read the file that should contain in each line the product name and the price; e.g.

Shampoo 6.99

Apple each 0.35 Etc

Method print_receipt: the receipt should be printed in a file that will be generated for each customer, having the customer name as the file name; e.g. johndoe_receipt.txt paulgreen_receipt.txt

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

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

Working with other project stakeholders for support.

Answered: 1 week ago