I have an assignment doing a constructor that accelerates and brakes the speed of the car (among other non-troublesome things) but when I run the program, the speed stays constant and spits out whatever the original number is rather than raising and lowering by 5 like I want it to. I will be eternally grateful to whomever can help me see the error of my ways
rainmaker42
0
Newbie Poster
Recommended Answers
Jump to PostTo me, you have too many speed variables. When you created the new Car in line 39 you passed in the initial speed but I see what looks to be some error in thinking as you have speed in your main, another in your class Car.
So at line …
All 3 Replies
rainmaker42
0
Newbie Poster
rproffitt
2,565
"Nothing to see here."
Moderator
rainmaker42
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.