I'm fairly new at this and was wondering, how do I make programs like this interactive? also, is there a way to cut down on a code (like with a method or something)?
thanks!
Before we begin, please follow conventions. This is wrong:
Classes have to be upper-cased, like this:
Car toyota = new Car(...);
maybe rename your classes and files to reflect this :)
read this
A method would be great, define a method on the class Car, like this:
Car
String printData() { System.out.println("its max speed is: " + getSpeed()); ... }
@Coder100 wow, thanks! I'm relatively (cough, very) new at this, so I wasn't totally clear on conventions. Thanks again!
np! and the conventions habits are best made early :) @pibinary
@Coder100 yeah! thanks again for the help! ;)
Before we begin, please follow conventions.
This is wrong:
Classes have to be upper-cased, like this:
maybe rename your classes and files to reflect this :)
1. The easiest way is to use input
read this
2. Yes
A method would be great, define a method on the class
Car
, like this:@Coder100 wow, thanks! I'm relatively (cough, very) new at this, so I wasn't totally clear on conventions. Thanks again!
np! and the conventions habits are best made early :) @pibinary
@Coder100 yeah! thanks again for the help! ;)