Help with dealing with Error messages I keep getting

I am new to Java Programming and would appreciate some help please. I keep getting this errors each time I compile my program and I have no clue what to do about it.... can anyone help?
cannot find Symbol- method getChar()
Infact, I don't mind if someone will please take a look at this program I have written and basically critic it. thanks.
thanks
Java NewBie
public class Ticket
     private double ticketPrice;//price of the ticket
     private String ticketType;//Type of ticket this is
     private int ticketNumber;//ticket number
     private String feature;//features the ticket offers
     //Constructors
     public void Ticket()
          ticketPrice=10.00;
          ticketType="Basic";
          ticketNumber= 10000001;
          feature=" Ticket is void after one use";     
     public void Ticket(double tprice, String tType, int tnumber,String fTicket)
          ticketPrice=tprice;
          ticketType=tType;
          ticketNumber=tnumber;
          feature=fTicket;
     // Set Methods for the Class
     // reset the ticket price
     public void setTicketPrice(double price)
          ticketPrice = price;
     // set the type of ticket
     public void setType(String type)
          ticketType=type;
     // set the ticket number
     public void setTicketNumber(int numbero)
          ticketNumber=numbero;
     // save the features of the ticket
     public void setTicketFeature(String feat)
          feature = feat;
     // reset the ticket price
     // Get method for the Class
     //get the ticket price
     public double getTicketPrice()
          return ticketPrice;
     // get the type of ticket
     public String getType()
          return ticketType;
     // get the ticket number
     public int getTicketNumber()
          return ticketNumber;
     // get the features of the ticket
     public String getTicketFeature()
          return feature;
     //method to print out information about Ticket
     public void printTicketInfo()
          System.out.println(getTicketNumber()+" " getType()": $"+ getTicketPrice());
          System.out.printf("/n/nFeatures: /n",getTicketFeature());
}// end class Ticket
import java.util.*;
import java.io.*;
public class TicketSales
     //create Scanner to obtain input from command window
     //Scanner input= new Scanner(System.in);
     //create Ticket Objects for each Ticket type
     static Ticket premium = new Ticket();
     static Ticket choice= new Ticket();
     static Ticket basic= new Ticket();
     static Random generator1 = new Random(2000000);
     static int r = generator1.nextInt();
     //process money exchange
     //Varibles to help collect and process User choices
     double userTotalTicketCost;
     double Useramount;// Cost of Ticket User would like to purchase and amount of money user has
     double userChange;//calculated change user recieves back, if any
     static String userTicketChoice;//choice of ticket user would like to purchase
     static int numTickets;//number of tickets user would like to purchase
     // free variable for use
     static char x;
     //this method is designed to obtain Users ticket choice
     // where input obtain is a character stored in a variable x
     public static void getTicketChoice()
          //Select Ticket Type
          System.out.println("Please Select the type of Ticket you would like to purchase");
          System.out.println("Please enter A, B, or C");
          //print out the information for each of the ticket types
          //System.out.println("A. "+ premium.printTicketInfo());
          //System.out.println("/nB. "+ basic.printTicketInfo());
          //System.out.println("/nC. "+ choice.printTicketInfo());
          System.out.println("/nD. if you want to quit the transaction/n"+"/n");
          //call method to get user information and save the information as userTicketChoice
          selection();
          confirm();//confirm that User wants to go ahead with choice
     }//end getTicketChoice() method
     public static void selection()
     {// get and process user selection     
          //create Scanner to obtain input from command window
          Scanner input= new Scanner(System.in);
          //x = input.nextChar();          
          for( int i = 0; i < 3;i++)
               //verify User selection to know which Ticket was selected
               if(x=='A' || x=='a')
                    userTicketChoice = "premium";
                    break;
               if(x=='B' || x=='b')
                    userTicketChoice = "basic";
                    break;
               if(x=='C' || x=='c')
                    userTicketChoice = "choice";
                    break;
          }//end for loop
          //display greeting and than exit program
          greeting();     
     }//end selection
     public static void confirm()
          //create Scanner to obtain input from command window
          Scanner input= new Scanner(System.in);
          char b;
          System.out.println("You have selected to purchase the "+ userTicketChoice +" Ticket. Y/N?");
          b = input.getchar();
          //Process user response
          if(b=='y'||b=='Y')
               processEntry("userTicketChoice".getTicketPrice());//exits this method
          else
               getTicketChoice();// this starts over to receive valid input from user
     }//end confirm
          public static void greeting()
          System.out.println("Thank you for Using Our Carmike Cinema Ticket Machine/n");
          System.out.println("We hope you have a nice Day!!!/n");
          //exit program here
     public void processEntry(double ticketCost)
          //use a do while loop to process payment
          //Inquire as to how many tickets user is willing to purchase
          Scanner input= new Scanner(System.in);
          int i = 1;
          do
               System.out.println("How many Tickets would you like to purchase?");
               numTickets = input.nextInt();
               //display the total cost of tickets that user would like to purchase
               userTotalTicketCost= (numTickets *ticketCost);//userTotalTicketCost happens to be the total cost of the ticket
               //display calculated cost for User to see
               System.out.println("The Total Cost of Tickets you have Ordered is: " + userTotalTicketCost+"/n");
               System.out.println("Enter the Amount of Money you have to pay for Tickets: ");
               Useramount = input.nextDouble();//Useramount happens to be total money user enters
               //compare userTotalTicketCost and z to be sure that User entered the right amount of money
               if (userTotalTicketCost > Useramount)//User did not enter sufficient funds
                    System.out.println("you have entered an invalid amount");
                    i++;
                    continue;
               //User enter sufficient funds or even more
               else if(userTotalTicketCost == Useramount || userTotalTicketCost < Useramount)
                    processPayment();
                    //process ticket printing
                    for(i=0; i> numTickets; i++)
                         printTicket();
                    break;
          } while( (i < 4)&& (userTotalTicketCost > Useramount));//close of do while loop     
     }//end processEntry
     public void processPayment()
     {// this processes payment and issues ticket
          //Calculate users return
          userChange=(Useramount-userTotalTicketCost);
          if ( userChange> 0)
               System.out.println("Your Change is $"+ userChange +"/n/n/n/n/n");
     }//end processPayment method     
     public void printTicket()
          // Simulate the printing of a ticket.
          System.out.println("######################################/n");
          // use the Ticket Class method to print the Ticket information
          System.out.println(String.valueOf(userTicketChoice).printTicketinfo());// convert to the saved ticket choice
          System.out.println("######################################");
          System.out.println("/n/n");
     //main method begins program execution
     public static void main()
          //set the properties of the choice ticket
          choice.setTicketPrice(45.00);
          choice.setType("Choice");
          choice.setTicketNumber(r);
          choice.setTicketFeature("Access to viewing of 10 movies, at any of the hundreds of/n of Carmike movie theatre's nationwide./nYou also get 5 free refills on your drinks and 20 tubs of/npopcorn/n");
          //set the properties of the basic ticket
          basic.setTicketPrice(15.00);
          basic.setType("Basic");
          basic.setTicketNumber(r);
          basic.setTicketFeature("Ticket is only good for one use. You get a free Cup of Soda/n and a tub of Popcorn at the food counter./n");
          //set the properties of the premium ticket
          premium.setTicketPrice(100.00);
          premium.setType("Premium");
          premium.setTicketNumber(r);
          premium.setTicketFeature("Access to viewing of 25 movies,at any of the hundreds of/nthe 300 Carmike Cinema around the country./n You get free refills at the food counter for up to 50/ndrinks and 10 tubs of popcorn/n");
          //Select Ticket Type
          getTicketChoice();
          System.out.println("How many "+ numTickets +" tickets would you like to purchase? ");
     }//end main
}//end class TicketSales

cannot find Symbol- method getChar()That means you're trying to call a method that doesn't exist.
When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.

Similar Messages

  • Error message I keep getting on my MacbookPro when trying to install

    I recently had my macbook pro fixed and Apple had to wipe everything off of it while correcting the problem so now I have to redownload and re-install adobe flash player but I will download it and then when I double click on it to install it I keep getting the same error message.  The error message it keeps giving me is:
    “Install Adobe Flash Player” can’t be opened because the identity of the developer cannot be confirmed.
    I have tried a couple of things but nothing is working and I have not seen anyone with the same problem.  How can I fix this and download and install adobe flash player?

    Hello,
    What OS X version are you running? Please go to 'About this Mac' and provide the 'Startup Disk' information.
    What URL did you download Flash Player from?
    What is the name of the Flash Player installer file returning this message?
    Maria

  • Can anybody help me with this error message I keep getting

    When I try to export my document as a pdf I keep getting this error message...  "The document “Client Invoice_TMC copy” could not be exported as...."

    What version of Numbers?What version of Mac OS X?
    Have you tried restarting Numbers?
    Have you tried restarting your computer?
    Can you export other documents to pdf?
    Have you tried printing the docmment to pdf using the built-in print dialog?  To do this select the menu item "File > Print", then click the print button, then select the "Open in Preview" select from the PDF button in the bottom left corner:

  • Error message i keep getting with my new mac (YOSEMITE), trying to install my CS6 software

    "You can’t use this version of the application “Adobe After Effects CS6” with this version of OS X." is the error message! help!

    anna123456789, Please do update your After Effects CS6 to version 11.0.4 to work in Yosemite from here : Adobe - After Effects : For Macintosh : Adobe After Effects CS6 11.0.4 Update : Thank You

  • "The requested operation requires elevation" is an error message I keep getting when trying to open attachments or documents. How do I get rid of this?

    I keep getting the error message "The requested operation requires elevation" when I try to open attachments or documents. How do I get rid of this?

    This is the entire message. I have gotten this message many, many times and it's always the same.
    I'm trying to open text attachments to Thunderbird with Open Office.

  • Error Message:  I keep getting this error when I try to download apps or songs :  MZCommerce.CreditBalance Mismatch.Mobile_message   Can someone tell me how to get rid of this?  It is very aggravating when trying to use the IPAD.

    I keep getting this error when I try to download apps or songs :  MZCommerce.CreditBalance Mismatch.Mobile_message   Can someone tell me how to get rid of this?  It is very aggravating when trying to use the IPAD.

    Try to go to Settings and then Store. Tap to your Apple ID and select View Apple ID. Now choose to check your payment information and when you're done tap Done. I had to rewrite my three digit code of the credit card and now it works.
    Oh, I also activated Genius for Apps but I don't think it makes any difference.

  • Scheduling a Deski report fails with error message: "Failed to get property

    Hi,
    We have created few Desktop Intelligence report. Now when these report are schedules to be refreshed weekly (on Sunday), it fails with the following error message:
    "Failed to Get Property"
    Have tried to refresh the reports manually in Full Client too but the report fails there too.
    Have checked for the connection information. The servers are up and running.
    Have tried to re-create the connection and even tried to re-import and export the Universe.
    If we rename the report and save it and export, it works fine. Can not try this workaround as have more that 500 reports.
    Please suggest.
    regards,

    Hi Maria,
    usually the message "Failed to Get Property" is followed by an item name such as SI_FILE, or SI_VARIABLE, or SI_USE_ORIGINALDS, and so on.
    Could you please specify as much information coming from the error message as you can?
    Furthermore, is this issue happening with any Desktop Intelligence reports you schedule?
    Are the reports using the same Universe?
    Which DB are you using?
    Regards,
    Samanta F.

  • I am trying to re-install Creative Suite 5.5 Design Standard on my Widows 7 Professional computer after I had to replace the hard drive. I keep getting error message and I get "Exit Code 15: Media DB Sync failed". I have run C Cleaner with same results. H

    I am trying to re-install Creative Suite 5.5 Design Standard on my Widows 7 Professional computer after I had to replace the hard drive. I keep getting error message and I get "Exit Code 15: Media DB Sync failed". I have run C Cleaner with same results. Have Disabled UAC and Startup items and Services with no success. Please help - frustrated to no end. Can someone help me?

    make sure you're using the adobe cleaner, not crap cleaner, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    copy the installation files to a desktop folder and install from there.

  • TS3694 Downloaded latest IOS 7.0.2 and it crashed my iphone 4. Now Ive got nothing and it wont restore when connected with Itunes cos Error Message 4005 comes up. Cant find it listed anywhere. Help

    Downloaded latest IOS 7.0.2 and it crashed my iphone 4. Now Ive got nothing and it wont restore when connected with Itunes cos Error Message 4005 comes up. Cant find it listed anywhere. Help

    Hi!
    It looks like there might be some security settings or software on your laptop that's preventing the restore process from working.
    Check out this article in Apple's support. It shows you the steps you can take to try to get around error 1611.
    Like diesel vdub said, a DFU-mode restore might give you success where a regular restore might not, so maybe you can try that.
    What you need to do is put your phone into DFU mode, which is a low-level mode that helps the restore process get a little more done, or it can help iTunes get around certain roadblocks (hopefully like the one you're experiencing!). Your computer will install special DFU-iPhone drivers for it, and then iTunes will see it as a phone that needs restoring.
    To get your phone into DFU mode:
    Plug your phone into your laptop.
    Turn the phone off.
    Press and hold the power/lock button. Keep it held in, even after the display turns on and you see something on the screen. As soon as you see something on the screen, start holding the home button as well as the power button, so that they're being pressed together.
    Keep both buttons pressed down for 10 seconds.
    After 10 seconds, release the power button, but keep holding home until the laptop sees a new USB device. Once you see that, you're in DFU mode, and you can let go of buttons. Your iPhone screen will be blank during it all, even though it's actually on, in DFU mode.
    Now your restore should work!
    If your phone shows the Apple logo or anything else while you're trying to get it into DFU mode, then something went wrong. Try the steps again. If it suddenly starts up normally again, try reducing the time to a bit less than 10 seconds--try reducing it by about a second at a time. It should work!

  • My Premiere Pro won't open and keeps coming up with a 0xc000007b error message!! I have uninstalled

    My Premiere Pro won't open and keeps coming up with a 0xc000007b error message!! I have uninstalled and reinstalled it but it will still not open.

    It worked for me, any way we have to do following things now, I have seen this happens becasue of the corrupt dll for Visual C++ packages. if the following thing will not work, I am affraid we have to reinstall the windows 7
    Good Luck
    Try to remove all the Visual C++ 2010 Redistributable and Visual C++ 2008 Redistributable Packages (both x86 and x64) from the Control Panel
    Download and install following Visual C++  Redistributable Packages
    Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
    Microsoft Visual C++ 2008 SP1 Redistributable Package (x64)
    Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
    Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)

  • I am going through startup on Macbook Air 11.  When I get to the "Sign in with Your Apple ID" screen, I keep getting the message, "Couldn't sign in because of server error."  I am connected to wifi.  Any ideas on how to proceed?

    I am going through startup on Macbook Air 11.  When I get to the "Sign in with Your Apple ID" screen, I keep getting the message, "Couldn't sign in because of server error."  I am connected to wifi.  Any ideas on how to proceed?

    Hello KathyBrust
    Check out the article below to go over a few troubleshooting steps with issues connecting to iCloud. If you are still stuck, there are other resources to get a resolution.
    iCloud: Account troubleshooting
    http://support.apple.com/kb/ts3988
    Regards,
    -Norm G.

  • Connecting to remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError $true -CurrentV

    I installed Exchange Server 2010 inside my VMWare Windows Server 2008 Ent R2. And After successful installation  when I try to open my Exchange Server Console, I am getting the following error message. I am very new to Exchange server please help me
    to solve this problem.
    Initialization Failed
    The following error occurred while searching for the on-premises Exchange server:
    [win-.local] Connecting to remote server failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. It was running the command 'Discover-ExchangeServer -UseWIA $true -SuppressError
    $true -CurrentVersion 'Version 14.1 (Build 218.15)''.
    Thanks Vivek
    SharePoint Foundation 2010 Book
    http://www.redpipit.com

    Hi,
    Please have a look at the article below:
    Troubleshooting Exchange 2010 Management Tools startup issues
    http://blogs.technet.com/b/exchange/archive/2010/02/04/3409289.aspx
    Resolving WinRM errors and Exchange 2010 Management tools startup failures
    http://blogs.technet.com/b/exchange/archive/2010/12/07/3411644.aspx
    Besides, please run the cmdlet below:
     set-user alias -remotepowershellenabled$true
    Xiu Zhang
    TechNet Community Support

  • HT3275 Help? Time Machine could not complete the back up due to iMacsparsebundle is already in use??? This is the error message I am getting now with my Time Capsule as the back up device. Any suggestions?

    Help? Time Machine could not complete the back up due to iMacsparsebundle is already in use??? This is the error message I am getting now with my Time Capsule as the back up device. Any suggestions?

    Pull the power cord from the back of the Time Capsule
    Wait a few minutes
    Push the power cord back into the back of the Time Capsule
    See if the Time Capsule will back up now
    If not, see #C12 in this document:
    http://pondini.org/TM/Troubleshooting.html

  • When syncing with itunes, got error message saying had error and now ipad2 will not do anything other than showing the USB cable with arrow pointing to Itunes on screen.  have done the reset and restart, but still get same thing.

    when syncing with itunes, got error message saying had error and now ipad2 will not do anything other than showing the USB cable with arrow pointing to Itunes on screen.  have done the reset and restart, but still get same thing.  Ipad does not show up in itunes even though cable plugged in.  Have shut down and restarted Windows 7 computer.

    I had done all of that to no avail.  I did call Apple Tech Support and after he suggested I try a USB port in the rear of the Win 7 computer, things starting working again.  I had tried switching the USB port at the front of the machine but that had not helped.  Everything is good to go again.  thanks for  your reply

  • I have ipod classic 5gen it will not sync with windows the error message says ipod can not sync as required file missing   wht to do???

    i have ipod classic 5gen it will not sync with windows the error message says ipod can not sync as required file missing   wht to do???

    Although you used the new USB 3.0 port, the actual connection speed is still USB2.0, as the iPod Dock connector, does not have the 10 times faster USB3.0 signal pins, the connection speed is still 480Mbits/s
    I assumed that you have tried the other USB 2.0 port to no success..
    Can you do the iPod Disk diagnostic as posted earlier by tt2, it wont fix your problem, but helps in troubleshooting.
    Have a nice day!

Maybe you are looking for

  • How to get number of pages uisng cl_gui_alv_grid

    Dear all, my requirement is iam creating PO based on vendor and material grade,suppose if my vendor has 100 line items i should display all those line items into 5 pages.iam using set table for first display method to display Itab.iam using Module po

  • ENOENT

    i am having problem with non-blocking socket io when i compile with gcc. the code i am using is as follows myaddr.sin_family = AF_INET; myaddr.sin_port = htons (port); myaddr.sin_addr.s_addr = htonl (addr); flags = fcntl (skt, F_GETFL, 0); if ( flags

  • Fileserver problems (Win/Mac): file path broken

    I'm working in a mixed pc/mac environment. Most clients run Windows, some run Mac OS X, but we're all connected to the same Windows file server. When I sit at a Mac client and place a picture from the Win server into a ID CS3 document, the path to th

  • Thunderbolt USB hub?

    I remain pretty clueless about all-things-Thunderbolt other than, [1] It's fast! and [2] Devices are expensive and almost non-existant. Currently, when I arrive at work with my rMBP, I plug in the power, an external monitor (via a Thunderbold adapter

  • Soft Proofing: Aperture vs Photoshop

    I'll start by saying that I,m no expert in this area... So why do I see such a difference in soft proofing in Aperture vs PhotoShop? The difference between my calibrated screen and a printer's ICC profile is much bigger in Aperture then it is in Phot