CIS247C Project Week 5 of 7 – Hybrid Class – Vistual studio code, document and screenshot – Perfect Solution – Instant Delivery

Lab Price = $9
Please feel free to send us your queries at: [email protected]
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement

Project Week 5 of 7: Inheritance
SUMMARY
The objective this week is to enhance last week’s Vehicle class by creating the Hybrid class which inherits the Vehicle class. The Hybrid class has all the same attributes as the Vehicle class except it has an additional attribute to describe the range of the battery.
Download the instructions and grading rubric in files section or clicking here.
Required Software
Connect to the Lab here.Links to an external site.

STEP 1: Understand the UML Diagram

STEP 2: Create the Project
You will want to use the Week 4 project as the starting point. To do this, you will want to create a new project by following these steps:
1. Create a new project and name it “CIS247C_Project5”.
2. Copy all the source files from the Week 4 project into the Week 5 project.
3. Before you move on to the next step, build and execute the Week 5 project.
STEP 3: Add the Hybrid Class
• Referring to the UML Class diagram, create the Hybrid class, ensuring to specify that the Hybrid class inherited from the Vehicle class.
• For each of the constructors listed in the Hybrid class, invoke the appropriate base class constructor and pass the correct arguments.
• Override the displayVehicle() to display the range of the Hybrid Vehicle.
STEP 4: Modify the Vehicle Class
• With the exception of the static integer, change the attributes from private to protected.
STEP 5: Modify the main function
Create code statements that perform the following operations. Note that several of the steps below were accomplished in last week’s assignment. New steps are in bold.
1. Using your code from Week 1, display a divider that contains the string “Start Program”.
2. Update and call the DisplayApplicationInformation function.
3. Using your code from Week 1, display a divider that contains the string “Vehicle 1”
4. Create a Vehicle object using the default constructor.
5. Prompt for and then set year and mpg using the overloaded setters from week 3 that accepts strings.
6. Create a Warranty object called warranty1 using the default constructor.
7. Prompt for and set number of years and number of miles. **Make sure to convert the return data type of the GetInput() function from a string to an integer**
Ex: warranty1.setMiles(atoi(GetInput(“number of miles”).c_str()));
8. Display the Vehicle Information.
9. Using your code from Week 1, display a divider that contains the string “Vehicle 2”
10. Create a Warranty object called warranty2 using the multi-argument constructor. You can set the number of years as 6 and number of miles as 70000.
11. Create another second Vehicle object using the multi-argument constructor, setting each of the attributes with the following values: “Cadillac”, 2017, 26.5 , warranty2
12. Create a third object by copying the second object.
13. Delete the third object by calling the destructor method.
14. Using your code from Week 1, display a divider that contains the string “Vehicle 3”
15. Create another Warranty object called warranty3 using the using the multi-argument constructor. You can set the number of years as 5 and number of miles as 60000.
16. Create a Hybrid object using the multi-argument constructor, setting each of the attributes with the following values: (570, “Toyota”, 2017, 52,warranty3). **Note that 570 is the range, Toyota is the make of the car, 2017 is the year, and 52 is the mpg.**
17. Display the Hybrid Vehicle information.
18. Display the number of vehicles created using getNumVehicles. Remember to access getNumVehicles using the class name, not the Vehicle object.
19. Update and call the TerminateApplication function.
STEP 6: Compile and Test
When done, compile and run your code.
Then, debug any errors until your code is error-free.
Check your output to ensure that you have the desired output, modify your code as necessary, and rebuild.
STEP 7: Screenshots
• Capture a screenshot of your working code and paste into a Word document.
• Capture a screenshot of your group meeting/discussion and paste in the same Word document.
STEP 8: Submit Deliverables
• Put all of the Visual Studio Project files into a zip file.
• Upload the zip file and screenshots (Word document).
• Please include the names of all participating team members in word document.
• Only one submission is required for the entire group.

CIS247C Week 5 Project Overview

The objective this week is to enhance last week’s Vehicle class by creating the Hybrid class which inherits the Vehicle class. The Hybrid class has all the same attributes as the Vehicle class except it has an additional attribute to describe the range of the battery.

In the Hybrid class complete the following steps:
• Referring to the UML Class diagram, create the Hybrid class, ensuring to specify that the Hybrid class inherited from the Vehicle class.
• For each of the constructors listed in the Hybrid class, invoke the appropriate base class constructor and pass the correct arguments.
• Override the displayVehicle() to display the range of the Hybrid Vehicle.

In the Warranty class:
• No change.

In the Vehicle class:
• With the exception of the static integer, change the attributes from private to protected.

In the main program:
Create code statements that perform the following operations. Note that several of the steps below were accomplished in last week’s assignment. New steps are in bold.
1. Using your code from Week 1, display a divider that contains the string “Start Program”.
2. Update and call the DisplayApplicationInformation function.
3. Using your code from Week 1, display a divider that contains the string “Vehicle 1”
4. Create a Vehicle object using the default constructor.
5. Prompt for and then set year and mpg using the overloaded setters from week 3 that accepts strings.
6. Create a Warranty object called warranty1 using the default constructor.
7. Prompt for and set number of years and number of miles. **Make sure to convert the return data type of the GetInput() function from a string to an integer**
Ex: warranty1.setMiles(atoi(GetInput(“number of miles”).c_str()));
8. Display the Vehicle Information.
9. Using your code from Week 1, display a divider that contains the string “Vehicle 2”
10. Create a Warranty object called warranty2 using the multi-argument constructor. You can set the number of years as 6 and number of miles as 70000.
11. Create another second Vehicle object using the multi-argument constructor, setting each of the attributes with the following values: “Cadillac”, 2017, 26.5 , warranty2
12. Create a third object by copying the second object.
13. Delete the third object by calling the destructor method.
14. Using your code from Week 1, display a divider that contains the string “Vehicle 3”
15. Create another Warranty object called warranty3 using the using the multi-argument constructor. You can set the number of years as 5 and number of miles as 60000
16. Create a Hybrid object using the multi-argument constructor, setting each of the attributes with the following values: (570, “Toyota”, 2017, 52, warranty3). **Note that 570 is the range, Toyota is the make of the car, 2017 is the year, and 52 is the mpg.**
17. Display the Hybrid Vehicle information.
18. Display the number of vehicles created using getNumVehicles. Remember to access getNumVehicles using the class name, not the Vehicle object.
19. Update and call the TerminateApplication function.

Grading Rubric

Compiles correctly 5
Modify Vehicle class 5
Create Hybrid class 15
Instantiate and display Hybrid object 15
Correctly formatted output 5
Screenshot 5
TOTAL 50

Steps
1. Review instructions and UML diagram.
2. Create a new project and name it “CIS247C_Project5”. Copy all the source files from the Week 4 project into the Week 5 project.
3. Compile and test the program to ensure there are no errors.
4. Capture screenshot of working code and paste into word document.
5. Submit zipped visual studio project and screenshot.

Refer to the following UML class diagram. No pseudocode is provided.

Relevant Material
Screenshots
Week 5: Course Proj Screenshot
Week 5: Course Proj Screenshot
Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at [email protected].
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at [email protected] and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at [email protected].
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on [email protected]
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.
Payment Details
Lab Price = $9
Please feel free to send us your queries at: [email protected]

Payment methods

Add to Cart

Buy Now

View Cart

Leave a Reply