[SOLVED] 代写 GUI Java THE HANG SENG UNIVERSITY OF HONG KONG Bachelor Degree Programmes

30 $

File Name: 代写_GUI_Java_THE_HANG_SENG_UNIVERSITY_OF_HONG_KONG_Bachelor_Degree_Programmes.zip
File Size: 753.6 KB

SKU: 0397919197 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


THE HANG SENG UNIVERSITY OF HONG KONG Bachelor Degree Programmes
MSIM1201 – Programming Methodology Assignment 3 [Final Assessment]
Notes to students:
There are TWO sections. Complete all the questions in Sections A and B.
▪ For Section 1, TWO programming questions. Create two Java Application Projects for each question. For each question, zip the whole project file and
submit it to the submission link.
▪ For Section 2, FIVE short questions. Answer all questions in a Word file and submit it to the submission link.
Section A: Programming Questions (70 marks)
Question 1. You are developing a company resources management system – Part I for a trading company. The application should be able to calculate monthly wage for different types of staff.
There are three types of staff in the company and their hourly wages are shown as follows:
1. Manager: $70/hour
2. Supervisor: $50/hour
3. Junior: $35/hour
a. Create wages.txt for storing the information of staff types and wages. Save the .txt file in the same directory of your Java project. [5 marks]
wages.txt:
b. Create two sets of one-dimensional arrays for storing staff types and wages from wages.txt. [5 marks]
c. Create a user-defined method named wagesCalculator with two input parameters – staff type and monthly working hour, to return monthly wage. [10 marks]
d. Prompt the user to input staff type and total number of working hours. By calling the method wagesCalculator, calculate the monthly wage and display the results as follows: [15 marks]
1

Question 2. Write a Java GUI program for an online service login page (width: 800, height: 300):
In the login page, the following functions should be included:
a. Let users enter their personal details, including Name and PIN. Use labels to guild
the users to create a valid password with 6 digit numbers or characters. “Result” text box should not be editable. [15 marks]
b. Input Name and PIN, and then press “Register” button. If the PIN is valid, (i) ‘Result’ text box should show a message “Registration Success! Welcome (Name)! Please Login”, (ii) The text of ‘Register’ button will be changed to ‘Login’, and (iii) the texts in the text boxes “Name” and “PIN” will be cleared. Otherwise, show the message “Invalid PIN. Please input again.” [15 marks]
Successful registration:
2

Invalid Input:
c. Press ‘Exit’ button to exit the system. [5 marks]
3

Section B – Short Questions (30 marks)
1. How to choose a right looping (i.e. for, while, and do…while) structure. [6 marks]
2. Describe short-circuit evaluation. [6 marks]
3. Name the two categories of user-defined methods. [6 marks]
4. Write down two reserve words that are optional in the following switch structure. [6 marks]
switch (expression) {
case value1: statement2; break;
case value2: statement2; break;
default:
statement3; }
5. Consider the following structure:
public static void number (double x, int y) {
int b; ….
return b; }
Identify a mistake from the above syntax and provide the correct method heading? [6 marks]
-END-
4

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 GUI Java THE HANG SENG UNIVERSITY OF HONG KONG Bachelor Degree Programmes
30 $