CIS247C Project Week 2 of 7 – Vehicle Class – Fully commented code with screenshots – Perfect Solution – Instant Delivery

Lab Price = $9
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement

CIS247C Week 2 Project Overview

This program will use the Vehicle class to prompt the user for vehicle information, gather information about the attributes, and display the results. In this program, you will create two files. The first is the Vehicle class using the provided UML Class Diagram and the second is the main program.

In the Vehicle class complete the following steps:
1. The default constructor should set the attributes as follows: make = “unknown”, year = 0, and mileage = 0.
2. The multi-argument constructor should initialize all of the attributes using values passed in using its parameter list as Cadillac, 2017, 26.5
3. As shown in the UML Class diagram, each attribute should have a “getter” to retrieve the stored attribute value, and a “setter” that modifies the value.
4. The displayVehicle() method should display all the attributes of the Vehicle object in a well-formatted string with logical labels applied to each attribute.

In the main program complete the following steps:
1. Create a Vehicle object using the default constructor.
2. Prompt for and then set the make, year, and mileage. (Remember that you have to convert year and mileage from strings to the appropriate data type.)
3. Using your code from last week, display a divider that contains the string “Vehicle 1”
4. Display Vehicle 1 information for the first Vehicle object.
5. Create a second Vehicle object using the multi-argument constructor, setting each of the attributes with appropriate valid values.
6. Using your code from last week, display a divider that contains the string “Vehicle 2”.
7. Display Vehicle 2 information for the second Vehicle object.

Grading Rubric

Compiles correctly 10
Vehicle class attributes 5
Constructors and destructor 5
displayVehicle method 5
get and set methods 5
main() with correct function calls and two objects instantiated of the vehicle class 10
Correctly formatted output 5
Screenshot 5
TOTAL 50

Steps
1. Review the pseudocode (included in document)
2. Construct the program based on the pseudocode.
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 code (or zipped visual studio project) and screenshot.

UML diagram for Vehicle.h

Vehicle
– make: string
– year: integer
– mpg: double
+Vehicle()
+Vehicle(string make, integer year, double mpg)
+~Vehicle()
+getMake
+getYear
+getMileage
+setMake
+setYear
+setMileage
+displayVehicle

Pseudocode for source.cpp

//Programmer: ALL TEAM MEMBERS NAMES
//CIS247C Week 2 Project
//Program Description: PROVIDE A DESCRIPTION OF THE PROGRAM

Include preprocessor directives

Include prototypes for functions

Start main
call DisplayDivider(“Start Program”)
call DisplayApplicationInformation
set inputString

instantiate Vehicle object with default constructor
call DisplayDivider(“Vehicle 1”)
set inputString = GetInput(“vehicle make”);
use dot operator for setMake
set inputString = GetInput(“vehicle year”);
use dot operator for setYear and convert input to integer
set inputString = GetInput(“vehicle gas mileage”);
use dot operator for setMileage convert input to double
output vehicle information

call DisplayDivider(“Vehicle 2”)
instantiate Vehicle object with constructor passing Cadillac, 2017, 26.5 as arguments
output vehicle information

call TerminateApplication
end main program

function DisplayApplicationInformation
display “Welcome to CIS247C Project”
display “This program uses the Vehicle class to prompt the user for vehicle information, gather information about the attributes, and display the results.”
end function

function DisplayDivider(string message)
display “**************** “ + message + “****************”
end function

function GetInput(string message)
string input
display “Enter the “ + message
get input
return input
end function

function TerminateApplication
display “End of CIS247C Project Application”
end function

Project Week 2 of 7: Vehicle Class
SUMMARY
We begin our investigation of object-oriented programming by creating an object-oriented program with a class called Vehicle. You will work with your team to create two objects based on the Vehicle class, along with a class that contains the main method. After you create the objects, you will prompt the user for information and then display it.
We will want to ensure that this first class is well-constructed and tested since we will extend this class in the following labs.
Download the instructions and grading rubric in files section or clicking here.
Required Software
Connect to the Lab here. (Links to an external site.)Links to an external site.
STEP 1: Understand the UML Class Diagram
Use the following UML diagram to build the class. The first section specifies the attributes. The second section specifies the behaviors, and the first character specifies the access modifier value, where:
• “-” means that the class member is private, and
• “+” means that the class member is public.

STEP 2: Code the Vehicle Class
1. Create a new project called “CIS247C_Project2”.
2. The default constructor should set the attributes as follows: make = “unknown”, year = 0, and mileage = 0.
3. The multi-argument constructor should initialize all of the attributes using values passed in using its parameter list as Cadillac, 2017, 26.5
4. As shown in the UML Class diagram, each attribute should have a “getter” to retrieve the stored attribute value, and a “setter” that modifies the value.
5. The displayVehicle() method should display all the attributes of the Vehicle object in a well-formatted string with logical labels applied to each attribute.
STEP 3: Code the Main Program
In the Main class, create code statements that perform the following operations. Be sure you follow proper commenting and programming styles (header, indentation, line spacing, etc.).
1. Create a Vehicle object using the default constructor.
2. Prompt for and then set the make, year, and mileage. (Remember that you have to convert year and mileage from strings to the appropriate data type.)
3. Using your code from last week, display a divider that contains the string “Vehicle 1”
4. Display Vehicle 1 information for the first Vehicle object.
5. Create a second Vehicle object using the multi-argument constructor, setting each of the attributes with appropriate valid values.
6. Using your code from last week, display a divider that contains the string “Vehicle 2”.
7. Display Vehicle 2 information for the second Vehicle object.
STEP 4: 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 5: 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 6: 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.

Relevant Material
Screenshots
Week 2: Course Proj Screenshot
Week 2: 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 support@iqrajavaid.com.
* 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 support@iqrajavaid.com 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 support@iqrajavaid.com.
* 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 support@iqrajavaid.com
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: support@iqrajavaid.com

Payment methods

Add to Cart

Buy Now

View Cart

Leave a Reply