0% found this document useful (0 votes)
75 views

Assignment 2-2.1.1 Problem-Solving and Design

The document describes an assignment to design an algorithm and flowchart to calculate scholarship amounts based on grades. It involves: 1) Creating a pseudocode algorithm that calculates scholarship as 100% for more than 7 A's, 50% for 5-7 A's, and 0% for fewer than 5 A's. It then calculates fees owed after subtracting the scholarship amount. 2) Completing a provided flowchart by filling boxes and labeling lines to divide a number by 2 repeatedly until it reaches 0, counting each iteration. 3) Explaining validation, verification, and the purpose of the given flowchart algorithm.

Uploaded by

Aditya Ghose
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Assignment 2-2.1.1 Problem-Solving and Design

The document describes an assignment to design an algorithm and flowchart to calculate scholarship amounts based on grades. It involves: 1) Creating a pseudocode algorithm that calculates scholarship as 100% for more than 7 A's, 50% for 5-7 A's, and 0% for fewer than 5 A's. It then calculates fees owed after subtracting the scholarship amount. 2) Completing a provided flowchart by filling boxes and labeling lines to divide a number by 2 repeatedly until it reaches 0, counting each iteration. 3) Explaining validation, verification, and the purpose of the given flowchart algorithm.

Uploaded by

Aditya Ghose
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Science Assignment # 2

2.1 Algorithm Design and Problem Solving

2.1.1 Problem Solving and Design


1. A program is to be written to calculate the scholarship given on grades.
A grade may qualify for a scholarship depending on the number of A’s achieved. The
grades(AGrades), the fees(Fees), the scholarship (Scholarship) and fees to be paid after
scholarship achieved (FeesAmount) is calculated as shown in the following pseudocode
algorithm.

INPUT AGrades, Fees


IF AGrades > 7
THEN
Scholarship ← 1
ELSE
IF AGrades > 5
THEN
Scholarship ← 0.5
ELSE
Scholarship ← 0
ENDIF
ENDIF
FeesAmount ← Fees - (Fees * Scholarship)
OUTPUT Paid
The algorithm is also to be documented with a program flowchart.
Complete the flowchart by:
• filling in the flowchart boxes
• labelling, where appropriate, lines of the flowchart

Page 1 of 3
Computer Science Assignment # 2
2.1 Algorithm Design and Problem Solving

2.1.1 Problem Solving and Design

[8]

Page 2 of 3
Computer Science Assignment # 2
2.1 Algorithm Design and Problem Solving

2.1.1 Problem Solving and Design


2. Explain what is meant by:
(a) Validation [2]
(b) Verification [2]
3. Study the given flowchart carefully.

START

Count = 1

INPUT
Number

Number = Number DIV 2

Yes
Is Number = 0
OUTPUT Count
?

No
STOP
Count = Count + 1

(a) Draw a trace table to show the output from the flowchart for the following sets of
input:
12, 42, 60, 56, 72, 128 [10]
(b) Explain the purpose of this algorithm. [3]

Page 3 of 3

You might also like