UC3M

Telematic/Audiovisual Syst./Communication Syst. Engineering

Systems Architecture

September 2017 - January 2018

3.5.2.  Call rates

Work Plan

In an application to execute in a mobile phone, the following data structures need to be designed:

  • Structure to store a call rate. It must contain the name of the carrier company, the hour of start and end of the rate (both values between 0 and 23), the rate for establishing the call, and the minute rate (both in euros). Declare a synonym for this type. Declare a table to store 100 elements of this type.

  • Structure to store an outgoing call. It must contain the name of destination carrier, the starting hour (only the hour, between 0 and 23, no minutes nor seconds), the duration in minutes and the number called. Declare a synonym for this type. Declare a table to store 100 elements of this type.

Answer the following questions.

  • What is the size of these tables?

  • How did you decide the length of the field to store the carriers name?

  • Can you propose a more compact version of your data structures?

  • Which functions can you think that can be implemented with the information in these tables? (either processing them separately or both at the same time).

  • Let us suppose that each data structure with their functions are in separated files. A third file is added in which only the main function is defined, but it uses all the functions and the data structures previously defined. Which information must be included before the main definition?