magento2 – Price calculator for small wine e-shop with several stores in different countries

Problem:

My friend runs some small wineries in Italy and owns 3-4 small warehouses in different European countries. He wants his online customers (wine buyers) to decide from which warehouse they want to get the wine by comparing the shipping prices.

If the customer is in the same country as the warehouse, integration with local delivery services and online payment systems is highly recommended.

I am currently inclined to Magento 2.3 + PWA Studio.

question:

Is it possible to achieve the functionality of such a price calculator without creating a custom module?

Please check the website value calculator! | Forum Promotion

Hi there,

Can you give me feedback or reviews on how to improve https://websitesworthcalculator.com? Not only is this a tool to measure the value of websites, it also allows you to view Google, Yahoo, Bing indexed pages or Dmoz directories, backlinks, DA, PA … You can also view information about your Whois domain and social networks, network signals from your websites, and more. On the result you can see antivirus check on his tool. Additional tools will help you analyze your website.

I also hope to get more reviews from you to do better.

Thank you very much

C ++ determinant calculator – follow-up

After following some suggestions found here, I want to show you the result:

#include  
#include 
#include 

double getDeterminant(std::vector> vect, int dimension);

int main() { 


    //First, the user has to enter the dimension of the matrix
    int dimension;
    std::cout << "Please enter dimension of Matrix: ";
    std::cin >> dimension;
    std::cout << std::endl;

    if(dimension < 0) {
        std::cout << "ERROR: Dimension cannot be < 0." << std::endl;
        return -1;
    }

    //Now, the user has to enter the matrix line by line, seperated by commas
    std::vector> vect(dimension, std::vector (dimension));
    std::string str;
    for(int i = 1; i <= dimension; i++) {
        std::cout << "Enter line " << i << " only seperated by commas: ";
        std::cin >> str;
        std::cout << std::endl;
        str = str + ',';
        std::string number;
        int count = 0;
        for(int k = 0; k < str.length(); k++) {
            if(str(k) != ',') {
                number = number + str(k);
            }
            else if(count < dimension) {
                if(number.find_first_not_of("0123456789.-") != std::string::npos) {
                    std::cout << "ERROR: Not only numbers entered." << std::endl;
                    return -1;
                }
                vect(i - 1)(count) = std::stod(number);
                number = "";
                count++;
            }
            else {
                std::cout << "ERROR: Too many numbers entered." << std::endl;
                return -1;
            }
        }
    }

    //Output
    for(int i = 0; i < dimension; i++) {
        for(int j = 0; j < dimension; j++) {
            std::cout << vect(i)(j) << " ";
        }
        std::cout << std::endl;
    }

    std::cout << "Determinant of the matrix is : " << getDeterminant(vect, dimension) << std::endl; 
    return 0;
} 

double getDeterminant(std::vector> vect, int dimension) {

    if(dimension == 0) {
        return 0;
    }

    if(dimension == 1) {
        return vect(0)(0);
    }

    //Formula for 2x2-matrix
    if(dimension == 2) {
        return vect(0)(0) * vect(1)(1) - vect(0)(1) * vect(1)(0);
    }

    double result = 0;
    int sign = 1;
    for(int i = 0; i < dimension; i++) {

        //Submatrix
        std::vector> subVect(dimension - 1, std::vector (dimension - 1));
        for(int m = 1; m < dimension; m++) {
            int z = 0;
            for(int n = 0; n < dimension; n++) {
                if(n != i) {
                    subVect(m-1)(z) = vect(m)(n);
                    z++;
                }
            }
        }

        //recursive call
        result = result + sign * vect(0)(i) * getDeterminant(subVect, dimension - 1);
        sign = -sign;
    }

    return result;
}

Do you have any other suggestions for improving the code?

What is the latest Google update in SEO 2020?

Latest Google updates in SEO 2020

Immigration from India to Australia Australia Visa Consultants | How can I get Australian PR in 2020? | Can Indians get jobs in Australia? | Australia Immigration Point Calculator for Qualified Immigration Visa | Australia permanent residence in India

Python calculator with PyQT5

I recently started learning Python and PyQT5.
So here is my code for a calculator. Personally, I don't like what the doMath () function looks like, but I can't make it more readable and pythonic now. Please check, all corrections and suggestions are welcome.

import operator
import sys
from functools import partial

from PyQt5.QtWidgets import (QApplication, QShortcut, QLabel, QPushButton,
                             QGridLayout, QWidget, QMainWindow, QLineEdit,
                             QVBoxLayout, QLineEdit, QShortcut, QAction)
from PyQt5.QtGui import QKeySequence, QDoubleValidator
from PyQt5.QtCore import QLocale, Qt


class MyWindow(QMainWindow):
    def __init__(self, parent=None):
        super(MyWindow, self).__init__(parent)
        self.setGeometry(0, 0, 200, 300)
        self.setWindowTitle('PyQt5 calculator')
        self.buttonsText = (
            '<-', '=', '+',
            '/', '*', '-',
            '7', '8', '9',
            '4', '5', '6',
            '1', '2', '3',
            'c', '0', '.'
        )
        self.col_num = 3
        self.operators = {'+': operator.add, '-': operator.sub,
                          '/': operator.truediv, '*': operator.mul}
        self.operand = ''
        self.operator = ''
        self.initUI()
        self.setShortcuts()

    def initUI(self):
        # initialize widgets and layouts
        cenWidget = QWidget(self)
        vertLayout = QVBoxLayout(cenWidget)
        gridWidget = QWidget()
        gridLayout = QGridLayout(gridWidget)
        gridWidget.setLayout(gridLayout)
        self.hintField = QLabel(parent=cenWidget)
        # configure text filed and validator
        self.textField = QLineEdit()
        f = self.textField.font()
        f.setPointSize(18)
        self.textField.setFont(f)
        validator = QDoubleValidator()
        validator.setLocale(QLocale('English'))
        self.textField.setValidator(validator)
        # add widgets to top level layout
        vertLayout.addWidget(self.hintField)
        vertLayout.addWidget(self.textField)
        vertLayout.addWidget(gridWidget)
        # add buttons to grid layout
        self.buttonInstances = (QPushButton(item) for item in self.buttonsText)
        for i, button in enumerate(self.buttonInstances):
            button.clicked.connect(partial(self.doMath, button.text()))
            gridLayout.addWidget(button, i//self.col_num, i % self.col_num)

        self.setCentralWidget(cenWidget)

    def doMath(self, buttonValue):
        currentValue = self.textField.text()
        convertedValue = self.convertValue(currentValue)
        if buttonValue == 'c':
            self.clearFields()
        elif buttonValue == '<-':
            self.textField.setText(currentValue(:-1))
        elif buttonValue == '.':
            if '.' not in currentValue:
                self.textField.setText(currentValue+buttonValue)
        elif (not self.operand and buttonValue in self.operators
              and convertedValue != None):
            self.operator = buttonValue
            self.operand = convertedValue
            self.textField.setText('')
        elif (buttonValue == '=' or buttonValue in self.operators 
              and self.operator and convertedValue):
            answer = self.operators(self.operator)(
                     self.operand, convertedValue)
            self.clearFields()
            if buttonValue == '=':
                self.textField.setText(f'{answer}')
            else:
                self.operand = answer
                self.operator = buttonValue
        elif self.convertValue(buttonValue) != None:
            self.textField.setText(currentValue+buttonValue)

        self.hintField.setText(f'

{self.operand}' f'{self.operator}

') def setShortcuts(self): eqShort= QShortcut(QKeySequence('Enter'), self) eqShort.activated.connect(partial(self.doMath, '=')) for sign in self.buttonsText(1:5): short= QShortcut(QKeySequence(sign), self) short.activated.connect(partial(self.doMath, sign)) def convertValue(self, value): try: return int(value) except ValueError: try: return float(value) except: return None def clearFields(self): self.operand = '' self.operator = '' self.textField.setText('') app = QApplication(sys.argv) window = MyWindow() window.show() sys.exit(app.exec_())

Thank you in advance.

Processing – Simple definitive integral calculator

I created this code to calculate certain integrals in processing. It works by calculating the rectangle between the maximum value between the previous function value and the current function value. Then I calculate the area by multiplying the maximum value described above and the step. And finally, the integral only sums up all areas.
I'm going to make a version based on trapezoids, but that could be very slow since I would have to use the square root function, which is computationally intensive to calculate.
Suggestions are welcome.

float step = 0.0001;
int iterations = 0;

// y = x
float f1(float x) {
  return 2 * x;
}

float integral(int a, int b) {
  float sum = 0.0;
  float prevI = a;

  for (float i = a; i < b; i += step) {
    float h = max(f1(prevI), f1(i));    
    sum += step * h;

    prevI = i;
    iterations++;
  }
  return sum;
}

void setup() {
  println(integral(0, 1));
  println(iterations);
}

Beginners – C ++ calculator for complex numbers

I wrote a small calculator for complex numbers in C ++:

#include 
using namespace std;

class ComplexNumber {

    public:
        double real;
        double imaginary;

        void add(ComplexNumber a, ComplexNumber b) {

            //Just add real- and imaginary-parts
            double real = a.real + b.real;
            double imaginary = a.imaginary + b.imaginary;
            ComplexNumber c = ComplexNumber(real, imaginary);
            cout << "a + b = " << c.real << " + (" << c.imaginary << ") * i" << endl; 
        }

        void sub(ComplexNumber a, ComplexNumber b) {

            //Just subtract real- and imaginary-parts
            double real = a.real - b.real;
            double imaginary = a.imaginary - b.imaginary;
            ComplexNumber c = ComplexNumber(real, imaginary);
            cout << "a - b = " << c.real << " + (" << c.imaginary << ") * i" << endl; 
        }

        void multiply(ComplexNumber a, ComplexNumber b) {

            //Use binomial theorem to find formula to multiply complex numbers
            double real = a.real * b.real - a.imaginary * b.imaginary;
            double imaginary = a.imaginary * b.real + a.real * b.imaginary;
            ComplexNumber c = ComplexNumber(real, imaginary);
            cout << "a * b = " << c.real << " + (" << c.imaginary << ") * i" << endl; 
        }


        void divide(ComplexNumber a, ComplexNumber b) {

            //Again binomial theorem
            double real = (a.real * b.real + a.imaginary * b.imaginary) / (b.real * b.real + b.imaginary * b.imaginary);
            double imaginary = (a.imaginary * b.real - a.real * b.imaginary) / (b.real * b.real + b.imaginary * b.imaginary);
            ComplexNumber c = ComplexNumber(real, imaginary);
            cout << "a : b = " << c.real << " + (" << c.imaginary << ") * i" << endl; 
        }

    /*
     * Constructor to create complex numbers
     */
    ComplexNumber(double real, double imaginary) {
        this->real = real;
        this->imaginary = imaginary;
    }
};

int main() {

    /*
     * Variables for the real- and imaginary-parts of
     * two complex numbers
     */
    double realA;
    double imaginaryA;
    double realB;
    double imaginaryB;

    /*
     * User input
     */
    cout << "enter real(A), imag(A), real(B) and imag(B) >> ";
    cin >> realA >> imaginaryA >> realB >> imaginaryB;
    cout << endl;

    /*
     * Creation of two objects of the type "ComplexNumber"
     */
    ComplexNumber a = ComplexNumber(realA, imaginaryA);
    ComplexNumber b = ComplexNumber(realB, imaginaryB);

    /*
     * Calling the functions to add, subtract, multiply and 
     * divide the two complex numbers.
     */
    a.add(a, b);
    a.sub(a, b);
    a.multiply(a, b);
    a.divide(a, b);
    return 0;
}

I would appreciate suggestions for improving the code.

Python Basic Calculator – Code Review Stack Exchange

Hello, I created this calculator in Python. I know it's pretty simple, but I want your opinion on whether I did it well or not and whether you find mistakes or not.
P.S (I know I could do something better if I look on the Internet, but I want to develop, so I'm here.)

#Commands
print("Operations that you can use:")
print("Addition: +")
print("Subtraction: -")
print("Multiplication: *")
print("Division: /")
print("Exponentiation: **")
print("Radicalization: **(1/")
print("n")

#Variables
x = None
y = None
z = None
ce = 0

while ce < 1:

# Inputs
    x = float(input("First Value: "))
    y = input("Operation: ")
    z = float(input("Second Value: "))

# If
    if '+' == y:
        add = float(x) + float(z)
        print(add)
    elif '-' == y:
        sub = float(x) - float(z)
        print(sub)
    elif '/' == y:
        div = float(x) / float(z)
        print(div)
    elif "**(1/" == y:
        rad = float(x) **(1/float(z))
        print(rad)
    elif "**" == y:
        exp = float(x) ** float(z)
        print(exp)
    elif '*' == y:
        mul = float(x) * float(z)
        print(mul)
    print("Continue or Exit?")
    ce = int(input("    0    or   1  : "))

c ++ – Sales Calculator System (with menu option)

I was hoping someone could give me feedback on my program. For example, have I used structures and vectors well and could I improve a code structure, maybe a better way to do something? Obviously, I don't expect someone to go through every part, but maybe everything you notice.
To the best of my knowledge, I've made sure I've done error checking and input validation, and everything works according to the specification below. When you run the program, please note that after each entry you will be asked to enter "Y" to continue. This is only for separation and better visual presentation for the user, so that no information remains unnoticed.
Many thanks in advance to everyone who takes the time, I am very grateful because I want to learn and develop my skills in c ++.

Entrance:

item name

retail price

Lot sold

Output:

Quantity of items sold

Total price of the items sold

Best selling item

Least selling items

The difference in sales between the best-selling and the least-sold items

Estimated operating costs (50% of sales)

Taxes paid (20% of sales)

Profit (sum after taxes and operating costs)

When any number of products make up less than 5% of sales
a warning should appear individually

Your program must also meet the following restrictions:

At least 5 products must be entered

// Sales System.cpp: This file contains the & # 39; main & # 39; function. The program execution begins and ends there.
//

#include 
#include 
#include 
#include 

//This struct models as a basic item which includes its name, price and quantity sold.
struct Item{
private:
    std::string sItemName;
    double dSalePrice;
    int iQuantitySold;
public:
    Item(std::string s, double d, int i):sItemName(s),dSalePrice(d),iQuantitySold(i){
    }
    std::string GetItemName()const{return sItemName;}
    double GetItemSalePrice()const{return dSalePrice;}
    int GetItemQuantity()const{return iQuantitySold;}

    double GetIndividualSale()
    {
        return dSalePrice * iQuantitySold;
    }
};

//The ContinueOptions() procedure is there to allow people to decide when they want to go back to the menu.
void ContinueOptions()
{
    bool bValid = false;
    char cInputCommandPrompt = 0;
    do{
        std::cout << "Press ""y"" to continue: ";

        bValid = bool( std::cin >> cInputCommandPrompt );

        if ( bValid )
        {
            cInputCommandPrompt = std::toupper(static_cast(cInputCommandPrompt));
            bValid = cInputCommandPrompt == 'Y';
        }

        if ( not bValid )
        {

            std::cin.clear();
            std::cin.ignore(100, 'n');
            std::cout << "Please try again.n";
        }
    } while( not bValid );
    std::cout << "n";
}

//When called this asks the user how many items they would like to add and the item number has to be greater than 5.
//Through the parameter is passed a vector of items.
void GetItemInformation(std::vector&Items)
{
    bool bValid = false;
    int iItemSize = 0;
    std::string sItem;
    double dSalePrice = 0;
    int iQuantity = 0;

    do{
        std::cout << "How many items would you like to add?: ";
        std::cin >> iItemSize;
        if(std::cin.good())
        {
            if(iItemSize < 1)
            {
                std::cout << "n";
                std::cout << "Try again, number must be greater than 5!n";
            }
            else
            {
                bValid = true;
            }
        }
        else
        {
            std::cin.clear();
            std::cin.ignore(std::numeric_limits::max(),'n');
            std::cout << "Sorry, invalid input input. Try again!";
            std::cout << "n";

        }

    } while(bValid == false);


    for (int iCount = 0; iCount < iItemSize;iCount++)
    {
        std::cout << "n";
        std::cout << "Enter information for item " << iCount + 1 << "n";
        std::cout << "n";
        std::cout << "tName: ";
        std::cin.ignore();
        std::getline(std::cin,sItem);

        bool bSalePriceValid = false;
        do{
        std::cout << "tSale price: £";
        std::cin >> dSalePrice;
        if(!std::cin)
        {
            std::cin.clear();
            std::cin.ignore(std::numeric_limits::max(),'n');
            std::cout << "n";
            std::cout << "Sorry, invalid input input. Try again!n";
            std::cout << "n";
        }
        else
        {
            bSalePriceValid = true;
        }
        }while(bSalePriceValid == false);

        bool bQuantityValid = false;
        do{
            std::cout << "tQuantity sold: ";
            std::cin >> iQuantity;
            if(!std::cin)
            {
                std::cin.clear();
                std::cin.ignore(std::numeric_limits::max(),'n');
                std::cout << "n";
                std::cout << "Sorry, invalid input input. Try again!n";
                std::cout << "n";
            }
            else
            {
                bQuantityValid = true;
            }
        }while(bQuantityValid == false);

        Item NewItem(sItem, dSalePrice, iQuantity);
        Items.push_back(NewItem);
        std::cout << "n";
    }
     std::cout << "You've successfully added " << iItemSize <<" itemsn";

}
void AddNewItem(std::vector&Items)
{

    std::string sInputName;
    double dInputSalePrice = 0;
    int iInputQuantity = 0;
    std::cout << "Enter information for new item...n";

    std::cout << "tName: ";
    std::cin.ignore();
    std::getline(std::cin,sInputName);
    bool bSalePriceValid = false;
    do{
        std::cout << "tSale price: £";
        std::cin >> dInputSalePrice;
        if(!std::cin)
        {
            std::cin.clear();
            std::cin.ignore(std::numeric_limits::max(),'n');
            std::cout << "n";
            std::cout << "Sorry, invalid input input. Try again!n";
            std::cout << "n";
        }
        else
        {
            bSalePriceValid = true;
        }
    }while(bSalePriceValid == false);

    bool bQuantityValid = false;
    do{
        std::cout << "tQuantity sold: ";
        std::cin >> iInputQuantity;
        if(!std::cin)
        {
            std::cin.clear();
            std::cin.ignore(std::numeric_limits::max(),'n');
            std::cout << "n";
            std::cout << "Sorry, invalid input input. Try again!n";
            std::cout << "n";
        }
        else
        {
            bQuantityValid = true;
        }
    }while(bQuantityValid == false);

    Item NewItem(sInputName, dInputSalePrice, iInputQuantity);
    Items.push_back(NewItem);
    std::cout << "You've succesfully added a new item.n";
    ContinueOptions();
}

void DisplayMenu()
{
    std::cout << "What would you like to do?nChoose a number from the Menu...n";
    std::cout << "t1. Add another itemn";
    std::cout << "t2. Display itemsn";
    std::cout << "t3. Total quantity of items soldn";
    std::cout << "t4. Total price of items soldn";
    std::cout << "t5. Most sold itemn";
    std::cout << "t6. Least sold itemn";
    std::cout << "t7. Difference in sales between the most and least sold itemsn";
    std::cout << "t8. Estimated operational cost (50% of sales)n";
    std::cout << "t9. Show Tax paid (20% of sales)n";
    std::cout << "t10.Profit (Total after tax and operational costs)n";
    std::cout << "t0. Quit.n";
    std::cout << "n";
}

void PrintItems(const std::vector&Items)
{
    int iCountNumber = 1;
    for (int iCount = 0; iCount < Items.size();iCount++)
    {
        std::cout << "Displaying information for item " << iCountNumber++ << "...n";
        std::cout << "tName: " << Items.at(iCount).GetItemName() << "n";
        std::cout << "tSale Price: £" << Items.at(iCount).GetItemSalePrice() << "n";
        std::cout << "tQuantity Sold: " << Items.at(iCount).GetItemQuantity() << "n";
        std::cout << "n";
    }
    ContinueOptions();
}
int CalculateQuantitySold(std::vector&Items){
    int iTotalQuantitySold = 0;
    for (int iCount = 0; iCount < Items.size();iCount++){
        iTotalQuantitySold += Items.at(iCount).GetItemQuantity();
    }
    return iTotalQuantitySold;
}

int MostSoldItem(std::vector&Items)
{
    Item MostSoldItem("",0,0);
    int iIndexOfMostSoldItem = 0;
    for (int iCount = 0; iCount < Items.size();iCount++)
    {
        if ( Items.at(iCount).GetItemQuantity() > MostSoldItem.GetItemQuantity() )
        {
            MostSoldItem = Items.at(iCount);
            iIndexOfMostSoldItem = iCount;
        }
    }
    return iIndexOfMostSoldItem;
}
int LeastSoldItem(std::vector&Items)
{
    Item LeastSoldItem("",0,0);
    int iIndexOfLeastSoldItem = 0;
    for (int iCount = 0; iCount < Items.size();iCount++)
    {
        if (Items.at(iCount).GetItemQuantity() < LeastSoldItem.GetItemQuantity())
        {
            LeastSoldItem = Items.at(iCount);
            iIndexOfLeastSoldItem = iCount;
        }
    }
    return iIndexOfLeastSoldItem;
}
void DisplayVectorOfItemsAtIndex(std::vector&Items,int iIndex)
{
    std::cout << "Most sold item is: n";
    std::cout <<"tName: " << Items.at(iIndex).GetItemName() << "n";
    std::cout <<"tSale Price: £" << Items.at(iIndex).GetItemSalePrice() << "n";
    std::cout <<"tQuantity Sold: " << Items.at(iIndex).GetItemQuantity() << "n";
    std::cout << "n";
}

double CalculateDifferenceBetweenLeastAndMostSold(std::vector&Items)
{
    int iDifferenceBetweenMostLeast = 0;
    int iMostSoldIndex = MostSoldItem(Items);
    int iLeastSoldIndex = LeastSoldItem(Items);
    iDifferenceBetweenMostLeast = Items.at(iMostSoldIndex).GetItemQuantity() - Items.at(iLeastSoldIndex).GetItemQuantity();
    return iDifferenceBetweenMostLeast;
}
double CalculateTotalSales(std::vector&Items)
{
    double dTotalSales = 0;
    for (int iCount = 0; iCount < Items.size();iCount++)
    {
        dTotalSales += Items.at(iCount).GetIndividualSale();
    }
    return dTotalSales;
}
double CalculateEstimatedOperationalCost(std::vector&Items)
{
    double dTotalSales = CalculateTotalSales(Items);
    double dEstimatedOperationalCost = dTotalSales * 0.5;
    return dEstimatedOperationalCost;
}
double CalculateTaxPaid(std::vector&Items)
{
    double dTaxPaid = CalculateTotalSales(Items) * 0.2;
    return dTaxPaid;
}
double CalculateProfit(std::vector&Items)
{
    double dTotalProfit = 0;
    double dTotalSales = CalculateTotalSales(Items);
    dTotalProfit = dTotalSales - CalculateTaxPaid(Items) - CalculateEstimatedOperationalCost(Items);
    return dTotalProfit;
}
void DisplayWarning(std::vector&Items)
{
    double dTotalSales = CalculateTotalSales(Items);
    double FivePercentOfTotalSales = dTotalSales * 0.05;
    bool bWarden = false;
    for (int iCount = 0; iCount < Items.size();iCount++)
    {
        if (Items.at(iCount).GetIndividualSale() <= FivePercentOfTotalSales)
        {
            bWarden = true;
        }
        else
        {
            bWarden = false;
        }
    }
    if (bWarden == true)
    {
        std::cout << "Warning! You have products that constitutes less than 5% of sales individually.n";
    }
    else
    {
        std::cout << "Well done! All your products constitutes to more than 5% of sales individually.n";
    }
    ContinueOptions();
}
int main()
{

    bool ExitProgram = false;
    int cMenuSelection = 0;
    int iIndexOfMostSoldItem = 0;
    int iIndexOfLeastSoldItem = 0;
    std::vectorItems;
    std::cout << "===================================n";
    std::cout << "ttSales Systemn";
    std::cout << "===================================n";
    GetItemInformation(Items);
    DisplayWarning(Items);
    do{
    DisplayMenu();
    std::cout << "Enter a number from the menu: ";
        std::cin >> cMenuSelection;
    if(std::cin.good())
    {
        std::cout << "n";
        switch (cMenuSelection)
        {
            case 1:
                std::cout << "You've chosen option 1.n";
                AddNewItem(Items);
                break;
            case 2:
                std::cout << "You've chosen option 2.n";
                PrintItems(Items);
                break;
            case 3:
                std::cout << "You've chosen option 3.n";
                std::cout << "The total quantity sold is: " << CalculateQuantitySold(Items) << ".n";
                ContinueOptions();
                break;
            case 4:
                std::cout << "You've chosen option 4.n";
                std::cout << "Total Amount of Items Sold: £" << CalculateTotalSales(Items) << "n";
                ContinueOptions();
                break;
            case 5:
                std::cout << "You've chosen option 5.n";
                iIndexOfMostSoldItem = MostSoldItem(Items);
                DisplayVectorOfItemsAtIndex(Items,iIndexOfMostSoldItem);
                ContinueOptions();
                break;
            case 6:
                std::cout << "You've chosen option 6.n";
                iIndexOfLeastSoldItem = LeastSoldItem(Items);
                DisplayVectorOfItemsAtIndex(Items,iIndexOfLeastSoldItem);

                ContinueOptions();
                break;
            case 7:
                std::cout << "You've chosen option 7.n";
                std::cout << "The difference between the most and least is by: ";
                std::cout << CalculateDifferenceBetweenLeastAndMostSold(Items) << ".n";
                ContinueOptions();
                break;
            case 8:
                std::cout << "You've chosen option 8.n";
                std::cout << "Estimated operational cost (50% of sales): ";
                std::cout << CalculateEstimatedOperationalCost(Items) << ".n";
                ContinueOptions();
                break;
            case 9:
                std::cout << "You've chosen option 9.n";
                std::cout << "Tax paid (20% of sales): ";
                std::cout << CalculateTaxPaid(Items) << ".n";
                ContinueOptions();
                break;
            case 10:
                std::cout << "You've chosen option 10.n";
                std::cout << "Profit (Total after tax and operational costs): ";
                std::cout << CalculateProfit(Items) << ".n";
                ContinueOptions();
                break;
            case 0:
                std::cout << "You have exited the program.n";
                ExitProgram = true;
                break;
            default:
                std::cout << "Invalid command prompt. Try again!n";
                ContinueOptions();
                continue;
        }
    }
    //This will essentially clear the invalid characters the user entered and will prompt them to try again by re-looping back to the start.
    else
    {
        std::cin.clear();
        std::cin.ignore(std::numeric_limits::max(),'n');
        std::cout << "Sorry, invalid input input. Try again!";
        std::cout << "n";
        ContinueOptions();
    }

    }while(ExitProgram == false);
    std::cout << "n";
}