is this what you mean by creating a local odometer and referring to o?
Odometer od = (Odometer)o;
Type: Posts; User: jslice3
is this what you mean by creating a local odometer and referring to o?
Odometer od = (Odometer)o;
Im modeling a car odometer, by making an odometer class, where when the user makes a new odometer(n), n is the number of counters shown. for instance an odometer(6) would be 000000 and the be...
my input file is ten 20s, five 50s, five 60s, one 20, five 30s, and a 0 in a row
but my output is
(1 * 50)
(1 * 60)
(1 * 20)
(1 * 30)
(0)
ive read over my code multiple times and still dont...
oh yeah I did, and am still working on it, i was just trying to get a visual layout of what you were saying
so something like this?
import java.util.*;
import java.io.*;
public class Proj57015 {
public static void main (String [] args) throws FileNotFoundException{
sorry, i was wondering why that wasnt working, it said to do that in the "announcements - read if its your first time"
import java.util.*;
import java.io.*;
public class Proj57015 {
...
ok that makes sense, but then how would i go about assigning the next number of a sequence if i cant call .nextInt again?
so i need the program to read a file with a list of ints, if there are consecutive equal numbers, such as 10 20 20 20 20 30 30 ... 0, the output should be
(1 * 10)
(4 * 20)
(2 * 30)
etc, and it...
so i need the program to read a file with a list of ints, if there are consecutive equal numbers, such as 10 20 20 20 20 30 30 ... 0, the output should be
(1 * 10)
(4 * 20)
(2 * 30)
etc, and it...