Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Java programming:JOptiomPane method
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Sciencor




PostPosted: Sat Sep 04, 2010 6:11 am   Post subject: Java programming:JOptiomPane method

hellow good people, i am a new user in Computer Science Canada. i just came across it when i was googling the JOptionPane method. i need help on my assignment, it will contribute to my year mark and im just stuck Neutral . The problem follows:

a) Some of the characteristics of the book are the tittle(s), publisher,ISBN,edition,price and year of the publication.Design the class Book that defines the book as an ADT.

Each object of the class Book can hold the following information about the book: title, up to four authors,publisher,ISBN,price and number of copies in stock. To keep track of the number of the authors, add another instance variable.

Inlude the member method to perform the various operations on the objects of Bokk. For example, the usual operations on the title are to show the title, set the title, and check whether the title is the actual of the book. Similary, the typical number of operations that can be performed on the number of copies in stock are to show the number of copies in stock, set the number of copis in stock, update the number of copies in stock and return the number of copies in stock. Add operations for the publisher,ISBN,book price and authors. Add apropriate constructors.

b)Write a definition of the member methods of the class Book.
c)Write a program that uses and tests the various operations on the objects of class Book. Declare an array of 100 components of type Book. Some of the operations on the object that you should perform are to search for a book by its title if more than one book has the same title, search by ISBN and update the number of copies of a book. The JOptionPane class has to read input. Sad plz help me
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Sat Sep 04, 2010 8:25 am   Post subject: RE:Java programming:JOptiomPane method

So what do you need help with?
Nai




PostPosted: Sat Sep 04, 2010 12:14 pm   Post subject: RE:Java programming:JOptiomPane method

So are you looking for a method in JOptionPane that reads input?

..Like

JOptionPane.showInputDialog("Enter input");
Nai




PostPosted: Sat Sep 04, 2010 8:57 pm   Post subject: Re: Java programming:JOptiomPane method

Which is used like this by the way:

code:

String theInput;

theInput = JOptionPane.showInputDialog("Enter the input"); //Method returns a String



And then whatever was entered into the dialog box is in theInput. If you wanted an integer from the user then you'd have to use Integer.parseInt(theInput) .

Hope this helps, but I'm still kind of an amateur in Java.
Sciencor




PostPosted: Wed Sep 08, 2010 10:33 am   Post subject: Re: Java programming:JOptiomPane method

thank you everyone
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: