Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mocha Joes Develop a PoS (Point of Sales) system in C++ for Mocha Joes Coffee shop. The PoS system consists of a class defined in

Mocha Joes

Develop a PoS (Point of Sales) system in C++ for Mocha Joes Coffee shop. The PoS system consists of a class defined in Mocha.h and member definitions in Mocha.cpp. The class consists of member variables to hold the name of the customer, type of beverage, size of beverage, quantity per order, and total price for the order calculated using Table 1.

Table 1: Mocha Joes Menu

Beverage Tall Grande Venti
Mocha $3.50 $4.00 $4.50
Latte $3.00 $3.50 $4.00
Chai $2.50 $3.00 $3.50
Matcha $3.00 $3.50 $4.00

Generate an order number that increments on every order (starting from 001). Create a public member functions that takes the order and displays the receipt. Test this class by creating five different orders (either as single or multiple class instance) in mochajoe.cpp. A sample output is shown in Figure 1. The makefile and sample files are provided.

The .h file:

#include #include #include #include

using namespace std;

class Mocha{ // Define your class here };

The mocha.cpp file:

#include "Mocha.h"

//Member functions are defined here

The mochjoe.cpp file:

#include "Mocha.h"

/* This is main program * Create objects of Mocha inside main function * Use setOrder and DisplayReceipt of Mocha class to set and display * the order */

int main(void){

return 0; }

Sample Output:

image text in transcribed

Figure 1: Sample Output Q ab@ab: -/teach/sp20/hw/s... A = - Can I get a name for the order please O X Ab What type of beverage you like to have For Mocha Press o For Latte Press 1 For chai Press 2 For Matcha Press 3 In what size For Tall Press o For Grade Press 1 For Venti Press 2 How many - - - - - - - *******************Mocha Joe's****************** Maltby Street Market, London SE1 3PA, USA Order Number: 100 Customer name: Ab - -- - - - -- - . .. . . - -- - - Order Matcha Grade Quantity 2x Unit Price 3.50 7.00 Subtotal Tax 5% ......... ---- Total 7.35 Thank you for your order Next customer please Figure 1: Sample Output Q ab@ab: -/teach/sp20/hw/s... A = - Can I get a name for the order please O X Ab What type of beverage you like to have For Mocha Press o For Latte Press 1 For chai Press 2 For Matcha Press 3 In what size For Tall Press o For Grade Press 1 For Venti Press 2 How many - - - - - - - *******************Mocha Joe's****************** Maltby Street Market, London SE1 3PA, USA Order Number: 100 Customer name: Ab - -- - - - -- - . .. . . - -- - - Order Matcha Grade Quantity 2x Unit Price 3.50 7.00 Subtotal Tax 5% ......... ---- Total 7.35 Thank you for your order Next customer please

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

More Books

Students also viewed these Databases questions

Question

=+10. Did you clearly project the brand's USP?

Answered: 1 week ago