QUESTION PROVIDED BELOW KINDLY SEE. PROVIDE OUTPUT AS IT IS SHOWN IN QUESTION.   AND FOLLOW TEMPLATES PROVIDED AT END OF QUESTION CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , BikeService.cpp  ) Write a C++ program to display the packages and the service cost. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Note: Use function overloading concept. Consider a class BikeService with the following private member variables. Datatype Variable string model string packageType Include the following methods in the class BikeService Method Description void bikeService(string packagetype) This method displays the available service based on the type of the package (either regular or additional). Note: If the package type is 1, display all the services corresponding to the regular package. If the package type is 2, display all the services corresponding to both the regular package and the additional package. float bikeService(int regularPackage) This method returns the service cost for the specified regular package. If the user desires to buy more than one package, then the service cost is the total of all selected package’s costs. float bikeService(int regularPackage,int addtionalPackage) This method returns the service cost for the specified regular package and additional package. If the user desires to buy more than one package, then the service cost is the total of all selected package’s costs. The service package and their cost are as follows: The service for regular packages are            – Air Filter Cleaning – Rs. 1500            – Battery Check-Up and Distilled Water Top-Up – Rs. 1200            – Electrical Checking & Repair – Rs. 600            – Lights Checkup & Repair – Rs. 700            – Chain Adjustment & Cleaning – Rs. 400            – Handle Play Adjustment – Rs. 1000            – Tightening Of Bolts, Nuts,& Cylinder Head Checkup – Rs. 500            – Fuel Leakage Checking & Repair –Rs. 900 The service for additional packages are            – Engine Oil – Rs. 500            – Water Wash – Rs. 400            – Battery Recharge – Rs. 300 In the main method get the inputs from the user and test the above class. Input and Output Format: Refer sample input and output for formatting specifications. All double values should be displayed correctly in two decimal places. [All text in bold corresponds to input and the rest corresponds to output] Sample Input and Output 1: Enter the model of the bike RoyalEnfield Select the service type 1.Regular 2.Additional Regular The service regular package 1.Air Filter Cleaning 2.Battery Check Up and Distilled Water Top-Up 3.Electrical Checking & Repair 4.Lights Checkup & Repair 5.Chain Adjustment & Cleaning 6.Handle Play Adjustment 7.Tightening Of Blots ,Nuts,& Cylinder Head Checkup 8.Fuel Leakage Checking & Repair Enter your package 1 Do you want to select any other package ? Yes Enter your package 2 Do you want to select any other package ? No The service cost is Rs.2700.00 Sample Input and Output 2: Enter the model of the bike Pulsar Select the service type 1.Regular 2.Additional Additional The service regular package 1.Air Filter Cleaning 2.Battery Check Up and Distilled Water Top-Up 3.Electrical Checking & Repair 4.Lights Checkup & Repair 5.Chain Adjustment & Cleaning 6.Handle Play Adjustment 7.Tightening Of Blots ,Nuts,& Cylinder Head Checkup 8.Fuel Leakage Checking & Repair The additional service package 1.Engine Oil 2.Water Wash 3.Battery Recharge Enter your regular package 1 Enter your additional package 3 Do you want to select any other package ? Yes Enter your regular package 3 Enter your additional package 2 Do you want to select any other package ? No The service cost is Rs.2800.00   ------------------------QUESTION ENDS---------------   --------------TEMPLATES BELOW---------------   main.cpp #include #include #include #include "BikeService.cpp" using namespace std; int main() { //Fill your code here }   bikerservice.cpp #include using namespace std; class BikeService { private: string model; string packageType; public: void bikeService(string packagetype){ //Fill your code here } float bikeService(int regularPackage){ //Fill your code here } float bikeService(int regularPackage,int additionalPackage) { //Fill your code here } };

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

QUESTION PROVIDED BELOW KINDLY SEE. PROVIDE OUTPUT AS IT IS SHOWN IN QUESTION.

 

AND FOLLOW TEMPLATES PROVIDED AT END OF QUESTION CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , BikeService.cpp  )

Write a C++ program to display the packages and the service cost.

Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.

Note: Use function overloading concept.

Consider a class BikeService with the following private member variables.

Datatype Variable
string model
string packageType


Include the following methods in the class BikeService

Method Description
void bikeService(string packagetype) This method displays the available service based on the type of the package
(either regular or additional).
Note: If the package type is 1, display all the services corresponding to the regular package.
If the package type is 2, display all the services corresponding to both the regular package
and the additional package.
float bikeService(int regularPackage) This method returns the service cost for the specified regular package.
If the user desires to buy more than one package,
then the service cost is the total of all selected package’s costs.
float bikeService(int regularPackage,int addtionalPackage) This method returns the service cost for the specified regular package and
additional package. If the user desires to buy more than one package,
then the service cost is the total of all selected package’s costs.


The service package and their cost are as follows:

The service for regular packages are
           – Air Filter Cleaning – Rs. 1500
           – Battery Check-Up and Distilled Water Top-Up – Rs. 1200
           – Electrical Checking & Repair – Rs. 600
           – Lights Checkup & Repair – Rs. 700
           – Chain Adjustment & Cleaning – Rs. 400
           – Handle Play Adjustment – Rs. 1000
           – Tightening Of Bolts, Nuts,& Cylinder Head Checkup – Rs. 500
           – Fuel Leakage Checking & Repair –Rs. 900

The service for additional packages are
           – Engine Oil – Rs. 500
           – Water Wash – Rs. 400
           – Battery Recharge – Rs. 300

In the main method get the inputs from the user and test the above class.

Input and Output Format:

Refer sample input and output for formatting specifications.
All double values should be displayed correctly in two decimal places.

[All text in bold corresponds to input and the rest corresponds to output]
Sample Input and Output 1:

Enter the model of the bike
RoyalEnfield
Select the service type
1.Regular
2.Additional
Regular
The service regular package
1.Air Filter Cleaning
2.Battery Check Up and Distilled Water Top-Up
3.Electrical Checking & Repair
4.Lights Checkup & Repair
5.Chain Adjustment & Cleaning
6.Handle Play Adjustment
7.Tightening Of Blots ,Nuts,& Cylinder Head Checkup
8.Fuel Leakage Checking & Repair
Enter your package
1
Do you want to select any other package ?
Yes
Enter your package
2
Do you want to select any other package ?
No
The service cost is Rs.2700.00

Sample Input and Output 2:

Enter the model of the bike
Pulsar
Select the service type
1.Regular
2.Additional
Additional
The service regular package
1.Air Filter Cleaning
2.Battery Check Up and Distilled Water Top-Up
3.Electrical Checking & Repair
4.Lights Checkup & Repair
5.Chain Adjustment & Cleaning
6.Handle Play Adjustment
7.Tightening Of Blots ,Nuts,& Cylinder Head Checkup
8.Fuel Leakage Checking & Repair
The additional service package
1.Engine Oil
2.Water Wash
3.Battery Recharge
Enter your regular package
1
Enter your additional package
3
Do you want to select any other package ?
Yes
Enter your regular package
3
Enter your additional package
2
Do you want to select any other package ?
No
The service cost is Rs.2800.00
 

------------------------QUESTION ENDS---------------

 

--------------TEMPLATES BELOW---------------

 

main.cpp

#include<cstring>
#include<iostream>
#include<string>
#include "BikeService.cpp"
using namespace std;
int main()
{
//Fill your code here
}

 

bikerservice.cpp

#include<iostream>
using namespace std;

class BikeService
{
private:
string model;
string packageType;

public:
void bikeService(string packagetype){
//Fill your code here
}

float bikeService(int regularPackage){
//Fill your code here
}

float bikeService(int regularPackage,int additionalPackage)
{
//Fill your code here
}
};

Expert Solution
steps

Step by step

Solved in 5 steps with 6 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education