Results 1 to 10 of 10
  1. #1

    Default pwede patabang ani problemaha?


    Write a Java program to calculate the parking fare for customers who park their cars in a
    parking lot when the following information is given:

    a. A character showing the type of vehicle: C for car, B for bus, T for truck.
    b. An integer between 0 to 24 showing the hour the vehicle entered.
    c. An integer between 0 to 60 showing the minute the vehicle entered the lot.
    d. An integer between 0 to 24 showing the hour the vehicle left the lot.
    e. An integer between 0 to 60 showing the minute the vehicle left the lot.

    This is a public lot. To encourage people to park for a short period of time, the management uses two
    different rate for each type of vehicle, as shown in the table below:



    No vehicle is allowed to stay in the parking lot later than midnight; it will be towed away.

    The input data consists of a character and a set of four integers representing the type of vehicle and the
    entering and leaving hours and minutes. But these pieces of data must be inputted into the computer in a
    user-friendly way. In other words, the computer must prompt the user to enter each piece of data as
    shown below:

    Type of Vehicle? C
    Hour vehicle entered lot (0 -24)? 14
    Minute vehicle entered lot (0 – 60)? 23
    Hour vehicle left lot (0 – 24)? 18
    Minute vehicle left lot (0 – 60)? 8

    The output format is:

    PARKING LOT CHARGE

    Type of Vehicle: Car
    TIME IN xx : xx
    TIME OUT xx : xx
    --------
    PARKING TIME xx : xx
    ROUNDED TOTAL xx
    --------
    TOTAL CHARGE xx.xx

    This program must first calculate the actual time spent in the parking lot for each vehicle.
    This means using modulo artihmetic to handle time calculation. We can calculate this in many ways, one of
    which is shown below. To calculate the time spent in the parking lot, use the following algorithm:

    a. Compare the minute portion of the leaving and the entering time.
    If the first one is smaller that the second,
    a.1 Add 60 to the minute portion of the leaving time
    a.2 subtract 1 from the hour portion of the leaving time
    b. Subtract the hour portions
    c. Subtract the minute portions
    d. Since there are no fractional hour charges, the program must also round the parking time up to the
    next hour before calculating the charge.

  2. #2
    mura mani ug project or for MIDTERMS...hehehehe. Anyway, what have you done so far? Post daw imong java code diri.

  3. #3
    bitaw, post what you have done so far, basin kami mahagbong nga maghimo sa imo project

  4. #4
    Quote Originally Posted by nelldnine View Post
    Write a Java program to calculate the parking fare for customers who park their cars in a
    parking lot when the following information is given:

    a. A character showing the type of vehicle: C for car, B for bus, T for truck.
    b. An integer between 0 to 24 showing the hour the vehicle entered.
    c. An integer between 0 to 60 showing the minute the vehicle entered the lot.
    d. An integer between 0 to 24 showing the hour the vehicle left the lot.
    e. An integer between 0 to 60 showing the minute the vehicle left the lot.

    This is a public lot. To encourage people to park for a short period of time, the management uses two
    different rate for each type of vehicle, as shown in the table below:



    No vehicle is allowed to stay in the parking lot later than midnight; it will be towed away.

    The input data consists of a character and a set of four integers representing the type of vehicle and the
    entering and leaving hours and minutes. But these pieces of data must be inputted into the computer in a
    user-friendly way. In other words, the computer must prompt the user to enter each piece of data as
    shown below:

    Type of Vehicle? C
    Hour vehicle entered lot (0 -24)? 14
    Minute vehicle entered lot (0 – 60)? 23
    Hour vehicle left lot (0 – 24)? 18
    Minute vehicle left lot (0 – 60)? 8

    The output format is:

    PARKING LOT CHARGE

    Type of Vehicle: Car
    TIME IN xx : xx
    TIME OUT xx : xx
    --------
    PARKING TIME xx : xx
    ROUNDED TOTAL xx
    --------
    TOTAL CHARGE xx.xx

    This program must first calculate the actual time spent in the parking lot for each vehicle.
    This means using modulo artihmetic to handle time calculation. We can calculate this in many ways, one of
    which is shown below. To calculate the time spent in the parking lot, use the following algorithm:

    a. Compare the minute portion of the leaving and the entering time.
    If the first one is smaller that the second,
    a.1 Add 60 to the minute portion of the leaving time
    a.2 subtract 1 from the hour portion of the leaving time
    b. Subtract the hour portions
    c. Subtract the minute portions
    d. Since there are no fractional hour charges, the program must also round the parking time up to the
    next hour before calculating the charge.
    brad, i-specific lang ang pangutana ayaw nang nangayu kag tabang sa tibook program jd..
    murag wla joy mosugot na i-spoonfeedan ka dri, dli ka makat.on jd ana do..
    start asking specific questions lang like; How to print something on screen using java and wait for input?

  5. #5
    Quote Originally Posted by cebugdev View Post
    brad, i-specific lang ang pangutana ayaw nang nangayu kag tabang sa tibook program jd..
    murag wla joy mosugot na i-spoonfeedan ka dri, dli ka makat.on jd ana do..
    start asking specific questions lang like; How to print something on screen using java and wait for input?
    Mao bitaw nangayo mi kung unsa na iyang gibuhat so far, para from there masugdan ug tabang kung angay ba jud tabangan. Kung wala jud ni cya gibuhat, wala jud motabang aning bata-a ni.

  6. #6
    Elite Member
    Join Date
    Apr 2010
    Gender
    Male
    Posts
    1,097
    Blog Entries
    6
    Quote Originally Posted by nelldnine View Post
    Write a Java program to calculate the parking fare for customers who park their cars in a
    parking lot when the following information is given:

    a. A character showing the type of vehicle: C for car, B for bus, T for truck.
    b. An integer between 0 to 24 showing the hour the vehicle entered.
    c. An integer between 0 to 60 showing the minute the vehicle entered the lot.
    d. An integer between 0 to 24 showing the hour the vehicle left the lot.
    e. An integer between 0 to 60 showing the minute the vehicle left the lot.

    This is a public lot. To encourage people to park for a short period of time, the management uses two
    different rate for each type of vehicle, as shown in the table below:



    No vehicle is allowed to stay in the parking lot later than midnight; it will be towed away.

    The input data consists of a character and a set of four integers representing the type of vehicle and the
    entering and leaving hours and minutes. But these pieces of data must be inputted into the computer in a
    user-friendly way. In other words, the computer must prompt the user to enter each piece of data as
    shown below:

    Type of Vehicle? C
    Hour vehicle entered lot (0 -24)? 14
    Minute vehicle entered lot (0 – 60)? 23
    Hour vehicle left lot (0 – 24)? 18
    Minute vehicle left lot (0 – 60)? 8

    The output format is:

    PARKING LOT CHARGE

    Type of Vehicle: Car
    TIME IN xx : xx
    TIME OUT xx : xx
    --------
    PARKING TIME xx : xx
    ROUNDED TOTAL xx
    --------
    TOTAL CHARGE xx.xx

    This program must first calculate the actual time spent in the parking lot for each vehicle.
    This means using modulo artihmetic to handle time calculation. We can calculate this in many ways, one of
    which is shown below. To calculate the time spent in the parking lot, use the following algorithm:

    a. Compare the minute portion of the leaving and the entering time.
    If the first one is smaller that the second,
    a.1 Add 60 to the minute portion of the leaving time
    a.2 subtract 1 from the hour portion of the leaving time
    b. Subtract the hour portions
    c. Subtract the minute portions
    d. Since there are no fractional hour charges, the program must also round the parking time up to the
    next hour before calculating the charge.
    masdali kung excel ang gamiton ani! lol!
    saun ra kaau ni oi LOGIC lang

  7. #7
    sorry sa late replies mga boss, naa sa school akong work nya mura'g halfway pa ko, paki close nalang ni nga thread. ako nala'y maningkamut ani trabahua. nya nice guess sa midterm nga project. hahahahaha

  8. #8
    Quote Originally Posted by nelldnine View Post
    sorry sa late replies mga boss, naa sa school akong work nya mura'g halfway pa ko, paki close nalang ni nga thread. ako nala'y maningkamut ani trabahua. nya nice guess sa midterm nga project. hahahahaha

    good. hehe

  9. #9
    Quote Originally Posted by crysyani View Post
    masdali kung excel ang gamiton ani! lol!
    saun ra kaau ni oi LOGIC lang

    haha, excel lagi, turbo ecxel, hahaha

  10. #10
    Hehehehe excel ang gamiton?

  11.    Advertisement

Similar Threads

 
  1. Para sa mga Seaman - pwede pud any OFW
    By geo_cyso in forum Overseas
    Replies: 6
    Last Post: 07-23-2013, 01:55 PM
  2. pwede patabang set up og mail server?
    By gabs in forum Networking & Internet
    Replies: 10
    Last Post: 02-23-2011, 03:43 PM
  3. asa ta pwede mangita ani
    By dglgb in forum Computer Hardware
    Replies: 14
    Last Post: 01-27-2011, 03:08 PM
  4. Calling All Bloggers! Pwede patabang? :D
    By cdobaby in forum Websites & Multimedia
    Replies: 0
    Last Post: 11-19-2010, 08:46 PM
  5. Pwede patabang? Driver for my bluetooth?
    By vaneeh21 in forum Software & Games (Old)
    Replies: 6
    Last Post: 11-28-2009, 09:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top