Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 533 results for
brake
- Page 1
What Do I need to do?
Programming
Software Development
13 Years Ago
by akase2010
…, int); string getMake(); int getModel(); int getSpeed(); void Accelerate(); void
Brake
(); void displayMenu(); }; Car::Car(int YearofModel, string Makeby, int Spd…': cout << "You have choosen to push the
brake
."; first.
Brake
(); break; } } } }while (toupper(choice) != 'C'); return 0; } [/…
Car class and Constructor
Programming
Software Development
12 Years Ago
by mags11
… time it is called. -
brake
. The
brake
method should subtract 5 from the…speed; } public void accelerate() { speed += 5; } public void
brake
() { speed -= 5; } } [/CODE] [CODE] // CarDemo.…c.getMake() + "\n is going " + s(
brake
)); } // other code to accelerate or decelerate { Car c …
Re: Python Homework Program
Programming
Software Development
14 Years Ago
by shavais
…method called methods, which takes three parameters: accelerate,
brake
, and get_speed. I'm not sure where you'…Car class 3 methods, one called Accelerate, another called
Brake
, and another called Get_speed. When you say self.…this, of course). Similarly,
brake
,
brake
is not correct. It should be jeremy.
brake
(), and
brake
should be a method of…
Re: Car Class with constructors and accessors
Programming
Software Development
14 Years Ago
by mandofl
… int getModel(); int getSpeed(); void Accelerate(); void
Brake
(); void displayMenu(); }; Car::Car(int YearofModel, string…quot;You have choosen to push the
brake
."; cout <<
Brake
(first) << endl; break… 'Accelerate': identifier not found : error C3861: '
Brake
': identifier not found : fatal error C1075: end of…
Why Won't This Work?
Programming
Software Development
13 Years Ago
by akase2010
…getMake(); int getModel(); int getSpeed(); void Accelerate(); void
Brake
(); void displayMenu(); }; Car::Car(int YearofModel, string Makeby…drop the speed of the car by 5. void Car::
Brake
() { Speed = Speed - 5; } void displayMenu() …; "You have choosen to push the
brake
."; cout <<
Brake
(first) << endl; break; }…
Re: Python Homework Program
Programming
Software Development
14 Years Ago
by the_mia_team
….get_speed() print "mph" print "" jeremy.
brake
() jeremy.
brake
() print "---------------------------" print "The truck brakes twice!"…
Re: What Do I need to do?
Programming
Software Development
13 Years Ago
by rxlim
The assignment says "get the current speed of the car and display it". You do not! So.. you should display the speed of the car when you accelerate and
brake
.
Re: What Do I need to do?
Programming
Software Development
13 Years Ago
by akase2010
[QUOTE=rxlim;1469565]The assignment says "get the current speed of the car and display it". You do not! So.. you should display the speed of the car when you accelerate and
brake
.[/QUOTE] I cant get it to do that, ive tried and can figure it out. it always says speed 0
Re: What Do I need to do?
Programming
Software Development
13 Years Ago
by rxlim
If you print out first.getSpeed() after you have called accelerate and
brake
it should work. Maybe you are using the local variable Speed (which is 0).
Re: Car class and Constructor
Programming
Software Development
12 Years Ago
by mags11
… main(String[] args) { int speed = 0; int accelerate = 5; int
brake
= 5; Car car = new Car(2012, "Mercedes-Benz S55….println("The car's current speed is " + (speed*
brake
)); } } }[/CODE]
Re: Car class and Constructor
Programming
Software Development
12 Years Ago
by mags11
… main(String[] args) { int speed = 0; int accelerate = 5; int
brake
= 0; Car car = new Car(2012, "Mercedes-Benz S55….println("The car's current speed is " + (speed-
brake
)); } } }[/CODE] The output is: The 2012 Mercedes-Benz S55 …
Re: QUESTION: A CAR Class
Programming
Software Development
10 Years Ago
by noorullah06
…, int); string getMake(); int getModel(); int getSpeed(); void Accelerate(); void
Brake
(); void displayMenu(); }; Car::Car(int YearofModel, string Makeby, int Spd… drop the speed of the car by 5. void Car::
Brake
() { Speed = Speed - 5; } void displayMenu() { cout <<"\n…
Problem in python!! Only one error
Programming
Software Development
15 Years Ago
by rampalli.sarma
…# Variable value def setPhase(TLID, state): [phase,
brake
, yellow] = state _message.queue.append(CMD_CHANGETLSTATE) _message.…TLID)+1+4+4+len(phase)+4+len(
brake
)+4+len(yellow), CMD_CHANGETLSTATE, TLSTATE, len(…_message.string += struct.pack("!i", len(
brake
)) +
brake
_message.string += struct.pack("!i", len…
Car Class with constructors and accessors
Programming
Software Development
14 Years Ago
by mandofl
…to the speed member variable each time it is called.
brake
- subtract 5 from speed each time it is called. …and display it. Then call the
brake
function five times after each call to the
brake
fuction, get the current speed. …the function or should i just automatically call accelerate and
brake
i thought about it to much that i confused …
Re: Car Class with constructors and accessors
Programming
Software Development
14 Years Ago
by mrnutty
…;< "You have choosen to push the
brake
."; cout <<
Brake
(first) << endl; break; } }while (toupper(choice… the member to call the function Accelerate,and
brake
, like so first.Accelerate(...), first.
brake
(...), and also you are missing a bracket…
basic use of classes
Programming
Software Development
14 Years Ago
by asa88
…the speed. cout << "Braking...\n"; porsche.
brake
(); cout << "Current speed: " <<…return Speed; } int accelerate() { getSpeed(); return Speed=Speed+5; } int
brake
() { getSpeed(); return Speed=Speed-5; } }; #endif[/CODE] i am using…
Java Car Class problem
Programming
Software Development
13 Years Ago
by Nikki_77
… 5 to the speed field each time it is called
Brake
. The
brake
method should subtract 5 from the sped field each… and display it. Then call the
brake
method five times. After each call to the
brake
method, get the current speed of…
Re: Why Won't This Work?
Programming
Software Development
13 Years Ago
by akase2010
… to the speed member variable each time it is called.
brake
- subtract 5 from speed each time it is called. Demonstrate… and display it. Then call the
brake
function five times after each call to the
brake
fuction, get the current speed. of…
Re: Car class and Constructor
Programming
Software Development
12 Years Ago
by JamesCherrill
You are multiplying the speed by accel/
brake
when you should be adding/subtracting. Since the speed starts as zero, when you multiply or divide by anything you still get zero.
QUESTION: A CAR Class
Programming
Software Development
10 Years Ago
by noorullah06
… the speed member variable each time it is called.
brake
. The
brake
function should subtract 5 from the speed member variable each… and display it. Then, call the
brake
function five times. After each call to the
brake
function, get the current speed of…
Upload image in to the database
Programming
Web Development
6 Years Ago
by Anthony_22
…Wheels']; $Colour = $_POST['Colour']; $Number = $_POST['Gears']; $
Brake
= $_POST['Brakes']; $Suspension = $_POST['Suspension']; $Gender = $…Brand', '$Model', '$Type', '$Wheel', '$Colour', '$Number', '$
Brake
', '$Suspension', '$Gender', '$Age', '$Additional')"; if(!mysqli_query($…
Re: classes in c++ programming help?
Programming
Software Development
14 Years Ago
by lolaabbydawn128
…); string getMake(); int getModel(); int getSpeed(); void accelerate(); void
brake
(); }; car::car(int yearModelin, string makein, int speed) {…; } void car::accelerate(){ speed= speed+5; } void car::
brake
(){ speed = speed-5; } int main(){ int speed = 115… i = 0; i < 5; i++){ car1.
brake
(); cout<<car1.getSpeed()<<endl;; } return…
Re: car class direction
Programming
Software Development
13 Years Ago
by slvrmoon32
…method by using the *methods to accelerate and
brake
methods. * * @author * @version 1.… 5; mSpeed = speed; return mSpeed; } public double
brake
() {
brake
-= 5; return mSpeed; } public static void main(String…
classes in c++ programming help?
Programming
Software Development
14 Years Ago
by lolaabbydawn128
…, string); string getMake(); int getModel(); int getSpeed(); int accelerate(); int
brake
() int make(); }; car::car(int yearModelin, string makein) { yearModel= yearModelin…(); { return speed; } int car::accelerate(); { speed= speed+5; } int car::
brake
(); { speed=speed-5; } } int main() { car, car1 (1999, Honda); for…
Re: Python Homework Program
Programming
Software Development
14 Years Ago
by the_mia_team
… self.make = make self.speed = 0 def methods(self, accelerate,
brake
, get_speed): """ """ self.accelerate =….speed == 0: accelerate, accelerate; print speed if speed == 10:
brake
,
brake
; print speed print "Car Info: " print "model…
Re: Python Homework Program
Programming
Software Development
14 Years Ago
by jcao219
… self.speed = speed def accelerate(self): self.speed += 5 def
brake
(self): self.speed -= 5 def get_speed(self): return self.speed… it twice, and break it twice #EDIT: I mean "
brake
" not break :) jeremy.accelerate() jeremy.accelerate() print jeremy.get_speed…
Constructor error help
Programming
Software Development
14 Years Ago
by BuhRock
… speed field everytime its called. and a method called
brake
that declines 5 everytime its called. It says I… each call display the speed of it, then call
brake
5 times and display the speed after each call. …accelerate(int s) { s = s + 5; return s; } public int
brake
(int b) { b = b - 5; return b; } }[/code] …
Re: Constructor error help
Programming
Software Development
14 Years Ago
by vchandra
… speed field everytime its called. and a method called
brake
that declines 5 everytime its called. It says I… each call display the speed of it, then call
brake
5 times and display the speed after each call. …accelerate(int s) { s = s + 5; return s; } public int
brake
(int b) { b = b - 5; return b; } }[/code] …
Re: QUESTION: A CAR Class
Programming
Software Development
10 Years Ago
by skyyadav
…int getSpeed() { return speed_; } void Accelerate() { speed_ +=5; } void
Brake
() { speed_ -= 5; } }; #endif Car.cpp #include <iostream>…int i=0 ; i < 5; ++i) { c.
Brake
(); cout << c.getSpeed() << endl; } }
Re: Java Car Class problem
Programming
Software Development
9 Years Ago
by Gary_5
…int x = 0; x < 5; x++){ car1.
brake
(); System.out.println("The " + (car1.getMake…public void accelerate(){ speed = speed + 5; } public void
brake
(){ speed = speed - 5; } public String getMake(){ return make…
1
2
3
9
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC