For homework I, you have to compose a program and write a report on it. The documentation must include a matching UML activity diagram.
The program will get the initial data from the keyboard (entered by the user) as real numbers!
The task is to make a program that can solve a function y = f(x) and display the results as a table. Some hints about aligning it can be found from printf tips example. The program must enforce the limitations set for it in the task description.
|Argument (xi)||Function value yi=f(xi)|
From your personal variant you will find the formulas for both xi and yi.
Function value should only be shown if the value exists. If the value cannot be calculated for the given x or is a complex number, You can choose to display “missing” or “complex”. If you wish, you are free to calculate the imaginary numbers and display them as well.
The program must use arrays to store and display the results!
Language and environment requirements
- Must be written in C (standard C90 or C99. If You are using C99 standard, include a Makefile!)
- Must use standard libraries
- Must be OS independent (must work on at least Linux and Windows)
- Must not use GOTO statements
- Must not use global variables
- All of the Values must be stored inside an array or arrays of the suitable type. The output must use those arrays.
- In maximum, you will have to calculate 15 results.
- Title page
- Declaration of originality
- Table of contents
- Algorithm in UML
- Screen capture(s) of the working program
- Graph the function given to you
Possible tools to create it [google], [wolfram alphat], Microsoft Excel, etc.
- The description of the program in free form
It should be a short description of the work flow and structure of the program. Eg what is done in what order, what exceptions could occur and how they are solved, how the inputs should be formatted etc. The length of the description should be at least 3/4 of an A4 page, but no more than two pages.
Before submission checklist
Check the documentation
- The title page is accurate. (You need to include to whom you are submitting to, not where you study!)
- The length of the description is at least 3/4 of an A4 page
- The algorithm is exported from the modeling tool (not a screen capture)
- The document includes screenshots of the program running in various situations. Do not include a screenshot of your entire desktop or your code in a text editor.
- Your report can only include snippets of the code and only when it is necessary to illustrate a part of the description. Such code must be aligned to the left, indented and use a monospaced font.
- The documentation is in PDF format (not doc, docx etc)
Check the code (look into the coding style for longer explanations)
- Every file includes the authors name, dates and a short description of the file
- The code is commented
- Variables are declared only in the begging of the functions
- Variable naming is done so that it’s self-explanatory
- Only the required headers are included
- The code is indented, lines are within the maximum allowed length and dashes are put where required
- No magical numbers are found within the code
Check the algorithm
- Every decision has a condition specified
- All of the possible exits from a decision node are marked (e.g. in what condition will the program follow each path – true/false, const values for switch cases etc)
- Every exit from a decision node is viable – the conditions must be real, so that the flow can actually enter them.
- No dead ends – You have to have a way to the exit from all of the nodes, actions etc.
- No infinite loops – It must always be possible to exit them.
In case of distress, come and see us during the lab and see if your work fits our requirements.
Deadlines, points and bonuses
The first homework is valued at 15p.
To receive the highest possible score, You have to follow the coding style and complete the requirements given.
A complete homework must be submitted no later than 13.10.2019 23:59:59
Every week passed the deadline withdraws 1p from the maximum possible score. This countdown is halted at 10p, meaning if you submit 7 weeks late, you can still get up to 10p.
Submitting before deadline gives you the right to earn up to 2 bonus points.
- Submitting before 05.10.2019 23:59 – 2p
- Submitting before 10.10.2019 23:59 – 1p
To be eligible for the bonus points, all of the requirements must be met. Partial or buggy solutions will not get bonus points. If the submitted homework fails to fulfill the requirements, bonus points will be forfeit.
If we have questions about the submitted homework or are not sure about the original author of this work, we will grade this with 0p. In this case, the work must be defended.
If it becomes necessary, we will enforce the rules and guidelines of [Procedure for processing a student’s violation of academic practices and contemptible behavior in the School of Information Technologies]
We will only accept Your homework until the lockdown date (check introduction slides). Past that, submitting your homework will not be possible.
Submitting Your work
You only need to submit the documentation (*.pdf) and code file(s).
Submitting is electronic only. Follow the file naming convention or we might miss your work or mix it up with someone else’s!
Naming schema: HW1_<studentcode>_<firstname>_<lastname>
Submitting is done using moodle: https://moodle.taltech.ee/course/view.php?id=13128