Need help making a java program that calculates a parking fee based of the type of vehicle and how long it has been in the parking lot
Car $0.00/hour first 3 hours $1.50/hour after the first 3 hours
Truck $1.00/hour first 2 hours $2.50/hour after the first 2 hours
Bus $2.00/hour first hour $3.75/hour after the first hour
so far
I did this way 2 class pembaca.class and menuA.class
in menuA.class which is main()
import java.io.*;
class menuA
{
public static void main(String[
{
char menu;
int hourin=0, minutin=0, hourout=0, minutout=0;
Pembaca read = new Pembaca();
System.out.println(
System.out.print(
+"input c for car\n"
+"input t for Truck\n"
+"Type of Vehicle? =");
menu =' ';
menu = read.bacaChar(
while((menu!
{
System.out.print(
menu = read.bacaChar(
}
System.out.println(
hourin = read.bacaInt(
if( (hourin <0) && (hourin > 24) )
{
System.out.println(
input?");
hourin = read.bacaInt(
}
System.out.println(
minutin = read.bacaInt(
if ( ( minutin < 0) && ( minutin > 60) )
{
System.out.println(
minutin=read.
}
System.out.println(
hourout = read.bacaInt(
}
if ( ( hourout < 0) && (hourout > 23) )
{
System.out.println(
hourout = read.bacaInt(
}
if (hourout < hourin)
{
System.out.println(
hourout = read.bacaInt(
}
System.out.println(
minutout = read.bacaInt(
if( (minutout < 0) && ( minutout > 60 ) )
{
System.out.println(
minutout = read.bacaInt(
}
int timeh = hourout - hourin;
int timem = minutin - minutout;
System.out.print(
System.out.print(
System.out.print(
System.out.print(
System.out.print(
System.out.print(
System.out.print(
System.out.print(
System.out.print(
System.out.print(
}
} //main
} //class
please advise
the error..
C:\Users\ahazman\
if ( ( hourout < 0) && (hourout > 23) )
^
C:\Users\ahazman\
if ( ( hourout < 0) && (hourout > 23) )
^
C:\Users\ahazman\
if ( ( hourout < 0) && (hourout > 23) )
^
C:\Users\ahazman\
if (hourout < hourin)
^
C:\Users\ahazman\
if (hourout < hourin)
^
C:\Users\ahazman\
System.out.println(
^
C:\Users\ahazman\
System.out.println(
^
C:\Users\ahazman\
minutout = read.bacaInt(
^
C:\Users\ahazman\
if( (minutout < 0) && ( minutout > 60 ) )
^
C:\Users\ahazman\
if( (minutout < 0) && ( minutout > 60 ) )
^
C:\Users\ahazman\
if( (minutout < 0) && ( minutout > 60 ) )
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
System.out.print(
^
C:\Users\ahazman\
} //main
^
32 errors
Process completed.
even though system still can run... what is wrong?
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
No comments:
Post a Comment