$25
function prototypes from sequence diagrams; include files
Abstract
The objective is to give you practice on preparing a project, with include files, in your IDE, so that it can compile and run.
The context of this problem is given by a sequence diagram. See Figure 1.
See Figure 1. Figure out which functions are directly implied by this sequence diagram. (You may also include indirectly implied functions if you wish.) Create a function prototype for each such function. Prepare one or more include file(s) (.h file(s)), that contains these function prototypes. Incorporate your include file(s) into the starter code for this homework. This has two parts. The include file(s) should be found in the collection of files making up the code (see Figure 2), and the include file(s) should be used by the code (See Figure 3). Name one of your include files YourName.h. Though the figure shows one place for incorporating the include file, that place might not be the best location. Choose the best location within your code.
Take a screen shot of your include file(s), showing the text, and also your name in a comment. Incorporate that screen shot in your homework file you submit for grading.
Build the code, which should include the furnished starter code and your include file(s), and take a screenshot of the results of the build. See Figure 3 at the bottom of the figure, where it says “Let’s do HW1”.
Things to do:
Either:Make a C project from the Hello,World project.
Populate that project with tests.c, tests.h, production.c and production .h.
or use the starter code.
Create one or preferably more #include .h file(s) and incorporate it/themin a reasonable location in one or more .c files.
Figure 1: A sequence diagram
Figure 2: Show the named include file in your project. Notice the highlighted file.
Figure 3: Show how your code incorporates that .h file. Notice the highlighted text line.
Place each function prototype from the sequence diagram (also those youchose to invent) into one of the .h file(s).