Question A
Draw an interface with the following details;
Object Property Setting
frmMinimum Caption Minimum
lbllength Caption Length
Alignment Right justified
txtLength Text Blank
lblWidth Caption Width
Alignment Right justified
txtWidth Text Blank
cmdCalculate Caption Calculate
cmdExit Caption Exit
picResult
[4]
3. (a) Design a clock application interface which displays today’ date and time [3]
(b) Write the necessary code to run the application. [5]
(c) Run the program [1]
Question B
(a) Design an interface and code for a program that accepts marks and displays grades as follows
MARKS GRADE
10-30 E
31-50 D
51-70 C
71-90 B
91-100 A
[13]
Question C
(a) A company pays its salespeople bonus according to the sales they would have done as follows:
Sales Bonus
>500 0.3
<500 0.08
(i) Design an appropriate interface for the program. [5]
(ii) Design a program which calculates the bonus for the situation given above. [8]
Question D
(a) Design a program with an interface that has a command button and label on it. [3]
(b) Write code for the command button so that when a user clicks it, a MsgBox function is
activatedd showing the buttons Yes and No buttons and an Exclamation mark. The prompt is
“Click to evaluate” and the Title “Evaluation Message.” When user clicks Yes button the
message “You passed the evaluation” will be displayed and when the No button is clicked
the message “You failed the evaluation” is displayed in a label [7]
Excel
1. Open an excel workbook and initially save it as [Link] [1]
a) Use Excel to generate a random number between 50 and 150. [2]
b) What could be the cause for a cell to display in excel? [2]
c) Produce a table similar to the following in Excel with no borders. [5]
Seed Containers Trial A Trial B Trial C Trial D
Thomas 0 2 1 0
Elisha Excused absent-surgery
Kaitlyn T. 2 0 1 1
Containe
r was
tampere
d with by
another
Shelby 1 0 student 2
d) Reproduce a table similar to the following and complete, totals, average, test
average, minimum mark and maximum marks using excel formulae and functions (all
contents should fit in the columns).
[5]
Student Name of Student Tes Test Test Total Average
No. t1 2 3
001 Alberston John 65 78 78
002 Allenson Shenny 75 23 45
003 AltmanLoyd 45 56 26
004 Bittiman Dan 99 78 82
005 Brennan Peter 46 44 6
006 Carlison Gloria 58 89 62
007 Collman Langa 69 54 63
008 Counts Night 58 65 75
009 David Rudo 98 25 58
010 Pafiremhandarakukwe Phil 45 58 69
Test average
Minimum mark
Maximum mark
(i) Rotate the headings vertically (first letter being at the bottom). [2]
(ii) Create a row between the headings and the first student and use excel to insert the
following dates for test 1, 2, 3 as 09/12/2002, 10/17/2002and 11/14/2002
respectively. [2]
(iii) Freeze the pane for rows one and two. [2]
(iv) Use the nested IF function to award a Distinction for an average above 80, Credit for
an average between 65 and 79, Pass for an average between 50 and 64 and Fail for
an average below 50. [4]
2. A teacher gave four tests namely Maths, Content, English and Shona. The students
performed as follows: Maisiri Farai 45, 76, 55, 79, Bonga Susan 67, 54, 53, 67, Chiko
Brian, 97, 45, 54, 67, Tsuro Sheila, 54, 61, 45, 45 and Ndlovu Tariro, 67,45,79,54.
a) Using the above information create a data table in the ExcelPrac floder [3]
b) Rename worksheet Grade7 [2]
c) Use Excel to find the totals for each student [2]
d) Use Excel to find the subject average [2]
e) Move the worksheet to the next worksheet and name it Grade7Yellow [2]
f) Sort the surnames in descending order [2]
g) Bold the headings [2]
h) Use conditional formatting to highlight marks above 65 with a green color fill.[2]
i) Format the subject averages to 1 decimal place [2]
j) Use the totals to insert a column graph showing all the axes, data labels, legend on
the left side and a chart title. [4]
k) Save the workbook as Grd7MarkAnalysis. [2]
3. Below is an abstract of Microsoft Excel worksheet. Study it then do the tasks which
follow:
NAMES MATHS RME SCIENCE SHONA
Mwatsura Ben 58 60 65 95
DuzuraTom 74 50 35 78
Tambawoga Chipo 72 57 46 83
Hazviiti Sam 44 20 58 50
Hapanyengwi Jane 77 52 94 40
(a) In a new workbook in the folder SpreadSheetPrac enter the information in the above
table. [5]
(b) Resize columns accordingly. [2]
(c) Rename worksheet 2Green. [2]
(d) Using the totals insert a pie chart, put a key and also label it. [4]
(e) Save the workbook using filename Ques 3. [1]
(f) Color the columns for each subject differently. [2]
(g) Insert a row and use Excel to enter the dates when the tests were written: Test 1was
done on 12/02/2011, Test 2 was done on 10/03/2011, Test 3 was done on 11/05/2011
and Test 4 on 18/07/2011. [2]
(h) Use Excel to find the maximum and median of the averages. [2]
(i) Use Excel to rank the students according to their performance using the total mark. [2]
(j) Save your workbook under the filename ModfiedQues3. [1]
(k) A distinction is awarded for an average mark of the four tests, above 80. Use Excel to
extract students, if any, with a distinction. Save the results under the filename
Distinction. [2]
4. Use spreadsheet to solve the following problem:
A retailing shop has four outlets in the country namely, Seria, Tutong, Muara and
Jerudong. A stock tacking on sales of perishables was conducted among its four
branches. Seria has 50kg of fish with a price list of $4.00 per kg, Tutong has 40kg of
chicken with a total cost of $240.00, Muara has eggs with a price list of $3.00 per kg at a
total cost of $210.00, and Jerudong has 90Kg of tomatoes at a total cost of $180.00.
a) Create a proper table for the given data. [9]
b) Use Excel to find Seria’s total cost of fish [2]
c) Calculate Tutong’s price list per Kg of chicken [2]
d) What is Muara’s quantity of eggs? [2]
e) Find Jerudong’s unit price per Kg of tomatoes [2]
f) Any price list per Kg of thye perishables above $3.00 was considered expensive.
Otherwise they are affordable. Separate perishables which are expensive from those
which are affordable. [2]
g) Save the spreadsheet as Sales of Perishables. [1]
Incomplete!!!!
JAVA PROGRAMMING
1. Write a Java program, in a file named [Link], which produces a
GUI
similar to the following:
EasyDifficult
This test is easy
The default radio button is Easy and Difficult. When the user selects a
radio button, the message should change accordingly, to something
like ‘This test is difficult’ or otherwise.
[12]
2. In a file called [Link] write a program that declares a
method named
print-Grade and invokes it to print the grade for a given score, for
example, if
someone got a score of at least 90 in a test, it would print A, score
above
80-prints grade B, score above 70-prints grade C, score above 60-
prints grade D and displays a grade C on the standard output.
[13]
3. Mr Chitida saved the principal amount of $1 000.00 in a year. The
normal rate
for annual interest for FBC Bank was 7%. In a file named
[Link] write a
program that computes the client’s simple interest . The program
prompts from
the user, the number of years, annual rate and the principal amount.
Only the
simple interest should be displayed on the standard output.
Below is a simple program interaction:
Please enter principle amount: ***
Enter time in years: ***
Enter rate annually: ***
The simple interest is * * *
[13]
4. Write a User-friendly program that takes in two natural numbers
through two
textfields and with corresponding labels. The program should then
compute
multiplication and display the result on the GUI just below the
textfields well
labeled ‘Result’. Add three more command buttons, Add, Clear and
Exit buttons
so that the program can be edited and quitted easily.
Your finished GUI should now look like the following screenshot:
[12]
Save in a file named [Link]
(d) Run the program. [3]