Elitebruger
Tilføjet:
29-03-2005 15:34:59
Svar/Indlæg:
216/96
har denne opgave men er kørt fast:
The Problem
You are to develop a computer program handling the billing at the Travel agency FIDUS. This agency is known for its group-travels for China. The program must be able to read input from a user, calculate and print out the price pr. person and the total price for a group-travel to Turkey
The agency has to types of travels with fixed prices:
Normal: 1400 DKK Pr. Person
Deluxe: 1900 DKK Pr. Person
Note that the customer will be given a 10% discount on the total price, if the number of participants exceed or equals 10.
If a member of a group has used the travel agency before, the total price for the group will be reduced further as follows:
If 10 or more persons in the group 1000 DDK
If 6 - 9 persons in the group 500 DDK
Else 200 DDK
Somewhere in you program you will need a construction like:
String answer = JOptionPane.showInputDialog("Same destination?: ");
if ((answer.equals("yes") || (answer.equals("y")) {
For children there will be a discount of 5%. But children don't count in the other discount rules.
Expand the program so it can differentiate between number of adults and number of children.
You are to create a program, which can handle the billings at FINDUS.
Create two classes a Java GUI Class TravelGUI and a Java class Travel,
Somewhere in you program you will need a construction like:
If (noParticipants >= 10) {
}
Write the program, compile, run and remember to save the classes..
nogen der kan hjælpe mig ?? det er fint at svare på dansk :)