BTC USD 76,674.9 Gold USD 4,348.36
Time now: Jun 1, 12:00 AM

java ada 6 error..ada spe2 bley tlong

ayie_523

Fun Poster
Messages
250
Joined
Oct 8, 2013
Messages
250
Reaction score
38
Points
20
import java.io.*;
import java.util.scanner;

abstract class Customer
{
String name;
public abstract void booking();
**

class CustomerID extends Customer
{
int ID;
public CustomerID(String n, String id)
{
name=n;
ID=id;
**
public void booking()
{
System.out.println("\nDear: " +name);
System.out.println("\nYour Id: " +id);
System.out.println("\nWelcome to booking System");
**
**

public class BookingSystem
{
public static void main(String args[])throws IOException
{
Scanner read=new Scanner(System.in);
int select=0;
int choice=0;
int user=1;
do{
bookmenu();
do{
try{
final int SIZE=6;
final int SIZE2=4;
String[][] seat=new String[SIZE][SIZE2];
for(int i=0;i<6;i++)
{
seat[0]="A";
seat[1]="B";
seat[2]="C";
**
for(int i=0;i<6;i++)
{
System.out.println(i+1);
for(int j=0;j<3;j++)
{
System.out.println(" " +seat[j]);
**
System.out.println();
**
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter seat(A, B, C ):");
String col=br.readLine();
System.out.print("Enter your no: ");
String row=br.readLine();
for(int i=0;i<6;i++)
{
System.out.print(i+1);
for(int j=0;j<3;j++)
{
System.out.print(" "+seat[j]);
**
System.out.println();
**
do{
try {
System.out.println("\nWould you like another transaction?");
System.out.println("\n Press[1] Yes \n Press[2]No");
System.out.println("\nEnter Choice:");
choice=read.nextInt();
if(choice>2)
{
System.out.println("\nPlease select the correct Choice.");
**
**
catch(Exception e)
{
System.out.printn("\tError Input! Please select a number only.");
read=new Scanner(System.in);
System.out.println("\tEnter your Choice.");
choice=read.nextInt();
**
**while(choice<=1);
System.out.println("\n\t Thank you for using this simple program.");
user++;
**
**while (user<=5);

public void bookmenu()
{
String Cus;
int ids;
Scanner read=new Scanner(System.in);
System.out.println("Enter your name");
Cus=read.nextLine();
System.out.println("Enter your ID:");
ids=read.nextInt();
Customer cs=new CustomerID(Cus,ids);
cs.booking();
**
**
**
**
 
Cuba terangkan code ini untuk execute apa?

Insyallah ramai pakar2 disini boleh bantu...

Tapi kalau maklumat tak cukup, kami apa2 pon xleh bantu..
 
untuk buat sistem booking...yang simbol ** tu sebenarnya simbol **..bila upload at sni trus jadi cam ny..
 
pakai jdk6 je....

ny error yg kuar>>

BookingSystem.java:37: 'try' without 'catch' or 'finally'
try{
^
BookingSystem.java:94: illegal start of expression
public void bookmenu()
^
BookingSystem.java:94: illegal start of expression
public void bookmenu()
^
BookingSystem.java:94: ';' expected
public void bookmenu()
^
BookingSystem.java:106: while expected
**
^
BookingSystem.java:108: illegal start of expression
**→
^
BookingSystem.java:108: reached end of file while parsing
**→
^
7 errors
 
Back
Top
Log in Register