Professional Documents
Culture Documents
Amasampo
Amasampo
#include <fstream>
using namespace std;
void displayCategories() {
cout << "Categories:" << endl;
cout << "1. Cars" << endl;
cout << "2. Household items" << endl;
cout << "3. Electronic Devices" << endl;
}
void displayPayments() {
cout << "Payment Options:" << endl;
cout << "1. Mobile money" << endl;
cout << "2. VISA Card" << endl;
cout << "3. Cash" << endl;
}
void displayReports() {
cout << "Report Options:" << endl;
cout << "1. Daily sales" << endl;
cout << "2. Revenue generated" << endl;
cout << "3. Feedback" << endl;
}
void selectCategory() {
int choice;
cout << "Select a category: ";
cin >> choice;
switch (choice) {
case 1:
cout << "You selected Cars." << endl;
break;
case 2:
cout << "You selected Household items." << endl;
break;
case 3:
cout << "You selected Electronic Devices." << endl;
break;
default:
cout << "Invalid choice." << endl;
}
}
void selectPayment() {
int choice;
cout << "Select a payment method: ";
cin >> choice;
switch (choice) {
case 1:
cout << "You selected Mobile money." << endl;
break;
case 2:
cout << "You selected VISA Card." << endl;
break;
case 3:
cout << "You selected Cash." << endl;
break;
default:
cout << "Invalid choice." << endl;
}
}
void generateReport() {
int choice;
cout << "Select a report option: ";
cin >> choice;
switch (choice) {
case 1:
cout << "Generating Daily sales report..." << endl;
break;
case 2:
cout << "Generating Revenue generated report..." << endl;
break;
case 3:
cout << "Generating Feedback report..." << endl;
break;
default:
cout << "Invalid choice." << endl;
}
}
int main() {
int choice;
do {
cout << "Menu:" << endl;
cout << "1. Categories" << endl;
cout << "2. Payments" << endl;
cout << "3. Reports" << endl;
cout << "0. Exit" << endl;
cout << "Enter your choice: ";
cin >> choice;
switch (choice) {
case 1:
displayCategories();
selectCategory();
break;
case 2:
displayPayments();
selectPayment();
break;
case 3:
displayReports();
generateReport();
break;
case 0:
cout << "Exiting the program. Goodbye!" << endl;
break;
default:
cout << "Invalid choice. Please try again." << endl;
}
return 0;
}