Professional Documents
Culture Documents
Goal
Practical Hand-In
Make sure your practical is saved on the designated computer before leaving the class on the 16th of May 2011. If you need help with this ask your teacher before class starts. Remember to save your practical like this: NamePrac4.c (Example GertjiePrac4.c)
The Task
You are an independent software developer; you were contracted by Alma Mater Akademie to develop a calculator for the primary school. Your software will assist students in understanding basic mathematic concepts. Your calculator will be called Alma Mathics. Alma Mater already have the rights to a certain program called Prac4startupFile.c, this file can be found on the same page as your notes. (See link above) Use this program to help you get your calculator started. You will have to create the following functions: 1. displayMenu() 2. standardCalculator() 3. statsCalculator() 4. otherCalculator() Your main() function is already complete, main() calls displayMenu(), which in turn calls the other functions and is therefore called the driving function. displayMenu( )
This function will have 4 options a) Standard Calculator b) Stats Calculator c) Logic Calculator x) Exit Calculator
Standard Calculator
This function performs basic operations such as add, subtract, divide, multiply and exponention. This calculator wont take any input , but will return a double type value. The calling function (displayMenu) will then display the returned value with only two decimal values.
Page 1
Logic Calculator
This function has 1 integer type value in its parameter list. The function evaluates the input and returns 0 if the input is even and 1 if the input is odd. The calling function should then display : Value is odd/even depending on the returned value. (Even means value is dividable by 2)
Page 2
Page 3