How to make this exit

Can guide me on how to make exit or continue if user key in 'y' to continue and loop back to the 'Enter temperature'? and 'n' to exit the programe.? Please help
import javax.swing.*;
public class Temperature
     public static void main(String[] args)
          int temp;                    //value to store temp
          String inputTemp;          //for the input screen
          String outputHot;          //for the output of hot
          String outputAverage;     //for the output of average
          String outputCold;          //for the output of cold
          String outputTooHot;     //for the output of too hot
          inputTemp = JOptionPane.showInputDialog("Enter temperature:")     ;
          temp = Integer.parseInt(inputTemp);
          if (temp < 10)     {                                        //input temp less than 10
          outputCold = "Too Cold";          
          JOptionPane.showMessageDialog(null, outputCold, "Output", JOptionPane.INFORMATION_MESSAGE);
          else if((temp >= 10) && (temp <= 20))     {          //input temp between 10 - 20
          outputAverage = "Average";
          JOptionPane.showMessageDialog(null, outputAverage, "Output", JOptionPane.INFORMATION_MESSAGE);
          else if ((temp >= 21) && (temp <= 30))     {          //input temp between 21 - 30
          outputHot = "Hot";
          JOptionPane.showMessageDialog(null, outputHot, "Output", JOptionPane.INFORMATION_MESSAGE);
          else {                                                       //input temp more than 30
          outputTooHot = "Too Hot";
          JOptionPane.showMessageDialog(null, outputTooHot, "Output", JOptionPane.INFORMATION_MESSAGE);
          char outputYes;
          char outpPutNo;
          String inputExit;
          inputExit = JOptionPane.showInputDialog(null, "Would you like to continue (y/n):");
          System.exit(0);                    
     }

import javax.swing.*;
public class Temperature
     public static void main(String[] args)
          int temp;                    //value to store temp
          String inputTemp;          //for the input screen
          String outputHot;          //for the output of hot
          String outputAverage;     //for the output of average
          String outputCold;          //for the output of cold
          String outputTooHot;     //for the output of too hot
          inputTemp = JOptionPane.showInputDialog("Enter temperature:")     ;
          temp = Integer.parseInt(inputTemp);
          if (temp < 10)     {                                        //input temp less than 10
          outputCold = "Too Cold";          
          JOptionPane.showMessageDialog(null, outputCold, "Output", JOptionPane.INFORMATION_MESSAGE);
          else if((temp >= 10) && (temp <= 20))     {          //input temp between 10 - 20
          outputAverage = "Average";
          JOptionPane.showMessageDialog(null, outputAverage, "Output", JOptionPane.INFORMATION_MESSAGE);
          else if  ((temp >= 21) && (temp <= 30))     {          //input temp between 21 - 30
          outputHot = "Hot";
          JOptionPane.showMessageDialog(null, outputHot, "Output", JOptionPane.INFORMATION_MESSAGE);
          else {                                                       //input temp more than 30
          outputTooHot = "Too Hot";
          JOptionPane.showMessageDialog(null, outputTooHot, "Output", JOptionPane.INFORMATION_MESSAGE);
          char outputYes;
          char outpPutNo;
          String inputExit;
          inputExit = JOptionPane.showInputDialog(null, "Would you like to continue (y/n):");
          System.exit(0);                    
     }

Similar Messages

  • Something keeps trying to download on my mac and I don't know what it is. It is not in the apple store and just comes out nowhere and request for my password to download something and I don't know what it is. How to make this stop?

    Something keeps trying to download on my mac and I don't know what it is. It is not in the apple store and just comes out nowhere and request for my password to download something and I don't know what it is. How to make this stop? It pops up every single day.

    Erica,
         I can, with 99.99% certainty, tell you that you are absolutely right in not wanting to download or install this "Helper," whatever it is (but we can be equally certain it would not "help" anything).
         I cannot comment as to Oglethorpe's recommendation of 'adwaremedic'; I am unfamiliar with it.  His links to the Apple discussion and support pages warrant your time and attention.
         It might be really simple -- Trying looking in your Downloads folder, trash anything that you don't know with certainty is something you want to keep, and then Secure Empty your Trash. Then remove the AdBlock extension, LastPass, and Web of Trust extensions to Safari and re-boot. If the issue goes away, still be extraordinarily careful in the future.
         Unfortunately, it's probably not going to be that simple to get rid of, in which case I'd then try the line by line editing in HT203987. 
         I have no further suggestions (other than a complete wipe and re-install...but that's a pain because trying to restore from Time Machine would simply ... restore the Mal).
       For the rest of us, please post when you find a solution.
         Best.
         BPW
      (Also, try to edit your second post -- black out your last name on the screenshot and re-post it for others)

  • TS2634 I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?

    I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?

    I have the same problem.
    Two similar discussions:
    https://discussions.apple.com/message/23081658#23081658
    https://discussions.apple.com/message/23281391#23281391
    I have not yet seen any official response to the question: "Is the Apple AV Composite cable fully supported with 30pin connector devices upgraded with iOS7 - specifically ? - eg. iPad 2, iPhone 4, iPhone 4s"
    If it is not currently supported is that then due to a bug / oversight and in that case is it something that will be fixed in the near future?
    Please let us know what feedback you got from asking Apple support.

  • How to make this in Adobe Photoshop CS5? PLEASE Help!

    Hey guys, i reallllllllly  want to know how to make this image in adobe photoshop.... the cone around the forecast track. Can you guys please show me how to do this? Id greatly appreciate it!

    There's a lot implied here, but you're not going to get around having to do the following in general:
    Use an unmarked map as a background.
    Draw shapes on layer(s) above the background and make them partially transparent.
    Obviously the key is to draw shapes that express the "cone of uncertainty" exactly as you want it to look, and with a minimum of fuss.
    I'd suggest drawing shapes with Path tools, then filling the shapes, applying a stroke (for the edge border), and using masking to hide parts you don't want to show (or which overlap with the other parts you're drawing).
    Are you needing to do this over and over or just once?
    -Noel

  • How to make this effect in Keylight?

    Hi, I have question, how to make this effect in Keylight?
    I know that this overlay is added here:
    http://oi57.tinypic.com/1174fup.jpg
    Photos:
    http://iv.pl/images/18475588964010299091.jpg

    Keylight what? All I see is some effect similar to Leave Color, a.k.a the Pleasantville effect that made the rounds 10 years ago. It may require additional masking and otehr effects, but definitely not something that is specifically related to Keylight...
    Mylenium

  • How to make this work flow?

    Hi,
    In a target database such like MySQl, I define a colum role to store the roels in SIM. Then, I want to make a post-workflow that set the account with related role which is defined in the DB after reconciliation and move those accounts from this DB to a specified organzation.
    How to make this workflow?
    If anyone know about this, kindly help me...
    thanks..

    Just a thought... Are you able to run this as activesync? If you use activesync you could just use a form or metaview to merge (or replace) your role value with waveset.roles and set the org for accounts that correlate.
    -Rob

  • How to make this work with Firefox, HELP!

    Downloading for Real-player, after watching the full movie, I click download and it has to reread the movie from the internet. When using explorer, after downloading the movie, it reads it from memory, which makes it a fast download. How to make this work with Firefox, I like not to use Microsoft products, and I really like Firefox 7.0.1!!!! HELP!

    -> click '''Firefox''' button and click '''Options''' (OR File Menu -> Options)
    * Advanced panel -> Network tab
    * place Checkmark on '''Override Automatic Cache Management''' -> under '''Limit Cache''' specify a large size of space
    * Remove Checkmark from '''Tell me when websites asks to store data for offline use'''
    * click OK on Options window
    * Restart Firefox
    Check and tell if ts working.

  • How to make this animation in TwitchPlugin?

    Hi, I have question, how to make this effect and animation in twitch.
    Effect:
    Animation:
    http://youtu.be/UIrSSYjW5-A?t=15s

    If you bought the plug-in you have a bunch of tutorials.
    If you are thinking about buying the plug-in take a look at the tutorials provided by Video CoPilot
    https://www.videocopilot.net/products/twitch/
    If you are still lost AE Basics

  • Anyone knows how to make this code to netbeans??

    anyone knows how to make this code to netbeans?? i just want to convert it into netbeans... im not really advance with this software... anyway..just reply if you have any idea...or steps how to build it... etc.... thanks guys...
       import javax.swing.*;
       import javax.swing.table.*;
       import java.awt.*;
       import java.awt.event.*;
       import java.util.regex.*;
       public class FilterTable {
         public static void main(String args[]) {
           Runnable runner = new Runnable() {
             public void run() {
               JFrame frame = new JFrame("Sorting JTable");
               frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
               Object rows[][] = {
                 {"AMZN", "Amazon", 41.28},
                 {"EBAY", "eBay", 41.57},
                 {"GOOG", "Google", 388.33},
                 {"MSFT", "Microsoft", 26.56},
                 {"NOK", "Nokia Corp", 17.13},
                 {"ORCL", "Oracle Corp.", 12.52},
                 {"SUNW", "Sun Microsystems", 3.86},
                 {"TWX",  "Time Warner", 17.66},
                 {"VOD",  "Vodafone Group", 26.02},
                 {"YHOO", "Yahoo!", 37.69}
               Object columns[] = {"Symbol", "Name", "Price"};
               TableModel model =
                  new DefaultTableModel(rows, columns) {
                 public Class getColumnClass(int column) {
                   Class returnValue;
                   if ((column >= 0) && (column < getColumnCount())) {
                     returnValue = getValueAt(0, column).getClass();
                   } else {
                     returnValue = Object.class;
                   return returnValue;
               JTable table = new JTable(model);
               final TableRowSorter<TableModel> sorter =
                       new TableRowSorter<TableModel>(model);
               table.setRowSorter(sorter);
               JScrollPane pane = new JScrollPane(table);
               frame.add(pane, BorderLayout.CENTER);
               JPanel panel = new JPanel(new BorderLayout());
               JLabel label = new JLabel("Filter");
               panel.add(label, BorderLayout.WEST);
               final JTextField filterText =
                   new JTextField("SUN");
               panel.add(filterText, BorderLayout.CENTER);
               frame.add(panel, BorderLayout.NORTH);
               JButton button = new JButton("Filter");
               button.addActionListener(new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                   String text = filterText.getText();
                   if (text.length() == 0) {
                     sorter.setRowFilter(null);
                   } else {
                     try {
                       sorter.setRowFilter(
                           RowFilter.regexFilter(text));
                     } catch (PatternSyntaxException pse) {
                       System.err.println("Bad regex pattern");
               frame.add(button, BorderLayout.SOUTH);
               frame.setSize(300, 250);
               frame.setVisible(true);
           EventQueue.invokeLater(runner);
       }

    its okay onmosh.....what we need to
    this...forum....is to have a good......relationship
    of programmers......and to start with .....we need to
    have a good attitude........right.....???.....no
    matter how good you are in programming but if you did
    not posses the right kind of attitude....everything
    is useless.....in the first place....all we
    want....is just to ask...some....help....but
    conflicts......but unluckily......we did not expect
    that there are members in here which......not
    good...to follow.....just as suggestion for those
    people not having the right kind of attidude...why
    can't you do in a very nice message sharing in a very
    nice....way....why we need to put some
    stupid....stuff...words.....can't you live with out
    ******* ****....its not.....lastly especially you
    have your children right now and people around...that
    somehow......idiolize...you even me....is one of
    them......but showing but attitude....is not
    good......tnx....hope you'll take it this....in the
    positive side.....be optimistic...guys....the
    world..is not yours....all of us will just past
    away....always..remember that one.....treasure..our
    stay in this....temporary home.....which...is
    world....Whoa. That post seems to be killing my brain.
    URK
    Join........us..........do not be..........afraid.......

  • How to make this validation ?

    Dear all
    In my Entity Object I have 4 attributes:
    ID , AccomplishDate ,cancelDate,Status
    I want to make a validation on the Status attribute , which is:
    if status = "CAN" then the CancelDate attribute value will be current date and the AccomplishDate attribute value be null.
    Please can any one tell me how to make this validation.
    Thanks

    Thank you so much for replaying
    The original method was
        public void setProcStatus(String value) {
                 setAttributeInternal(PROCSTATUS, value);
        }I changed it to be like this
          public void setProcStatus(String value) {
            if (value.equals("CAN")){
              setAccomplishDate(new Date());
              setCancelDate(null);
            setAttributeInternal(PROCSTATUS, value);
        }is this right
    please tell me how to set the value of AccomplishDate attribute to the current date

  • How to make this pattern?

    Hello guys Please I am looking for advice how to make this kind of pattenr in pohtoshop- you can see it on background- the rounded one- en the end whole piece makes nice surface.
    http://vladstudio.deviantart.com/art/Typographic-World-Map-106395788
    thank a lot

    Sometimes a patten is defined for some pixel size and may even need to have the document rotated to have the proper orientation for the pattern. For example a frame pattern for a one inch wide strip.  An Action can be created to add the pattern to a mitered 1" wide strip at 300 dpi  on the left side then rotate the document for the other side rotate back and dupe and flip the frame side added.
    If you search the web there are a countless number of patterns that can be downloaded for free textures like woods ,paper, textiles etc.

  • How to make this logo effect? Help please!

    How to make this effect? I'm new in illustrator.

    It looks like 3 discs with a 2d image applied to them. I would try the 3d revolve tool to create one, then duplicate it for the other two.

  • How to make this in Flash Builder?

    I am looking to make an Android app and one of the functionalities is somehting like in the video.
    I am new to Flash Builder and looking for some help to make it.
    Anyone has a tutrial or has any idea how to make this?
    Android SQLite App Development with Flash Builder and Flex - YouTube

    I'll give you the short answer, Flash Catalyst is built on top of the Flex Framework and it's libraries. When you launch or load a FC swf, it will contact the Adobe servers to check the status of various libraries. Since you are loading this into a standard Flash Professional created swf, you are by passing some of the fallbacks that exist.
    If the movieClip that you are creating is just a filler image, and you are just centering the FC swf, then I also recommend using CSS to display the filler and some HTML/CSS to center the content.
    Hope this helps a little.
    If you did the loading of the FC swf from a Flash Builder based project, you should not have the issue, since it is a Flex based SWF, the framework checks are already handled for you.
    Chris

  • How do make this query ?

    CREATE TABLE CLIENT (
         CLIENTID NUMBER PRIMARY KEY,
         NAME VARCHAR2(40)
    CREATE TABLE SALESMAN (
         SALESMANID NUMBER PRIMARY KEY,
         NAME VARCHAR2(40),
         ALL_CLIENTS NUMBER -- ACCESS ALL CLIENTS IF VALUE IS 1
    CREATE TABLE CLIENTSALESMAN (
         SALESMANID NUMBER,
         CLIENTID NUMBER
    INSERT INTO CLIENT VALUES(1,'Bob');
    INSERT INTO CLIENT VALUES(2,'Jhon');
    INSERT INTO CLIENT VALUES(3,'Robert');
    INSERT INTO CLIENT VALUES(4,'Clarck');
    INSERT INTO SALESMAN VALUES (1,'Christina',0);
    INSERT INTO SALESMAN VALUES (2,'Doug',1); -- access all clients
    INSERT INTO CLIENTSALESMAN VALUES (1,1);
    INSERT INTO CLIENTSALESMAN VALUES (1,2);
    How do you return all the clients of a salesman ? same that SALESMAN.ALL = 1 OR SALESMAN.ALL = 0.
    the salesman.all is 1 then he access all clients no need insert in CLIENTSALESMAN. If SALESMAN.ALL = 0 he
    access clientsalesman.
    Does somebody some suggestion how i make this ?
    thanks !

      1  select *
      2  from (select a.name SALESMAN, b.name CLIENT
      3  from   salesman a, client b, clientsalesman
      4  where  a.SALESMANID = c.SALESMANID
      5  and    b.CLIENTID = c.CLIENTID
      6  union
      7  select a.name SALESMAN, b.name CLIENT
      8  from   salesman a, client b
      9  where   a.ALL_CLIENTS = 1)
    10* where salesman = '&1'
    SQL> /
    Enter value for 1: Christina
    old  10: where salesman = '&1'
    new  10: where salesman = 'Christina'
    Christina                                Bob
    Christina                                Jhon
    SQL> /
    Enter value for 1: Doug
    old  10: where salesman = '&1'
    new  10: where salesman = 'Doug'
    Doug                                     Bob
    Doug                                     Clarck
    Doug                                     Jhon
    Doug                                     RobertNicolas.

  • Suggestions on how to make this coding better?

    Hey everyone, I was just wondering if anyone had any suggestions on how to make my code better. It's for a project and I want to get a good grade on it. It works fine but I just want to see what everyone thought before I hand it in.
    import java.io.*;
    import java.util.StringTokenizer;
         This class process the input expressions containing rational expressions and proecesses them and then outputs the results.
         @author *****
         @version 1.0
    public class Proj1
         private static String buffer = null; //User input
         private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         private static PrintWriter outfile = null;
         private static int totCount = 0, goodCount = 0, badCount = 0; //Total, Valid, and Invalid counts
         private static boolean fileInput = false; //File to read data
         private static boolean fileOutput = false; //Output for the data
         private static boolean screenOutput = false; //Output so the user can view it
         private static String outFile = null; //File for output
         private static String inFile = null; //File for input
              Main method
         public static void main (String[] args) throws Exception
              Proj1 proj1 = new Proj1();
              proj1(args);
              runs the program
         private static void proj1(String [] args) throws Exception
              if (args.length == 0)
                   printBanner();
                   System.out.println("\n" + "\n" + "Please enter an expression, or type quit");
                   do
                        screenOutput=true;
                        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                        processData();
                   }while(!buffer.equals("quit"));//exits if quit is entered
              if (args[0].charAt(0) != '-')
                   badOption("Invalid Option Specified ");
              for(int i=1; i<args[0].length(); i++)
                   switch(args[0].charAt(i))
                        case 'f': fileInput = true;
                                    break;
                        case 'o': fileOutput = true;
                                    break;
                        case 'b': fileOutput = true;
                                    screenOutput = true;
                                    break;
                        default:  printBanner();
                                    invalidOption("Proj1: Invalid Option Found: " + args[0].charAt(i));
              if(fileInput && args[0].length() == 2)
                   screenOutput = true;
              if(fileInput && !fileOutput)
                   if(args.length == 1)
                        badOption("No Input File Specified.");
                   else
                        File inFile = new File(args[1]);
                        if(!inFile.exists())
                             nonExist("Input File " + args[1] + " not found");
                   br = new BufferedReader(new FileReader(args[1]));
                   printBanner();
                   processData();
                   closeFiles();
              if(fileOutput && fileInput)
                   printBanner();
                   if(args.length > 2)
                        outFile = args[2];
                   else
                        if(args.length > 1)
                             outFile = "proj1.dat";
                             noOut("No output file specified , defaulting to proj1.dat");
                   inFile = args[1];
                   br = new BufferedReader(new FileReader(inFile));
                   processData();
                   closeFiles();
              if(fileOutput && screenOutput)
                   printBanner();
                   if(args.length == 1)
                        outFile = "proj1.dat";
                        noOut("No output file specified, defaulting to proj1.dat");
                        System.out.println("\n" + "\n" + "Please enter an expression, or type quit");
                        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
                        processData();
                        closeFiles();
                   else
                        outFile=args[1];
                        System.out.println("\n" + "\n" + "Please enter an expression, or type quit");
                        br = new BufferedReader(new InputStreamReader(System.in));
                        processData();
                        closeFiles();
         Processes the input data by the user by doing the specified operations and then displays the output
         private static void processData() throws Exception
              if(fileOutput)
                   outfile = new PrintWriter(new FileOutputStream(outFile), true);
              else if(fileOutput && screenOutput)
                   outfile = new PrintWriter(new FileOutputStream(outFile), true);
              buffer = br.readLine();
              while(!buffer.equals(""))
                   StringTokenizer reader = new StringTokenizer(buffer);
                   int count = 0;
                   String number1 = null;
                   String number2 = null;
                   String op = null;
                   boolean valid = true;
                   boolean secondNumber = true;
                   while (reader.hasMoreTokens())
                        switch(count)
                             case 1: number1 = reader.nextToken();
                                       break;
                             case 2: op = reader.nextToken();
                                       break;
                             case 3: number2 = reader.nextToken();
                                       break;
                        count++;
                   if(number1 == null || number1.equals("quit"))
                        printSummary(goodCount, badCount, totCount);
                        closeFiles();
                   if(number2 == null)
                        secondNumber = false;
                   char character;
                   int position = 0;
                   String s = "0123456789/-";
                   for(int i = 0; i < number1.length(); i++)
                        character = number1.charAt(i);
                        position = s.indexOf(character);
                        if(position == -1)
                             valid = false;
                   if(secondNumber)
                        for(int i = 0; i < number2.length(); i++)
                             character = number2.charAt(i);
                             position = s.indexOf(character);
                             if(position == -1)
                                  valid=false;
                   int denomin2 = 0;
                   int numer2 = 0;
                   String n1 = null;
                   String d1 = null;
                   int izerCount = 0;
                   StringTokenizer st2 = new StringTokenizer(number1,"/");
                   while(st2.hasMoreTokens())
                        switch(izerCount)
                             case 1: n1 = st2.nextToken();
                                       d1 = "1";
                                       break;
                             case 2: d1 = st2.nextToken();
                        izerCount++;
                   int numer1;
                   int denomin1;
                   int tokenCount = 0;
                   if(valid)
                        numer1 = Integer.parseInt(n1);
                        denomin1 = Integer.parseInt(d1);
                        String n2 = null;
                        String d2 = null;
                        if(secondNumber)
                             StringTokenizer st3 = new StringTokenizer(number2, "/");
                             while(st3.hasMoreTokens())
                                  switch(tokenCount)
                                       case 1: n2 = st3.nextToken();
                                                 d2 = "1";
                                                 break;
                                       case 2: d2 = st3.nextToken();
                                  tokenCount++;
                             numer2 = Integer.parseInt(n2);
                             denomin2 = Integer.parseInt(d2);
                             RationalNumber z1 = new RationalNumber(numer2, denomin2);
                        RationalNumber z = new RationalNumber(numer1,denomin1);
                        RationalNumber z1 = new RationalNumber(numer2,denomin2);
                        boolean lt = true; //whether the first number is less than the second
                        boolean gt = true; //whether the first number is greater than the second
                        boolean eq = true; //whether the first number is equal to the second
                        boolean le = true; //whether the first number is less or equal to the second
                        boolean ge = true; //whether the first number is greater than or equal to the second
                        boolean zeroDenom = true; //whether the denominator is zero
                        if(denomin1 == 0 || denomin2 == 0)
                             zeroDenom = true;
                             badCount++;
                        else
                             zeroDenom = false;
                        if(!zeroDenom && secondNumber)
                             if(op.equals("+"))
                                  RationalNumber z2 = z.add(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z2.getNumerator()+ "/" +z2.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z2.getNumerator()+ "/" +z2.getDenominator());
                                  goodCount++;
                             else if(op.equals("-"))
                                  RationalNumber z3 = z.sub(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z3.getNumerator()+ "/" +z3.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z3.getNumerator()+ "/" +z3.getDenominator());
                                  goodCount++;
                             else if(op.equals("*"))
                                  RationalNumber z4 = z.mlt(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z4.getNumerator()+ "/" +z4.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z4.getNumerator()+ "/" +z4.getDenominator());
                                  goodCount++;
                             else if(op.equals("/"))
                                  RationalNumber z5 = z.div(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z5.getNumerator()+ "/" +z5.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z5.getNumerator()+ "/" +z5.getDenominator());
                                  goodCount++;
                             else if(op.equals("<"))
                                  lt=z.lt(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + lt);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + lt);
                                  goodCount++;
                             else if(op.equals(">"))
                                  gt=z.gt(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + gt);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + gt);
                                  goodCount++;
                             else if(op.equals("="))
                                  eq=z.eq(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " +  eq);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " +  eq);
                                  goodCount++;
                             else if(op.equals("<="))
                                  le=z.le(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + le);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + le);
                                  goodCount++;
                             else if(op.equals(">="))
                                  ge=z.ge(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + ge);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + ge);
                                  goodCount++;
                             else
                                  if(op==null)
                                       if(screenOutput)
                                            System.out.println("Invalid expression: " + buffer);
                                       if(fileOutput || fileOutput && screenOutput)
                                            outfile.println("Invalid Expression: " + buffer);
                                       badCount++;
                             else
                                  if(screenOutput)
                                       System.out.println("Invalid expression: " + buffer );
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println("Invalid expression: " + buffer);
                                  badCount++;
                        else
                             if(screenOutput)
                                  System.out.println("Invalid operand: " + buffer);
                             if(fileOutput || fileOutput && screenOutput)
                                  outfile.println("Invalid operand: " + buffer);
                   else
                        if(screenOutput)
                             System.out.println("Invalid operand: " + buffer);
                        if(fileOutput || fileOutput && screenOutput)
                             outfile.println("Invalid operand: " + buffer);
                        badCount++;
                   buffer = br.readLine();
         Prints the banner for the program
         private static void printBanner()
              System.out.println("+++++++++++++++++++++++++++++++++++++++++"+"\n"+"+Welcome to the expression connection   +"+"\n"+"+++++++++++++++++++++++++++++++++++++++++");
         Prints the total number of expressions, total number of valid expressions, and total number of bad expressions.
         private static void printSummary(int goodCount, int badCount, int totCount)
              totCount = goodCount + badCount;
              System.out.println("\n");
              System.out.println("+++++++++++++++++++++++++++++++++++++++++");
              System.out.println("+ Total Expressions:        "+totCount);
              System.out.println("+ Total Valid Expressions   "+goodCount);
              System.out.println("+ Total Bad Expressions     "+badCount);
              System.out.println("+++++++++++++++++++++++++++++++++++++++++");
         Prints the error message if there is no output file specified
         private static void noOut(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " + errorString);
         Prints the error message if there is an invalid option input by the user
         private static void invalidOption(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " + errorString);
              System.out.println("Proj1: Usage is: java proj1 [-fob] [input] [output]");
              System.exit(0);
         Prints the error message if there is a bad option input by the user
         private static void badOption(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " + errorString);
              System.out.println("Proj1: Usage is: java proj1 [-fob] [input] [output]");
              System.exit(0);
         Prints the error message if the input file does not exist
         private static void nonExist(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " +errorString);
              System.out.println("Proj1: Usage is: java proj1 [-fob] [input] [output]");
              System.exit(0);
         Closes the files used by the user
         private static void closeFiles( )
              if(fileOutput && !screenOutput)
                   outfile.close();
              System.exit(0);
    }

    Well working is good...
    The code itself is less than spectacular I'm afraid. There is very little
    OOness to this. For your future reference when you complete a program
    and it consists of nothing but static methods you have done something
    incorrectly.
    As far as the code you do have goes some refactoring would be nice.
    The two main methods you have (proj1 but especially processData) are
    too long and unwieldy. processData seems to be a program in an of
    itself. It's complicated and hard to follow.
    My recommendation to you would be to read this http://java.sun.com/docs/books/tutorial/java/index.html
    Especially focus on the sections dealing with explanation of Object
    programming. These terms and concepts can certainly be confusing to
    new programmers so you may also want to consider finding yourself a
    tutor to help you get a better grasp of these concepts.
    In short if it works that's good. And it's also good to see that you put the
    effort and time in that you have. However if I was grading your project
    I'd give it a C- at best because this is a Java program in syntax only.

Maybe you are looking for

  • Populating the values of AQ header, IP_MESSAGE_TYPE,Payload

    Please if anyone can advise me about the ways that should be followed in order to populate the values of AQ header, IP_MESSAGE_TYPE,Payload of any B2B message through JDeveloper

  • Firefox instead of Safari

    Hi! I've started using firefox to get better stability than when using safari, but the thing is every software-app. makes links open in safari! Is there any place I can change this, so that when I open links from Mail, Adium messenger etc., they open

  • Windows authentication with oracle9i

    Hi,i am working on windows authentication with oracle9i.my client server is connecting and client can access the database.now can you please guide me the steps for windows authentication in brief.i will appreciate that.

  • Sap Learning Solution capturing of paper based test results.

    Hi all, I have a client requirement to capture the results of paper based tests. I see that using the follow up process there is only an option to pass or fail the course but one cannot add a specific result e.g. if you failed a course the client wou

  • Button trigger a sound file?

    I know about controller files, but I just am trying to get an audio file to play from a button instance in InDesign DPS. The audio won't play or it pulls up the Adobe Viewer panel in the app onClick. Do I need to somehow embed the file? How does iPad