Re: program
From: huy (nytimes_at_swiftdsl.com.au)
Date: 02/02/05
- Next message: Hal Rosser: "Re: ...::: Java program :::..."
- Previous message: Phil Staite: "Re: program"
- In reply to: mehak gupta via JavaKB.com: "program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 02 Feb 2005 14:50:28 +1100
mehak gupta via JavaKB.com wrote:
> i would to get the solution for the following program.
>
> Write a complete Java program that does the following:
> Prompt the user to type in the hour and minute departure time for an
> airline flight.
> Prompt the user to type in the hour and minute arrival time for that
> flight. (Note: assume that the flight occurs in just one afternoon, leaving
> at or after 1:00 and arriving at or before 12:59. Assume also that the user
> provides valid input values!)
> Calculate the total number of minutes the flight will be in the air.
> Display the departure time, the arrival time, and the flight time (in
> minutes) of the flight.
>
Here's a tip:
/**
* Write a complete Java program that does the following:
* Prompt the user to type in the hour and minute departure time for an
* airline flight.
* Prompt the user to type in the hour and minute arrival time for that
* flight. (Note: assume that the flight occurs in just one afternoon,
* leaving
* at or after 1:00 and arriving at or before 12:59. Assume also that
* the user
* provides valid input values!)
* Calculate the total number of minutes the flight will be in the air.
* Display the departure time, the arrival time, and the flight time (in
* minutes) of the flight.
*/
public class Assignment {
public Assignment() {
}
public void doAssignment() {
}
public void main(String[] argv) {
Assignment a = new Assignment();
a.doAssignment();
}
}
- Next message: Hal Rosser: "Re: ...::: Java program :::..."
- Previous message: Phil Staite: "Re: program"
- In reply to: mehak gupta via JavaKB.com: "program"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|