Pls help me to do this project in C I need source code

This is a discussion on Pls help me to do this project in C I need source code within the C Programming forums, part of the General Programming Boards category; Write a program which allows a telephone company to maintain a list of telephone call details. Each call record is ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    1

    Lightbulb Pls help me to do this project in C I need source code

    Write a program which allows a telephone company to maintain a list of telephone call details. Each call record is to store the following fields:
    1. a 6-digit calling telephone number*;
    2. date and time of telephone call start*;
    3. date and time of telephone call finish*;
    4. a date and time string of record entry (obtained from the system clock at time of successful record entry);
    5. duration of call (in minutes);
    6. cost of call;
    7. time difference between call finish and record entry (in truncated hours).
    * where fields 1, 2 and 3 are to be user entered

    Your application is to implement the following requirements:
    the user is to be provided with the opportunity to enter new call details, view currently stored call details or exit the application
    upon opting to enter new call details, the user is to be able to repeatedly use the call entry process until he/she enters some indication to quit
    for a given call the user is to be prompted to enter the 6-digit calling telephone number, the call start date and time and the call finish date and time (all dates are to be entered, stored and reported using the usual three number approach while all times are to entered, stored and reported as 24 hour times with hours and minutes only, i.e. 00:00 to 23:59); call start and finish dates must be after 01/01/1900
    if the user entered call start and finish dates and times are valid the program should store the date and time string for the record entry (see below for discussion on generation of this string) and call start and finish dates and times and calculate and store the call duration in minutes
    for the calculated call duration the program should calculate and store the call cost according to the following charges:
    the basic rate for a call is $0.20 per minute
    Saturday and Sunday calls are to be charged at 50% of the basic rate
    weekday calls commencing before 08:00 or after 17:59 are to be charged at 75% of the basic rate
    Note: Each call, irrespective of length, is to be charged at a single rate determined by the call start time only (i.e. calls that continue into a different cost time are to be fully charged at the start rate)
    for the record entry date and time string and call finish date and time the program should calculate and store the time difference between call finish and record entry (in truncated hours)
    before proceeding with the next call entry, the program should provide screen output displaying the six items of interest for the entered call
    the list of stored calls should be the last five (use a #define to set this up) entered calls only; a sixth entered call, for example, would result in the first entered call 'dropping off' the stored list

    Advice:

    1. A leap year may be determined by the following rule:
    Any year which is a multiple of 4 is a leap year;
    unless it is also a multiple of 100, in which case it is not a leap year;
    unless it is also a multiple of 400, in which case it is a leap year.
    For example, 2100 is not a leap year, but year 2000 is a leap year.
    2. January 1, 1900 fell on a Monday.
    3.Try to include appropriate comments in your program.

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    *sniffs the air* smells like...like...*sniff* school! It's a homework assignment! Ack!


    if you want help post what you've done so far and tell us where you're havin trouble.

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Answer: There is no need. The telephone switches automatically collect all the information, save the cost.
    And a six digit calling telephone number???? Does the UK use six digit numbers? Thought that most of the world was on 7 or 10 digit. Oh well

  4. #4
    Registered User The15th's Avatar
    Join Date
    Aug 2001
    Posts
    125
    Here is the answer to your question

    http://www.cprogramming.com/cboard/a...p?s=&forumid=4


  5. #5
    Registered User Generator's Avatar
    Join Date
    Aug 2001
    Posts
    238
    I told everyone how we should setup the site but did they listen? noooooooooooooooooooooooooo look at my suggestion My great suggestion
    What's a matter you no like peppi?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Documenting Source Code
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-04-2008, 12:18 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 02:30 PM
  3. Need software to help to understand C source code
    By Kincider in forum C++ Programming
    Replies: 1
    Last Post: 09-28-2006, 10:44 PM
  4. Source code....
    By Darkcoder in forum Game Programming
    Replies: 8
    Last Post: 03-07-2005, 08:58 PM
  5. Source Code Needed!
    By spongleman in forum C++ Programming
    Replies: 1
    Last Post: 01-02-2002, 08:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21