Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I NEED HELP TO DRAW UML ACTIVITY DIAGRAM OR FLOW CHART ABOUT THIS PROBLEM TO DESIGN AND THE CODE TO RUN-PROGRAM PLEASE!!!! Problem4 (40 points):
I NEED HELP TO DRAW UML ACTIVITY DIAGRAM OR FLOW CHART ABOUT THIS PROBLEM TO DESIGN AND THE CODE TO RUN-PROGRAM PLEASE!!!!
Problem4 (40 points): YourCar Problem. (Problem-solving process IS required, Please use UML activity diagram and UML class diagram for your design.) Descripton: I would like you to create two new classes "YourCar" and "YourCarTrip" that will help you calculate the total distance from one point (point A) to a second point (point B), how long it will take you to get there, and if you need gas for the return trip. YourCarTrip is the application. Example: Depart UHCL (point A), take a left on to Bay Area Boulevard for 3.5 miles at 30 MPH, take a left onto 145 South for 26.3 miles at 65 MPH, exit right onto 61st street, go 2.0 miles to Stewart Drive, take a right and go 4.3 miles at 45 MPH to your destination on the right (point B). ourCar should define, at least, the instance variables that hold the number of gallons in the tank (must be input at some point), the number of miles in the trip (starts at zero), current speed (starts at zero. YourCar should also be able to change direction, change speed (increase, decrease), and determine if you need gas. Needs gas, implies you will need to calculate your fuel consumption, so assume your car averages 25 MPG at any speed. I would like you to run two different YourCar objects at the same time to see if it is worth the time to go ten miles over the speed limit. so, your application should output, the route (changes in course), the total distance, the total time, and fuel consumption. Hint: you can assume you know the following information. 1) the number of road segment 2) for each road segment, you have information of speed limit, length of the road segment, direction that the car is heading, the name of the road. Problem4 (40 points): YourCar Problem. (Problem-solving process IS required, Please use UML activity diagram and UML class diagram for your design.) Descripton: I would like you to create two new classes "YourCar" and "YourCarTrip" that will help you calculate the total distance from one point (point A) to a second point (point B), how long it will take you to get there, and if you need gas for the return trip. YourCarTrip is the application. Example: Depart UHCL (point A), take a left on to Bay Area Boulevard for 3.5 miles at 30 MPH, take a left onto 145 South for 26.3 miles at 65 MPH, exit right onto 61st street, go 2.0 miles to Stewart Drive, take a right and go 4.3 miles at 45 MPH to your destination on the right (point B). ourCar should define, at least, the instance variables that hold the number of gallons in the tank (must be input at some point), the number of miles in the trip (starts at zero), current speed (starts at zero. YourCar should also be able to change direction, change speed (increase, decrease), and determine if you need gas. Needs gas, implies you will need to calculate your fuel consumption, so assume your car averages 25 MPG at any speed. I would like you to run two different YourCar objects at the same time to see if it is worth the time to go ten miles over the speed limit. so, your application should output, the route (changes in course), the total distance, the total time, and fuel consumption. Hint: you can assume you know the following information. 1) the number of road segment 2) for each road segment, you have information of speed limit, length of the road segment, direction that the car is heading, the name of the road
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started