Write a program for car booking on which the user adds and remove the cars from structure, all the functionality is based on user selection.
inputs:
CarName/Model
Reg. No
Price
Colour
Owner name
Note: C++ language
The following is the C++ code for the given problem and it is explained with the help of comments and cout statements.
C++ code:
#include<iostream>
using namespace std;
struct Car
{
string CarName;
string RegNo;
float Price;
string Colour;
string Ownername;
public:void addCar(string CarName,string RegNo,float Price,string
Colour,string Ownername)
{
this->CarName=CarName;
this->RegNo=RegNo;
this->Price=Price;
this->Colour=Colour;
this->Ownername=Ownername;
}
public:void removeCar(Car c)
{
this->CarName="";
this->RegNo="";
this->Price=0.0;
this->Colour="";
this->Ownername="";
}
public:void display1(Car c)
{
if(c.Price!=0.0)
cout<<"CarName: "<<c.CarName<<"
"<<"RegNo: "<<c.RegNo<<" "<<"Price:
"<<c.Price<<" "<<"Colour:
"<<c.Colour<<" "<<"Ownername:
"<<c.Ownername<<endl;
else
cout<<""<<endl;
}
};
int main()
{
Car c,d;
c.addCar("Hyundai","12015",898623.0,"Black","Sandeep");
d.addCar("Ford","12016",598629.0,"White","Sandy");
//Adding to cars
cout<<"Before Removing Ford Car"<<endl;
c.display1(c);
d.display1(d);
//removing car d
d.removeCar(d);
cout<<"After Removing Ford Car"<<endl;
c.display1(c);
d.display1(d);
return 0;
}

Write a program for car booking on which the user adds and remove the cars from...
Write a program in C language that gets a list of names from user. The list ends when the user gives ‘quit’. The program should then print all the names provided by the user and the frequency of each name. Assume each name is at most of size 100 characters.
Write a C++ program which inputs an array of integers from user then pass array pointer to function which will return sum of whole array. Also do same action by using address-based argument of array to another function. Note: In this you need to declare two factions: 1. With argument of pointer type. 2.With argument type of address type
In C++
Write a program to calculate a car dealer's sale of the same car. Enter the car price and the number of cars sold. Calculate the tax (9% of each car price). Calculate the shipping charge ($3,000 per car). The price of the car sale is the sum of the total car price for all cars, the tax for all cars, and the shipping charge for all cars. You must display the total price of the car sale at...
Write a program that (in the main program) prompts the user for the (integer) model number of their car. The main function should then call the function check defective which should • take in the model number of the car • check if the model number is 119, 179, 221, 780, or anything between 189 and 195, inclusive, which indicates the car is defective • print a message indicating whether or not the car is defective Note: this is should...
Note: Write C++ Code Rental Car System With Features Below: Car options available. For example(Business Class,Economy) Required car and driver availability (For example if user want to book Honda Civic ) Car booking/cancellation User’s Personal details Fare charges(It will depend on Where he want to go for example he is booking from Mumbai to delhi then 2k or if he is booking from Mumbai to channai then 5k ruppes ) Duration of booking Bio data of driver (if driver has...
c++, use the skeleton code to make a program of the
following
include <iostream> tinclude <string> using namespace std; class car public: //define your functions here, at least 5 private: string name; int mpg; double price int horsepower; // feel free to add more atributes int main() // create you objects, call your functions // define member functions here For this lab, write a program that does the following: Creates a class based on the car skeleton code (you may...
Java Create a program for a car dealer to use where you have a class for Salesman, Cars, and the Records of sale. 4 salesman and 4 cars to start with but have array size for 50 cars, have space for 100 records in array. The program should have 6 options in the menu. buy car, sell car, show inventory, show salesman, show sales records, and exit. Salesman class - Name, ID number, Commision rate, Total commisions earned, Totals number...
Wolfie's Car Repair Shop For this assignment you will be completing a program that manages cars and car repairs at Wolfie's Car Repair Shop. The program is menu-driven. The menu can be found in Homework.Driver.java. Provided in that file is a series of methods that begin with the prefix main_. Those methods request input from the user and then call methods from the class CarRepairShop. It is these methods in the CarRepairShop that you will be implementing for homework. In...
Write a MIPS Assembly language program to request a file name from the user, open the file, read the contents, and write it out to the console.
Write a MIPS Assembly language program to request a file name from the user, open the file, read the contents, and write it out to the console.