Thread: Need Help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0

    Need Help


    i need to write a program for my project in school can someone help

    CMPE 100 – PROJECT
    Due date 25 July 16:00
    In this project you are expected to develop a program that reads a time from a file, then your program
    should compute some tasks defined below. Time definition of the file will be in “hour-min-second”
    format (e.g. 14:02:30 or 18:05:02 or 22:12:01 ).
    Manually you should create a file named “fileIN.dat”, save it into your working directory and it should
    arbitrarily contain a time definition. See following case as an example.
    22:12:01
    Your tasks:
    1) First of all, you should define a time structure whose three parts are hour(Number) ,
    minute(Number) and second(Number).
    2) Second, your program reads from the file “fileIN.dat” defined above and it must convert the content
    of the file into a time structure.
    3) Define a isAfterNoon function that takes the time argument coming from the file (First task) checks
    whether given time is after 12:00:00 or not, if so the function write “It is afternoon”, else “it is not
    afternoon” to the file named “fileOUT.dat”
    4) Define isBefore function takes two time arguments and checks if first is before second. If so, it
    returns true, else returns false. E.g, for the arguments 12:00:07 and 12:30:02 , it should return true.
    5) Define diff-time function that takes two time arguments, and it counts how many seconds exists
    between the given time arguments. Be carefull ! that you should check which one is before or after. If
    you miss this checking your calculation could be negative. Therefore depending on that fact, you
    should/maybe swap the arguments first.
    Warnings:
    – Please provide data definitions, contract and test/check cases !
    – All time argument of the functions must be in time structure
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    India
    Posts
    95
    Rep Power
    4
    this is not right way to ask question.
    first you should work on it and then if u found any problem then u should ask ur problem here..
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    Originally Posted by eramit2010
    this is not right way to ask question.
    first you should work on it and then if u found any problem then u should ask ur problem here..
    i didnt understand ) Second, your program reads from the file “fileIN.dat” defined above and it must convert the content
    of the file into a time structure. how can make it ?

    when i made it the program opens with gom player and its not work
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Location
    India
    Posts
    95
    Rep Power
    4
    u need to create a file and store ur time in ur file fileIN.dat and need to open in program.
    no need to open it using double click.
    create file using notepad or other editor and save it as fileIN.dat

    use any file operation based on language u r using and read time from that file.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    3
    Rep Power
    0
    thank you

IMN logo majestic logo threadwatch logo seochat tools logo