Output: add vehicle
Output: All Vehicles
Below, I've added a Google Drive link so you can download the zipped file.
Below, I've added a Google Drive link so you can download the zipped file.
, Piece of code
#include <QCoreApplication>
#include <QTextStream>
#include "car.h"
#include "motorcycle.h"
#include "vehiclesystem.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QTextStream qin(stdin);
QTextStream qout(stdout);
VehicleSystem system;
system.loadFile();
while(true)
{
qout<<"\nVehicle Rental Management System\n";
qout<<"1. Add vehicles\n2. Search vehicles\n3. Display All vehicle\n4."
" Display Available vehicle\n5. Rent vehicle\n6. Return Vehicle\n7. Show
Status \n8. Exit"<<Qt::endl;
qout<<"Please enter your choice: ";
qout.flush();
bool valid;
int choice = qin.readLine().toInt(&valid);
if(!valid )
{
qout<<"Invalid! Please enter a number "<<Qt::endl;
continue;
}
switch (choice) {
case 1:
{