Conversion calculator final project
Problem Analysis
Problem: User requires a program that will convert two given numbers and at user’s option will find their sum, difference, product or quotient.
Desired results: Find and display the sum, difference, product or quotient of two numbers entered by user.
Results trying to achieve: Provide user with desired result between two given numbers
Required inputs: intnum (interger) intnum (Interger)
Required processes:
Sum= intnum+intnum
Difference= intnum-intnum
Product=intnum*intnum
Quotient=intnum/intnum Application level requirements: Program will welcome user and provide a description of what program will do Program will prompt user to enter numbers to be calculated Program will provide user menu options for calculating sum, difference, product or quotient Program will display desired calculations to user Major tasks of program Get user input Perform calculations Display calculations
IPO CHART INPUT | PROCESSES | OUTPUT | Menu selection (integer) Num1 (float) Num2 (float) | Get user input | Menu selection (integer) Num1 (float) Num2 (float) | Menu selection (integer) Num1 (float) Num2 (float) | Calculations | Sum answer (float) Diff answer (float) Prod answer (float) Quot answer (float) | Sum answer (float) Diff answer (float) Prod answer (float) Quot answer (float) | Display output | Sum answer (float) Diff answer (float) Prod answer (float) Quot answer (float |
Hiearchy chart
Flow charts
Main module flow chart Get user input flow chart
Calculations flow chart
Display flow chart
PSEUDOCODE
Main module
Declare menu selection as integer
Declare num1, num2 as float
Declare sumanswer, diffanswer, prodanswer, quotanswer as float
Declare continue as string
Display “welcome to the conversion program”
Display