July 25th, 2013, 04:12 AM
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.
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.
– Please provide data definitions, contract and test/check cases !
– All time argument of the functions must be in time structure
July 25th, 2013, 04:18 AM
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..
July 25th, 2013, 04:20 AM
i didnt understand ) Second, your program reads from the file “fileIN.dat” defined above and it must convert the content
Originally Posted by eramit2010
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
July 25th, 2013, 04:24 AM
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.
July 25th, 2013, 04:27 AM