EGRE 246 Advanced Engineering Programming Using C++ Homework #4 – Linked Lists

$30.00

Category: Tags: , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (5 votes)

This homework is an extension to homework 3 and will ask you to implement an
additional menu option. Option 6 should give you the possibility to add a new rainfall
entry into the (none-) existing linked list. If an entry already exists for the given month
and year than the rainfall should be added to the existing entry.
In homework 3 you would have to exit the program if initially 0 months were entered for
the first question. In homework 4 you have the option to add individual entries and thus
when 0 months is entered the menu should be displayed as shown in the screenshot
below.
The following test-case can be used for testing your program but it should not be limited
to only this test-case:
1. Start your program and input 0 months as in the above screenshot.
2. Select option 6 and input: year = 2015, month = 4, rainfall = 2.3
3. Select option 6 and input: year = 2015, month = 2, rainfall = 1.2
4. Select option 6 and input: year = 2015, month = 3, rainfall = 6.3
5. Select option 6 and input: year = 2016, month = 1, rainfall = 1.9
6. Select option 6 and input: year = 2014, month = 12, rainfall = 3.4
7. Select option 6 and input: year = 2015, month = 3, rainfall = 1.0
If you followed the above described test-case and you choose option 4 in the menu your
program should output the following:
For this homework you are given a header file called “rainfall.h”, as a requirement for
this homework you will have to use the structure “monthly_rainfall” as the basis for your
linked list. You are also required to implement all the function prototypes in the header
file that supports the menu functionality. You cannot change/alter “rainfall.h” and your
implemented functions should look exactly like the function prototypes.
For this homework you should submit:
1. main.c – with the main() function
2. rainfall.c – with the implemented functions
3. rainfall.h – given to you, but submit this file so a complete project directory is
created.
4. Makefile – a file that compiles your project.
Remember the class policy on late submissions – no late submissions are allowed unless
prior arrangement is made with the instructor.