Lab01-Problem Solving W2
Lab01-Problem Solving W2
Semester I 2014/2015
Lab 1 (Individual)
Learning Outcomes:
Instructions:
1.
Find solution to each problem and get help from your demonstrator whenever you encounter
any problem.
2.
Copy or other forms of cheating is forbidden. The faculty has very strong rules about this,
and the penalties may be severe. The standard penalty for the first offence is to award 0 to
all parties concerned.
Question 1:
Problem Definition:
Assume that you are hired to develop application software which is designed specifically for the
SSK3100 Computer Programming course. The application software will be used among the
lecturers who taught the course. The application software should be able to calculate the total
marks accumulated by each student registered for the course. In order to calculate the total
marks, the lecturer need to input the marks obtained by each student for First Test, Second Test,
Assignments, and Final Examination. The following is the distribution of percentages taken for
the calculation of the total mark:
First Test will take 20%. The full mark for the test is 50.
Second Test will take 20%. The full mark for the test is 50.
Assignments will take 30%.
Final Examination will take 30%. The full mark for the examination is 100.
The application software shall display all the marks for each evaluation, including total marks in
100%.
Instructions:
1. Create the PAC chart, IPO chart, Flowchart, and Algorithm.
2. Assume that 3 assignments will be given for the student, and each assignment carries 30
marks.
3. Prompt user to provide the related data for processing using sequential statement.
4. Use appropriate data types to solve the problem stated above.
5. Display the total marks obtained by the student as in Figure 1.0.
Expected Output:
COMPUTER PROGRAMMING I
(SSK3100)
*************************************MARKS EVALUATION
APPLICATION**************************************
PLEASE ENTER MARKS: FIRST TEST:
SECOND TEST:
ASSIGNMENT 1:
ASSIGNMENT 2:
ASSIGNMENT 3:
FINAL EXAMINATION:
43.5
39.5
16.0
22.5
28.0
76.5
CALCULATED MARKS
FIRST TEST
EXAMINATION
SECOND TEST
TOTAL
ASS 1
43.5 (17.40%)
(22.95%)
ASS 2
22.5
28.0
FINAL
66.5 (22.17%)
76.5
Question 2:
An electronic company sells circuit boards at a 40 percent profit. A program that calculates the
total of a retail sale should ask the user for the following:
Once these items have been entered, the program should calculate and display the following:
Create a PAC, IPO, flowchart and pseudocode. Figure 2 shows the expected input and output
format.
Profit
Sale Tax
------------- ------------40.00
8.40
Total Sale
---------------148.40