UNIVERSITY OF MINES AND TECHNOLOGY, TARKWA
SECOND SEMESTER EXAMINATIONS, MAY 2019
COURSE NO: CE 274
COURSE NAME: PROGRAMMING WITH JAVA (PRACTICAL)
CLASS: CE II TIME: 2HRS
Name: __________________________________________ Index Number: _______________
Attempt ALL Questions
Design the user interface program which when run: [20 marks]
1. Starts with a User Login (Figure 1 (a) with the following messages when the user tries to
login
a. Successful login Figure 1 (b)
b. Unsuccessful login Figure 1 (c)
Figure 1(a) User Login Interface
Figure 1(b) Successful User Login
Figure 1(c) Unsuccessful User Login
2. A successful login hides the User Login interface and the interface in Figure 2 (a) appears
where:
a. The user can perform simple mathematical operations and display the results
Page 1 of 3
b. The user can save contact details of friends to text files – using the Save Details
button
c. The user can read content from any text file – using the Open Text File button
Replace this
with the
name of
your app
Figure 2(a) Simple App Details Interface
The below Illustrations below show the expectations from your application
Basic Math Calculations
i. User enters the first and second
Drop down list
numbers – note only doubles should be containing:
accepted (no strings allowed). Select Math Operator
Addition
ii. User selects the desired math operator Subtraction
Multiplication
before clicking on Perform Math Division
Operation button.
iii. The results depending on the selected
math operator should be displayed as
shown in Figure 2 (b).
Figure 2 (b) Simple Math Calculations
Page 2 of 3
Contact Details
i. User should enter the full name and other details
of the contact.
ii. User selects the gender of contact.
iii. The Save Details button should show the save
dialog box allowing user to select a text file to
save contact details as shown in Figure 2 (c).
Figure 2 (c) Save Details to Text File
Read Text File
i. The Open Text File button should show the open dialog box.
ii. User selects desired text file to open.
iii. Content of text file should be displayed in the text area after user clicks on Open as shown
in Figure 2 (d).
Figure 2 (d) Open Text File Illustration
Examiners: V. Nofong
Page 3 of 3