Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

here is the header file and cpp file for groceryBill just need to fill the misin

ID: 3888932 • Letter: H

Question

here is the header file and cpp file for groceryBill just need to fill the mising things program must be in c++


GroceryBill.h
#pragma once
#include "PriceList.h"
class GroceryBill {
public:
GroceryBill(const PriceList *priceList, double taxRate);
void scanItem(string scanCode, double quantity); // add item and quantity to bill; throw exception if item's code is not found in the pricelist
void scanItemsFromFile(string filename); // Scan multiple codes and quantities from the given text file
double getTotal(); // return the total cost of all items scanned
void printBill(); // Print the bill to cout. Each line contains the name of an item, total price, and the letter "T" if tax was addded.
private:
// any private member variables and methods go here
// TO BE COMPLETED
// testing
};
=========================================================================================================================================
GroceryBill cpp.
#include "GroceryBill.h"
#include <iostream>
using namespace std;
GroceryBill::GroceryBill(const PriceList *priceList, double taxRate) {
// To be completed
}

void GroceryBill::scanItem(string scanCode, double quantity) {
// To be completed
}
// Scan multiple codes and quantities from the given text file
// Each line contains two numbers separated by space: the first is the code (an integer), the second the quantity (a float/double)
// Example line from text file:
// 15000000 1.5
void GroceryBill::scanItemsFromFile(string filename) {
// To be completed
// HINT: Look at code in PriceList::createPriceListFromDatafile(string filename)
}
// return the total cost of all items scanned
double GroceryBill::getTotal() {
// To be completed
}
// Print the bill to cout. Each line contains the name of an item, total price, and the letter "T" if tax was addded.
// The last line shows the total.
// An example:
//Plastic_Wrap 1.60547 T
//Sugar_white 5.475
//Waffles_frozen 5.16
//Oil_Canola_100%_pure 2.69
//Potatoes_red 13.446
//TOTAL 28.3765
void GroceryBill::printBill() {
// To be completed
}

Objective You are given partial implementations of three classes. Briselist is a class to hold information of all items in the grocery store. There could be up to 1,000,000 items. The information of each item is its price barcode, item name, and whether it is taxable; these are kept together in Class RriceLigtItem. The items in PriceList are loaded all together from a text filel, or inserted one at a time. The complete grocery bill is computed in Class GrecervBill. To do so, it is given (a const pointer to) a previously created eieat to get the prices, and the tax rate percentage for taxable items when constructed. It is then given barcodes of items and their quantity. The barcodes can be given one at a time, or they can be collected together in a text file. You are to complete the implementations of these classes, adding public/private member variables and functions as needed. You should not use any of the C++ Standard Library containers (such as std::array, std::vector, std::list) for this project. Your code is tested in the provided main.cpp. Initially, the given code does not even compile. As you complete the code, it will pass the tests in the main

Explanation / Answer

-------------------------------------

100 Tomoto 23 1
223 Rice 89 0
34234 oil 790 0
53523 pen 25 1
5845 light 100 0
898 soap 450 1

groclist.txt :-

---------------------

100 2.5
223 3.5
53523 10
100 20

output :-

--------------------

--------------------------------

--------------------------------

-------------------------------

-------------------------------

------------------------------------------

------------------------------------------

main.cpp :-

--------------------------