Re: program

From: huy (nytimes_at_swiftdsl.com.au)
Date: 02/02/05


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();
     }
}



Relevant Pages

  • Re: Hide all controls inside another control
    ... Of course it can be done, but where is the flight information coming from? ... > original flight number departure time, arrival time at connecting aiport, ... > connecting flight number, departure time of 2nd flight and arrival time at ...
    (microsoft.public.access.forms)
  • Re: program
    ... > Write a complete Java program that does the following: ... > airline flight. ... > Display the departure time, the arrival time, and the flight time (in ...
    (comp.lang.java.programmer)
  • Re: program
    ... > Write a complete Java program that does the following: ... > airline flight. ... > Display the departure time, the arrival time, and the flight time (in ...
    (comp.lang.java.programmer)
  • Re: program
    ... > Write a complete Java program that does the following: ... > airline flight. ... > Display the departure time, the arrival time, and the flight time (in ...
    (comp.lang.java.programmer)
  • 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. ... Display the departure time, the arrival time, and the flight time (in ...
    (comp.lang.java.programmer)