21 lines
402 B
C++
21 lines
402 B
C++
//
|
|
// Created by Franc on 04.05.2026.
|
|
//
|
|
|
|
#include "MenuItem.h"
|
|
|
|
MenuItem::MenuItem(string n, double b) {
|
|
this->name = n;
|
|
this->basePrice = b;
|
|
}
|
|
MenuItem::~MenuItem(){}
|
|
double MenuItem::getPrice() const {
|
|
return basePrice;
|
|
}
|
|
string MenuItem::getName() const {
|
|
return name;
|
|
}
|
|
string MenuItem::printInfo() {
|
|
return "Menu Item: " + name + ", with price of: " + to_string(basePrice);
|
|
}
|