Help me with this...

I want to write a Java application program that will display the information of three(3) books.
The information of the books will be keyed in/input by the user.
After all the three books have been input, the information on these books will be displayed.
The information required are:
1. Title of the book.
2. Author's name.
3. Publisher.
4. Reference number.
5. Year published.
6. Price

OK..I often use the label 'sb' for my StringBuffer...and defaulted to it in that method..
Also..out of haste to type it in ad-hoc, I forgot a {} after public Book()
This compiles and works:
import java.io.*;
public class Book
static BufferedReader br;
String title, author,publisher;
int ref,year;
double price;
public Book(){}
public void setTitle(String title)
this.title = title;
public void setAuthor(String author)
this.author = author;
public void setPublisher(String publisher)
this.publisher=publisher;
public void setReference(int ref)
this.ref=ref;
public void setYear(int year)
this.year=year;
public void setPrice(double price)
this.price=price;
public void print()
StringBuffer sb = new StringBuffer(100);
sb.append("Title:").append(title).append('\n');
sb.append("Author:").append(author).append('\n');
sb.append("Publisher:").append(publisher).append('\n');
sb.append("Reference number:").append(ref).append('\n');
sb.append("Year published:").append(year).append('\n');
sb.append("Price: $").append(price).append('\n'); //might need to format this
System.out.println(sb.toString());
public static String getLine(String output)
System.out.print(output);
String s=null;
try {s= br.readLine();}
catch(Exception e){System.err.println("Console in has closed unexpectedly"); System.exit(1);}
return s;
public static int getInt(String output)
int i = -1;
while (i == -1)
try{i = Integer.parseInt(getLine(output));}
catch(Exception e) {System.out.println("Not an integer!");i = -1;}
return i;
public static double getDouble(String output)
double d = -1.0d;
while (d == -1.0)
try {d= Double.parseDouble(getLine(output));}
catch(Exception e) {System.out.println("Not a double!"); d = -1.0d;}
return d;
public static void initConsole() throws Exception
br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args)
try {initConsole();}
catch(Exception e) {System.out.println("There was an error in opening the console for reading\nSpecifically, it is:"+e.toString());System.exit(1);}
Book[] books = new Book[3];
for (int i=0; i<3; i++)
books=new Book();
System.out.println("Book # "+(i+1));
books[i].setTitle(getLine("Title?:"));
books[i].setAuthor(getLine("Author?:"));
books[i].setPublisher(getLine("Publisher?:"));
books[i].setReference(getInt("Reference #?:"));
books[i].setYear(getInt("Year published?:"));
books[i].setPrice(getDouble("Price ($$)?:"));
System.out.println("The three books are:\n");
for (int i=0; i<books.length;i++)
System.out.println("Book # "+(i+1));
books[i].print();

Similar Messages

  • Can someone pls help me with this code

    The method createScreen() creates the first screen wherein the user makes a selection if he wants all the data ,in a range or single data.The problem comes in when the user makes a selection of single.that then displays the singleScreen() method.Then the user has to input a key data like date or invoice no on the basis of which all the information for that set of data is selected.Now if the user inputs a wrong key that does not exist for the first time the program says invalid entry of data,after u click ok on the option pane it prompts him to enter the data again.But since then whenever the user inputs wrong data the program says wrong data but after displaying the singlescreen again does not wait for input from the user it again flashes the option pane with the invalid entry message.and this goes on doubling everytime the user inputs wrong data.the second wrong entry of data flashes the error message twice,the third wrong entry flashes the option pane message 4 times and so on.What actually happens is it does not wait at the singlescreen() for user to input data ,it straight goes into displaying the JOptionPane message for wrong data entry so we have to click the optiion pane twice,four times and so on.
    Can someone pls help me with this!!!!!!!!!
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class MainMenu extends JFrame implements ActionListener,ItemListener{
    //class     
         FileReaderDemo1 fd=new FileReaderDemo1();
         FileReaderDemo1 fr;
         Swing1Win sw;
    //primary
         int monthkey=1,counter=0;
         boolean flag=false,splitflag=false;
         String selection,monthselection,dateselection="01",yearselection="00",s,searchcriteria="By Date",datekey,smonthkey,invoiceno;
    //arrays
         String singlesearcharray[];
         String[] monthlist={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"};
         String[] datelist=new String[31];
         String[] yearlist=new String[100];
         String[] searchlist={"By Date","By Invoiceno"};
    //collection
         Hashtable allinvoicesdata=new Hashtable();
         Vector data=new Vector();
         Enumeration keydata;
    //components
         JButton next=new JButton("NEXT>>");
         JComboBox month,date,year,search;
         JLabel bydate,byinvno,trial;
         JTextField yeartext,invtext;
         JPanel panel1,panel2,panel3,panel4;
         JRadioButton single,range,all;
         ButtonGroup group;
         JButton select=new JButton("SELECT");
    //frame and layout declarations
         JFrame jf;
         Container con;
         GridBagLayout gridbag=new GridBagLayout();
         GridBagConstraints gc=new GridBagConstraints();
    //constructor
         MainMenu(){
              jf=new JFrame();
              con=getContentPane();
              con.setLayout(null);
              fr=new FileReaderDemo1();
              createScreen();
              setSize(500,250);
              setLocation(250,250);
              setVisible(true);
    //This is thefirst screen displayed
         public void createScreen(){
              group=new ButtonGroup();
              single=new JRadioButton("SINGLE");
              range=new JRadioButton("RANGE");
              all=new JRadioButton("ALL");
              search=new JComboBox(searchlist);
              group.add(single);
              group.add(range);
              group.add(all);
              single.setBounds(100,50,100,20);
              search.setBounds(200,50,100,20);
              range.setBounds(100,90,100,20);
              all.setBounds(100,130,100,20);
              select.setBounds(200,200,100,20);
              con.add(single);
              con.add(search);
              con.add(range);
              con.add(all);
              con.add(select);
              search.setEnabled(false);
              single.addItemListener(this);
              search.addActionListener(new MyActionListener());     
              range.addItemListener(this);
              all.addItemListener(this);
              select.addActionListener(this);
         public class MyActionListener implements ActionListener{
              public void actionPerformed(ActionEvent a){
                   JComboBox cb=(JComboBox)a.getSource();
                   if(a.getSource().equals(month))
                        monthkey=((cb.getSelectedIndex())+1);
                   if(a.getSource().equals(date)){
                        dateselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(year))
                        yearselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(search)){
                        searchcriteria=(String)cb.getSelectedItem();
         public void itemStateChanged(ItemEvent ie){
              if(ie.getItem()==single){
                   selection="single";     
                   search.setEnabled(true);
              else if (ie.getItem()==all){
                   selection="all";
                   search.setEnabled(false);
              else if (ie.getItem()==range){
                   search.setEnabled(false);
         public void actionPerformed(ActionEvent ae){          
              if(ae.getSource().equals(select))
                        if(selection.equals("single")){
                             singleScreen();
                        if(selection.equals("all"))
                             sw=new Swing1Win();
              if(ae.getSource().equals(next)){
                   if(monthkey<9)
                        smonthkey="0"+monthkey;
                   System.out.println(smonthkey+"/"+dateselection+"/"+yearselection+"it prints this");
                   allinvoicesdata=fr.read(searchcriteria);
                   if (searchcriteria.equals("By Date")){
                        System.out.println("it goes in this");
                        singleinvoice(smonthkey+"/"+dateselection+"/"+yearselection);
                   else if (searchcriteria.equals("By Invoiceno")){
                        invoiceno=invtext.getText();
                        singleinvoice(invoiceno);
                   if (flag == false){
                        System.out.println("flag is false");
                        singleScreen();
                   else{
                   System.out.println("its in here");
                   singlesearcharray=new String[data.size()];
                   data.copyInto(singlesearcharray);
                   sw=new Swing1Win(singlesearcharray);
         public void singleinvoice(String searchdata){
              keydata=allinvoicesdata.keys();
              while(keydata.hasMoreElements()){
                        s=(String)keydata.nextElement();
                        if(s.equals(searchdata)){
                             System.out.println(s);
                             flag=true;
                             break;
              if (flag==true){
                   System.out.println("vector found");
                   System.exit(0);
                   data= ((Vector)(allinvoicesdata.get(s)));
              else{
                   JOptionPane.showMessageDialog(jf,"Invalid entry of date : choose again");     
         public void singleScreen(){
              System.out.println("its at the start");
              con.removeAll();
              SwingUtilities.updateComponentTreeUI(con);
              con.setLayout(null);
              counter=0;
              panel2=new JPanel(gridbag);
              bydate=new JLabel("By Date : ");
              byinvno=new JLabel("By Invoice No : ");
              dateComboBox();
              invtext=new JTextField(6);
              gc.gridx=0;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(month,gc);
              panel2.add(month);
              gc.gridx=1;
              gc.gridy=0;
              gridbag.setConstraints(date,gc);
              panel2.add(date);
              gc.gridx=2;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(year,gc);
              panel2.add(year);
              bydate.setBounds(100,30,60,20);
              con.add(bydate);
              panel2.setBounds(170,30,200,30);
              con.add(panel2);
              byinvno.setBounds(100,70,100,20);
              invtext.setBounds(200,70,50,20);
              con.add(byinvno);
              con.add(invtext);
              next.setBounds(300,200,100,20);
              con.add(next);
              if (searchcriteria.equals("By Invoiceno")){
                   month.setEnabled(false);
                   date.setEnabled(false);
                   year.setEnabled(false);
              else if(searchcriteria.equals("By Date")){
                   byinvno.setEnabled(false);
                   invtext.setEnabled(false);
              monthkey=1;
              dateselection="01";
              yearselection="00";
              month.addActionListener(new MyActionListener());
              date.addActionListener(new MyActionListener());
              year.addActionListener(new MyActionListener());
              next.addActionListener(this);
              invtext.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent ke){
                        char c=ke.getKeyChar();
                        if ((c == KeyEvent.VK_BACK_SPACE) ||(c == KeyEvent.VK_DELETE)){
                             System.out.println(counter+"before");
                             counter--;               
                             System.out.println(counter+"after");
                        else
                             counter++;
                        if(counter>6){
                             System.out.println(counter);
                             counter--;
                             ke.consume();
                        else                    
                        if(!((Character.isDigit(c) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)))){
                             getToolkit().beep();
                             counter--;     
                             JOptionPane.showMessageDialog(null,"please enter numerical value");
                             ke.consume();
              System.out.println("its at the end");
         public void dateComboBox(){          
              for (int counter=0,day=01;day<=31;counter++,day++)
                   if(day<=9)
                        datelist[counter]="0"+String.valueOf(day);
                   else
                        datelist[counter]=String.valueOf(day);
              for(int counter=0,yr=00;yr<=99;yr++,counter++)
                   if(yr<=9)
                        yearlist[counter]="0"+String.valueOf(yr);
                   else
                        yearlist[counter]=String.valueOf(yr);
              month=new JComboBox(monthlist);
              date=new JComboBox(datelist);
              year=new JComboBox(yearlist);
         public static void main(String[] args){
              MainMenu mm=new MainMenu();
         public class WindowHandler extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   jf.dispose();
                   System.exit(0);
    }     

    Hi,
    I had a similar problem with a message dialog. Don't know if it is a bug, I was in a hurry and had no time to search the bug database... I found a solution by using keyPressed() and keyReleased() instead of keyTyped():
       private boolean pressed = false;
       public void keyPressed(KeyEvent e) {
          pressed = true;
       public void keyReleased(KeyEvent e) {
          if (!pressed) {
             e.consume();
             return;
          // Here you can test whatever key you want
       //...I don't know if it will help you, but it worked for me.
    Regards.

  • I bought a movie the movie Godzilla 2014 recently but it didn't show up in my library. I went check the itunes store and it wants me to buy it again. Please help me with this problem.

    I just bought this movie "Godzilla 2014" but it won't show in my Movie Library. I closed my Itunes and put it back on again but still won't show up. I checked my purchased list and it shows that I recently bought the movie but when I checked the itunes store it wants to buy the movie again. Please help me with this right away Apple.

    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes
    international calling numbers..
    For Mac App Store: Apple - Support - Mac App Store.
    For iTunes: Apple - Support - iTunes.

  • HT204146 Good morning.  I just purchased Imatch but cannot download my music from an iphone 5 to IMatch in Icloud.  Can you help me with this?

    Good morning.  I just purchased Imatch but cannot download my music from an iphone 5 to IMatch in Icloud.  Can you help me with this?

    Hi
    Has iTunes completed its scan of your iTunes library on your computer Subscribing to iTunes from an iOS device.
    Jim

  • Iv got a new laptop and i moved all my music though home sharing from my old intunes onto my new one, but my iphone wont sync to the new itunes... could anyone help me with this?

    iv moved all the music over thought home sharing... from the old itunes i was using but i want to be able to sync my iphone with the new itunes on my new machine but its saying saying syncing setp 1 of 1 and nothing happens... could someone please help me with this?

    Copy the entire iTunes folder from the old computer to the new computer.

  • Help needed with this form in DW

    Hi, i have created this form in dreamweaver but ive got this problem.
    In the fields above the text field, the client needs to fill in some info such as name, email telephone number etc.
    But the problem is when ill get the messages. Only the text from the large text field is there.
    What did i do wrong??
    http://www.hureninparamaribo.nl/contact.html
    Thank you
    Anybody??

    Thank you for your response. So what do i have to do to fix this?
    Date: Sun, 20 Jan 2013 07:57:56 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help needed with this form in DW
        Re: Help needed with this form in DW
        created by Ken Binney in Dreamweaver General - View the full discussion
    You have several duplicate "name" attributes in these rows which also appears in the first row
    Telefoon:
    Huurperiode:
    Aantal personen:
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5008247#5008247
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5008247#5008247
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5008247#5008247. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Dreamweaver General by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • "It is formatted incorrectly, or is not a format that iBooks can open". Can anyone help me with this message of a book that I purchased on iBooks, read, highlighted in the book and now I can't open it anymore. Please help!!!

    "It is formatted incorrectly, or is not a format that iBooks can open". Can anyone help me with this message of a book that I purchased on iBooks, read, highlighted in the book and now I can't open it anymore. Please help!!!

    Mine does the same thing occasionally, is your phone jailbroken? Sometimes it will work if you delete the book and reinstall it or put your phone into airplane mode then turn it back off.

  • I'm using iphoto9.1.3 but now it doesn't seem to work, whenever I try to open it, it just shows loading, but never loads. Can anybody help me with this ?

    I'm using iphoto9.1.3 but now it doesn't seem to work, whenever I try to open it, it just shows loading, but never loads. Can anybody help me with this ?    

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Help me with  this assignment

    can anyone out there help me with this assignment ????? i`ll attach the file to this topic
    In this assignment, you are to write a Java applet, using arrays, to simulate the functions of a drinks-vending machine.
    The assignment requirements described below are broken down into 2 stages of development, described in this document
    as 'Basic Requirements' and 'Additional Features'. You are advised to do your programming progressively in these
    stages. An Activity Plan has also been specified for you to follow. Refer to the 'Grading Criteria' on page 5 to have
    an idea of how the different components are graded.
    1.     1. BACKGROUND
    A company intends to build computerised drinks-vending machines to enlarge its business portfolio. You have been tasked to develop a
    Java applet that simulates the operation of such a machine to determine if it will meet their needs.
    2.     1. BASIC REQUIREMENTS
    The machine should have a wide range of drinks available. A customer can choose a drink according to the following criteria:
    a)     a) Category of Drinks
    �     � Beverages
    �     � Soft Drinks
    (For beverages, there is choice of whether sugar and/or creamer is required, for which there is an additional charge.)
    b)     b) Type of Beverages
    �     � Hot
    �     � Cold
    Once a customer has specified the drink he wants, the amount payable is displayed. The unit prices to be displayed are as follows:
    Drinks     Price per Cup/Packet ($)
    Beverage:     Coffee     1.00
         Tea     1.20
         Milo     1.40
         Horlicks     1.35
         Chrysanthemum     1.00
         Ginger     0.80
    Soft Drinks:     Apple     1.40
         Orange     1.40
         Pineapple     1.50
         Carrot     2.00
         Longan     1.20
         Bandung     1.00
    (For beverages, a request for sugar or creamer attracts an additional charge of $0.10 each. Creamer is not applicable for
    chrysanthemum and ginger.)
    The customer may then confirm his order by entering the amount payable (this symbolises his payment for the drink). Whenever the
    payment input is not correct, an appropriate error message is displayed, whereupon the customer has to re-enter the amount again.
    When the correct amount is paid, the required drink is dispensed.
    For any drink that is out of stock, a message is shown, stating that it is not available. Each time a drink is dispensed, the stock for that
    drink is updated (For beverages, the stock is stored in units of servings for each cup.) To simplify the testing, you may start the simulation
    by setting the stock for each drink to 10 packets or cup-servings.
    3.     2. ADDITIONAL FEATURES
    In addition, the simulator can have the following features:
    a)     a) Smart Graphical User-Interface (GUI)
    You may build upon the basic requirements by recommending alternative drinks of the same category, whenever a requested
    drink is not available (as signified from the stock). In this case, only drinks which are available (i.e., in sufficient stock) are
    displayed for the customer to choose. And if only soft drinks are available, the selections for creamer and sugar should be disabled.
    b)     b) Multiple Orders
    A customer could order more than one drink. The system could allow him to specify as many drinks as he wants, prompting him
    for an appropriate payment, and then dispensing the drinks accordingly, subject to availability. This may also entail the extension
    of the graphical user-interface.
    c)     c) Sales Analysis
    Periodically, the total revenue accumulated since the last collection is printed in descending order of sales for each drink sold,
    together with a grand total. The cash is then cleared from the machine. This feature requires password-protection.
    d)     d) Replenishment of Stock
    Periodically, the stock is checked to determine how much of each drink needs to be replenished. For this purpose, a list of the
    drinks with the corresponding quantity on hand is printed in ascending order of stock level. Drinks with insufficient stock are
    topped up to a level of 10 servings or packets. This feature also requires password-protection.
    e)     e) Any other relevant features
    You are limited only by your creativity. You can add any other relevant features for this project. Please consult your tutor before
    you proceed.
    To qualify for the full marks for this section, you need to implement 2 features, at least one of which must be either (a) or (b) above.
    4.     3. ACTIVITY PLAN
    Suggestions for Getting Started
    There are many ways that you could complete this assignment. The most important part is to think about the entire project first so that
    it is easy to integrate the various pieces. You should also consider what type of graphics you want to incorporate.
    a)     a) Analysis
    1. Understand the program specification and the requirements before attempting the project.
    b)     b) Program Design
    2.     Work out the GUI components (e.g., TextFields, CheckBoxes, ChoiceBoxes, Buttons, etc.) needed to get the user input.
    3.     3. Work out the main logic of the program using modular programming techniques; i.e. use methods appropriately. E.g., tasks that perform
    4.     4. a well-defined function or those that are repeated should be coded as methods. For example, you can write the methods, displayBill(),
    5.     5. makePayment(), computeTotal(), dispenseDrink(), etc. You need to think carefully about the return type and the parameters of each
    6.     6. method.
    7.     7. You are required to use arrays appropriately for this assignment. Marks will be deducted for inefficient use or non-usage of arrays.
    c) Implementation & Testing
    8.     8. Write the method definition of each method ONE at a time.
    9.     9. Test your program logic to make sure that it works. In the interim, you can use �g.drawString(�);� or �System.out.println(�);� to print
    10.     10. out intermediate results so that you can see whether your program is working correctly. You may not want to bother about error-checking
    11.     11. at this point. You should test each method as soon as it is written, as it is much easier to debug your program in this way.
    5.     4. DELIVERABLES
    By Monday, 25th February before 5:00 p.m., hand in the following to the School of ICT Administrative Office at Block 31, level 8:
    �     � A copy of the printout of your .java file.
    �     � A diskette labelled with your name, group, student ID. The diskette should contain ALL the necessary files (.java, .html, and .class)
    to run your applet.
    �     � The above in an envelope topped with the Assignment Completion Report (see pages 6, 7 & 8). Page 6 is for you to paste on top
    of your envelope whilst pages 7 and 8 are for you to document your Test Plan, and write your comments (including any
    special instructions to run your program) - to be inserted into the envelope.
    In your .java program, you are to include a blocked comment at the top stating:
    q     q Your name, group, student ID.
    q     q Assumptions (if any) or any deviations from the specified requirements.
    q     q Any features that you would like to highlight.
    6.     5. WALK-THROUGH OF PROGRAM
    Monday 25th February at 9:30 a.m. SHARP
    In the walk-through, you will be asked to give short, written answers to some questions about your program. These questions will assess
    your basic understanding of the code that you are handing in. If you fail to display adequate understanding of your own program, you can
    be down-graded by up to two letter grades from what you would have normally received. It is also possible that you will be called to
    perform a demonstration cum explanation of your work if it is suspected that you have copied someone else�s work. Lesson: do your own
    work and you will have no problem!
    7.     6. GRADING CRITERIA FOR PROGRAMMING
    Correct and robust implementation of basic features     55 %
    Additional features     20 %
    Programming style:�     � Program design�     � Appropriate use of arrays�     � Appropriate use of variables, methods, and parameters�     � Proper usage of control structures (e.g. if/else, loops)     15 %
    Good programming practice:�     � Meaningful variable names �     � Proper indentations�     � Useful and neat comments     5 %
    Adequate (black-box) testing:�     � Suitably-designed test plan     5 %
    Total:     100 %
    PROBLEM SOLVING & PROGRAMMING II
    (Dip IT/MMC/EI, Year 1, Semester 2)
    Assignment Completion Report (to be attached to cover of envelope)
    Name: ___________________________________ Group: ________
    ID: ___________________ Date & Time submitted: ____________
    Requirements     % Done (0-100)     Remarks
    BASIC FEATURES          
    �     � Can choose category (and select appropriate additives)          
    �     � Can choose drink (with error checking)          
    �     � Can display amount payable          
    �     � Can indicate availability of drink (with error checking)          
    �     � Can accept payment for drink (with error checking)          
    �     � Can dispense drink          
    �     � Can update stock          
    ADDITIONAL FEATURES          
    �     � Smart GUI          
    �     � Multiple Orders          
    �     � Sales Analysis (with password checking)          
    �     � Stock Replenishment(with password checking)          
    �     � Any other relevant features          
    Test Plan
    Using black-box testing, record your test specification and the results according to the following format (the examples here are provided
    for your reference only):
    Test No.     Purpose     Test Shot/Data     Expected Result     Actual Result
    E.g. 1a)     Check whether beverage can be selected      Click on �Chrysanthe-mum� button     Checkbox for �Sugar� but not �Creamer� appear     �Sugar� and checkboxes appeared
    E.g. 1b)     Check whether chrysanthemum with sugar can be ordered      Select sugar and click on �Order� button     Amount payable appears as �$1.10� (i.e., $1.00 + $0.10)     Amount payable shown as $1.10
    E.g. 1c)     Check whether correct payment can be accepted      Enter �1.00� in �Payment� textfield     Error message �Insufficient payment - $0.10 short� appears     Confirmation message �Drink being dispensed� appeared � ERROR!
    E.g. 1d)     Re-test 1c), after amending program      As above     As above     Error message �Insufficient payment - $0.10 short� appeared
    etc.                    
    etc.                    
    Remember to hand in this test plan together with the other deliverables in the envelope.
    Have you�
    1.     1. Checked to make sure program still works properly even with windows resized?
    2.     2. Tested your program thoroughly, as if you're trying to break it?
    Any comments about this assignment? Any special instructions to run your program? Write it here.

    public class testing1 {
    String gg;
    public void testing3() {
    System.out.print(gg); }
    // this is are constructor for the object and method we are going to make
    next code
    class testing {
    public static void main(String[] args) {
    testing1 tes = new testing1();
    tes.gg = "hello there";
    tes.testing3(); //here we have made a object and a method
    hope this helps

  • I can't find the 2G, 3G and LTE options after updating to iOS8.1, can anyone help me with this? I'm using iPhone5s

    I can't find the 2G, 3G and LTE options after updating to iOS8.1, can anyone help me with this? I'm using iPhone5s

    I have check on my service provider about the correct APN settings, but unfortunately doesnt work still..

  • I need to reinstall my operating system for 10.5 after seeing a file folder and question mark flashing on my start up screen. Can anyone help me with this?

    I need to reinstall my operating system for 10.5 after seeing a file folder and question mark flashing on my start up screen. Can anyone help me with this?

    Hello,
    That means it can find the Hard Drive, or can't find the things needed for booting.
    See if DU even sees it.
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • Hii, i got an iTunes card for $15 and only used $6 in it, but it say I only have $0.37 left. If any one could help me with this, I will be forever grateful.

    Hii, i got an iTunes card for $15 and only used $6 in it, but it say I only have $0.37 left. If any one could help me with this, I will be forever grateful.

    You will need to Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • HT1365 Hi can anyone help with this issue regarding my wireless magic mouse? When im on google chrome and scrolling down the page i always have youtube running in the background but the audio cuts/spits/pops can anyone help me with this?

    Hi can anyone help with this issue regarding my wireless magic mouse? When im on google chrome and scrolling down the page i always have youtube running in the background but the audio cuts/spits/pops can anyone help me with this?

    The figures you mention only make sense on your intranet.  Are you still using the same wireless router.  The verizon one is somewhat limited as far as max wireless-n performace.  For one thing it only has a 2.4 radio.   I like many people who wanted wireless-n performance before they even added a wireless-n gigabit router, have my own handling my wireless-n network.

  • Can somebody help me with this code?

    Can anyone help me with this code? My problem is that i can't
    seem to position this form, i want to be able to center it
    vertically & horizontally in a div either using CSS or any
    other means.
    <div id="searchbar"><!--Search Bar -->
    <div id="searchcart">
    <div class="serchcartcont">
    <form action='
    http://www.romancart.com/search.asp'
    name="engine" target=searchwin id="engine">
    <input type=hidden value=????? name=storeid>
    <input type=text value='' name=searchterm>
    <input type=submit value='Go'> </form>
    </div>
    </div>
    <div class="searchcont">Search For
    Products:</div>
    </div><!-- End Search Bar -->
    Pleasssssseeeeeeee Help
    Thanks

    Hi,
    Your form is defined in a div named "serchcartcont", you can
    use attributes like position and align of the div to do what you
    want to do. But there are two more dives above this dive, you will
    have define the height width of these before you can center align
    the inner most div. If you are not defining the height & width
    then by default it decide it automatically to just fit the content
    in it.
    Hope this helps.
    Maneet
    LeXolution IT Services
    Web Development
    Company

  • When my screen saver has been on a while, I have to use the cursor to "rub out" part of the screen saver to see my login section. Can anyone help me with this?

    When my screen saver has been on a while, I have to use the cursor to "rub out" part of the screen saver to see my login section. Can anyone help me with this?

    I don't have a solution for you, but just wanted to let you know I used to have the exact same problem. I resolved it (for the most part....about 90% of the time, anyway) by adjusting the screensaver and power settings to never let the computer go to sleep.

  • HT6030 I would like to send an e-mail to a group of people I have the group created, but when I drag it to bcc or to it will not attach. can anymon help me with this?

    Help I would like to send an e-mail to a group of people,  I have the group created, but when I drag it to bcc or to- it will not attach. can anymon help me with this?

    In a new email message window start to type the name of the Group you have in Contacts/Address Book in the 'To' field - it should self-complete when it recognises the name.
    (Note: this only works with 'normal' Groups and not Smart 'Groups').

Maybe you are looking for