Click here to Skip to main content
15,917,971 members
Home / Discussions / Java
   

Java

 
GeneralRe: Automated trading Pin
Nagy Vilmos29-Mar-09 22:54
professionalNagy Vilmos29-Mar-09 22:54 
QuestionUsing Java script create an array of 10 elements. Accept values from user. Store accepted values in list box Pin
ajaycando027-Mar-09 9:47
ajaycando027-Mar-09 9:47 
AnswerRe: Using Java script create an array of 10 elements. Accept values from user. Store accepted values in list box Pin
fly90427-Mar-09 10:25
fly90427-Mar-09 10:25 
AnswerRe: Using Java script create an array of 10 elements. Accept values from user. Store accepted values in list box Pin
TorstenH.30-Mar-09 20:49
TorstenH.30-Mar-09 20:49 
GeneralRe: Using Java script create an array of 10 elements. Accept values from user. Store accepted values in list box Pin
adatapost5-Apr-09 17:13
adatapost5-Apr-09 17:13 
QuestionPolynomials and Domino on Java Pin
wardoe12327-Mar-09 1:56
wardoe12327-Mar-09 1:56 
AnswerRe: Polynomials and Domino on Java Pin
fly90427-Mar-09 2:49
fly90427-Mar-09 2:49 
QuestionPlease help me to write a program to simulate a bookstore in java Pin
pcymin26-Mar-09 23:56
pcymin26-Mar-09 23:56 
Here is the question. Thanks loads...

Some of the characteristics of a book are title, author(s), publisher, ISN, price and year of publication. Design the class Book. Each object of the class Book can hold the following information about a book: title, up to four authors, publisher, ISBN, price, and number of copies in stock. To keep track of the number of author add another instance variable.

Include the methods to perform various operations on the objects of Book. For example, the usual operations that can be performed on the title are to show title, set the title, and check whether the title is the actual title of the book. Similarly, the typical 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 copies in stock, update the number of copies in stock and return the number of copies in stock. Add similar operations for the publisher, ISBN, book price and authors. Add the appropriate constructors.

Design a class Member, in which each object of Member can hold the name of a person, member ID, number of books bought and amount spent. Include the methods to perform various operations of the class Member – for example, modify, set and show the person’s name. Similarly update, modify and show the number of books bought and amount spent. Add appropriate constructors.

Using the class Book and Member, write a program to simulate a bookstore. The bookstore has two types of customers: those who are members of the bookstore and those who buy books from the book store only occasionally. Each member has to pay RM10 as yearly membership fees and receives a 5% discount on each book bought.

For each member, the bookstore keeps track of the number of books bought and the total amount spent. For every eleventh book that a member buys, the bookstore takes the average of the total amount of the last 10 books bought, applies this amount as a discount, and then reset the total amount spent to 0.

Write a program that can process up to 100 book titles and 50 members. Your program should contain a menu that gives the user different choices to effectively run the program; in other words, your program should be menu driven. You can use javax.swing for this purpose.
AnswerRe: Please help me to write a program to simulate a bookstore in java Pin
Deresen27-Mar-09 1:29
Deresen27-Mar-09 1:29 
JokeRe: Please help me to write a program to simulate a bookstore in java Pin
pcymin27-Mar-09 2:41
pcymin27-Mar-09 2:41 
GeneralRe: Please help me to write a program to simulate a bookstore in java Pin
Deresen27-Mar-09 2:52
Deresen27-Mar-09 2:52 
GeneralRe: Please help me to write a program to simulate a bookstore in java Pin
pcymin27-Mar-09 3:25
pcymin27-Mar-09 3:25 
QuestionI'm Trying To Make A Pong Game but don't know how to use threading. Can someone help me? Pin
Christopher Clarke26-Mar-09 10:20
Christopher Clarke26-Mar-09 10:20 
AnswerRe: I'm Trying To Make A Pong Game but don't know how to use threading. Can someone help me? Pin
fly90427-Mar-09 3:02
fly90427-Mar-09 3:02 
QuestionJava Data Structures help Pin
yingfo24-Mar-09 5:07
yingfo24-Mar-09 5:07 
AnswerRe: Java Data Structures help Pin
Nagy Vilmos24-Mar-09 6:44
professionalNagy Vilmos24-Mar-09 6:44 
AnswerRe: Java Data Structures help Pin
jschell1-Apr-09 14:57
jschell1-Apr-09 14:57 
QuestionCombo box containing Checkbox as its items Pin
PrajnaS23-Mar-09 20:56
PrajnaS23-Mar-09 20:56 
AnswerRe: Combo box containing Checkbox as its items Pin
TorstenH.24-Mar-09 20:53
TorstenH.24-Mar-09 20:53 
AnswerRe: Combo box containing Checkbox as its items Pin
PrajnaS24-Mar-09 21:01
PrajnaS24-Mar-09 21:01 
GeneralRe: Combo box containing Checkbox as its items [modified] Pin
TorstenH.24-Mar-09 21:12
TorstenH.24-Mar-09 21:12 
GeneralRe: Combo box containing Checkbox as its items Pin
PrajnaS24-Mar-09 21:16
PrajnaS24-Mar-09 21:16 
GeneralRe: Combo box containing Checkbox as its items Pin
TorstenH.24-Mar-09 21:18
TorstenH.24-Mar-09 21:18 
GeneralRe: Combo box containing Checkbox as its items Pin
PrajnaS24-Mar-09 22:31
PrajnaS24-Mar-09 22:31 
Questionjava Applets Pin
fesali23-Mar-09 0:08
fesali23-Mar-09 0:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.