Results 1 to 3 of 3
  1. #1
    silverspoon34 is offline Member
    Join Date
    Nov 2009
    Rep Power

    Default unclear what i missing-SOLVED

    hey peops wonder if someone can help getting cant find symbol - constructor Taxi but as far as i can see it there it will prob be a semi colon or bracket missing but i cant see it i have attached the code which is not complete but should be fine for section concerned and also the code for the taxi class hope someone can shed light on it.
    Java Code:
    import java.util.Scanner;
    class C22TaxisP2
        //main taxis menu
        //Menu method
        public static String getMenuOpt()
           Scanner input = new Scanner(;
           String option="0";
           System.out.println("C22 Taxis Main Menu");
           System.out.println("1.add Taxi Details.");
           System.out.println("2.add Journey Details.");
           System.out.println("3.Change Taxi Details.");
           System.out.println("4.Change Journey Details.");
           System.out.println("5.list all or single Taxi Details");
           System.out.println("6.list all or Single Journey ");
            option =;
            return option;
        //get all taxis method
        public static void listTaxis(Taxi taxis[], int taxisInRanks)
            int count=0;
            for(count=0; count< taxisInRanks; count++)
            //System.out.println("Listing Taxis..." + count);
                System.out.print(taxis[count].getNo()+" ");
                System.out.print(taxis[count].getReg()+" ");
                System.out.print(taxis[count].getSeats()+" ");
                System.out.print(taxis[count].getServ()+" ");
                System.out.print(taxis[count].getLoco()+" ");
        //get all Journeys method
        public static void listJourney(Journey journeys[], int journeysBooked)
            int count=0;
            for(count=0; count< journeysBooked; count++)
            //System.out.println("Listing Journeys..." + count);
                System.out.print(journeys[count].getDate()+" ");
                System.out.print(journeys[count].getTaxiNo()+" ");
                System.out.print(journeys[count].getDriver()+" ");
                System.out.print(journeys[count].getPax()+" ");
                System.out.println(journeys[count].getFrom()+" ");
                System.out.println(journeys[count].getTo()+" ");
                System.out.println(journeys[count].getCost()+" ");
        public static void main(String [] args)
           Scanner input = new Scanner(;
           Taxi taxis[] = new Taxi[10];//array to store 10 taxi details
           int taxisInRank =0;
           String TaxiNo, TaxiReg, TaxiServ, TaxiLoco;
           String TaxiSeats="0";
           String choice="0";
           Journey journeys[] = new Journey[10];//array of 10 journeys
           int journeysBooked = 0;
           String journeyDriver, journeyFrom, journeyTo;
           String journeyDate="0";
           String journeyTaxiNo="0";
           String journeyPax="0";
           String journeyCost="0";
           //call the menu
           choice = getMenuOpt();
           //get book details
           System.out.print("Enter the Taxi Number. ");
           TaxiNo =;
           System.out.print("Enter the Taxi Registration(without spaces) ");
           TaxiReg =;
           System.out.print("Is this taxi in service(Y/N) ");
           TaxiServ =;
           System.out.print("Enter the Taxi Location. ");
           TaxiLoco =;
           //creat a new object called taxi 1 based on the taxi class
           taxis[taxisInRank] = new Taxi(TaxiNo, TaxiReg, TaxiServ, TaxiLoco);
           System.out.println("Taxi object created");
           //get Video details
           System.out.print("Enter the title for the Video ");
           videoTitle =;
           System.out.print("Enter the subject for the Video ");
           videoSubject =;
           System.out.print("Enter the date YYYY for the video ");
           videoPubDate =;
           System.out.print("Enter the author for the video ");
           videoDirector =;
           System.out.print("Enter the catalogue number for the video ");
           catNumber =;
           //creat a new object called video 1 based on the video class
           videos[videosInLibrary] = new Video(videoTitle, videoSubject, videoPubDate, videoDirector, catNumber);
           System.out.print("Video object created");
            System.out.println("List books here...");
            listBooks(books, booksInLibrary);
            System.out.println("list videos here...");
            listVideos(videos, videosInLibrary);
            System.out.println("Bad Choice, Chose 1,2,3,4 or 0");
        choice = getMenuOpt();
        //choice 0
    and the taxi class code which compiles ok

    Java Code:
    //Taxi class
    class Taxi
    private String No;
    private String Reg;
    private String Seats;
    private String Serv;
    private String Loco;
    Taxi (String n, String r, String s, String ser, String l)
        No = n;
        Reg = r;
        Seats = s;
        Serv = ser;
        Loco = l;
    //method to get title and date
    String getNo()
        return No;
    String getReg()
        return Reg;
    String getSeats()
        return Seats;
    String getServ()
        return Serv;
    String getLoco()
        return Loco;
    thanks in advance
    Last edited by silverspoon34; 04-13-2011 at 08:12 PM. Reason: solved

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power


    Your Taxy class has a constructor that takes five Strings, not four.

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

  3. #3
    silverspoon34 is offline Member
    Join Date
    Nov 2009
    Rep Power

    Default unclear what i missing

    oh yeah think i have spent so many hours typing this that it time to put it away for day before making silly mistakes

Similar Threads

  1. method unclear
    By marie in forum New To Java
    Replies: 0
    Last Post: 03-21-2010, 01:57 PM
  2. Help; Missing JButtons
    By Cyprusice in forum New To Java
    Replies: 3
    Last Post: 01-10-2010, 11:50 PM
  3. Missing Elements
    By princess in forum NetBeans
    Replies: 1
    Last Post: 10-29-2008, 11:51 PM
  4. Unclear Requirement from client ... Ring a bell?
    By galford23 in forum New To Java
    Replies: 7
    Last Post: 01-08-2008, 05:31 AM
  5. is it bug? or am i missing a point?
    By blowguy in forum Threads and Synchronization
    Replies: 1
    Last Post: 11-20-2007, 06:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts