联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> Java编程Java编程

日期:2021-05-27 10:45

EBU4201 – Introductory Java Programming (2020/21) Page 1 of 6

School of Electronic Engineering

and Computer Science

Mini-Project Coursework: A workshop check in using Java program

Module code: EBU4201

Module title: Introductory Java Programming

Hand-out date: 17th May 2021

Hand-in date: 4th June 2021

Marks available: 50

Feedback: Individual marking sheet including feedback comments and a mark out of 50.

Introduction:

You are asked to write a Java program that handles a check in process for a workshop event. A

total of 30 participants have registered for the workshop. Participants use the check in program

in order to be successfully enrolled onto the workshop event. The development of the Java

program includes the following two phases:

a. Developing the interface

b. Improving the interface interactivity

EBU4201 – Introductory Java Programming (2020/21) Page 2 of 6

a. Developing the interface

Task 1 [14 marks]

Once the program is launched with the command java CheckIn, the interface should look

like in Figure 1:

Figure 1

Your task: Complete the Java Graphical User Interface (GUI) as shown Figure 1 for the

expected look of the interface. See the notes below for details.

1) Create the class file named as MyFrame.java to design the GUI;

2) Create the main class file CheckIn.java as the entry point to the Java application;

3) Use GridLayout to arrange the GUI components in rows and column such that int

rows = 9, column = 1;

4) Create instances of JFrame and JPanel to make a frame and panels;

5) Make widgets in the interface using JLabel, JTextField, JComboBox, JCheckBox

and JButton.

6) Four JComboBox accept the array of strings such that:

i) Date of birth (month) – from January to December;

ii) Date of birth (year) – from year 1998 to 2005;

iii) Programme – all available BUPT Undergraduate courses;

iv) Programme (year) – from year 1 to 4.

7) When the JButton ‘Clear’ is clicked, the program will erase the entered information;

8) When the JButton ‘Exit’ is clicked, the program will exit;

EBU4201 – Introductory Java Programming (2020/21) Page 3 of 6

9) The JButton ‘Next step’ is placed as a placeholder for Task 1 and more instructions

are available in Task 2.

Note: You do not require to record the information and Task 1 is just about building the GUI.

Task 2 [12 marks]

Once the user clicks on the ‘Next step’ button from the Figure 1, your interface should look like

in Figure 2. This is where the user completes the check in progress.

Figure 2

Your task: Complete the GUI as shown in Figure 2 when the JButton ‘Next step’ is clicked.

See the notes below for details.

1) Create the class file named as AnotherFrame.java to design the GUI;

2) Use BorderLayout to hold components in three regions: NORTH, CENTER and SOUTH.

3) Create instances of JFrame and JPanel to make a frame and panels;

4) Make widgets in the interface using JLabel, JTextArea and JButton.

5) The JTextArea in the middle panel displays the information entered by the user from

MyFrame.java.

6) When the JButton ‘Finish’ is clicked, the program will exit.

7) You need to store the information in an Array once the user’s input information is

obtained successfully.

b. Improving the interface interactivity

Now that the GUI design is completed. The Java program, however, needs several

improvements to enhance the end users’ experiences in using the program.

Task 3 [12 marks]

Your task: The Java program should now ensure the user completes the requested information

so that the check in process can be completed successfully. As an example, as shown in Figure

3a, when a user does not provide the email address information:

1) an error dialog box will display prompting the user to complete the missing information

(see the left panel of Figure 3a);

2) The incomplete session is highlighted in red so that user can easily check the missing

information to be completed (see the right panel pf Figure 3a);

EBU4201 – Introductory Java Programming (2020/21) Page 4 of 6

3) The Java program now will not proceed to the check in completion stage

(AnotherFrame.java), as the information is/are incomplete;

4) Your program should also prompt the user to complete the missing information for other

parts (including the CheckBox).

Figure 3a

5) If all the information is entered by the user, your program should pop-up a dialog box

as shown in Figure 3b to confirm with the user for the final confirmation before the

check in process is completed.

Figure 3b

Hint:

1. You need to import the class JOptionPane of the javax.swing package to make the

standard message dialog box.

EBU4201 – Introductory Java Programming (2020/21) Page 5 of 6

Documentation [12 marks]

Your submitted work must include:

a. Automatically generated Javadoc files.

b. Comments (both internal and Javadocs) in your code.

c. User Manual; this should be a document1 with no more than two A4 pages which must

include instructions on how to run the program (i.e. both how to start it, and how to use it).

Note: All documentation files must be placed in a directory called Documentation.

Marking Scheme

Marks will be awarded for the following:

1. a clearly laid out interface

2. correctly functioning code

3. clearly structured code including comments and sensible variable, class, and method names

4. you should NOT use any other Java packages except .awt, .swing and .util packages

5. properly designed classes following object-oriented principles. E.g. do NOT write

everything in the main method, keep code repetition to a minimum (i.e. use methods), do

NOT use static methods unless there is a good reason

Note 1: The main program file must be called CheckIn.java, and it must compile and run

from the command line; otherwise, it will NOT be possible to give marks for any implemented

functionality.

Note 2: OpenJDK 15 must be used, as instructed in Teaching Block 1 (click here for more

information).

Note 3: All documentation files should be placed in a directory called Documentation.

1 Accepted document formats include: .txt, .docx and .pdf.

EBU4201 – Introductory Java Programming (2020/21) Page 6 of 6

Submission Instructions

You must zip all the following files:

1. The directories created from Task 1 to Task 3 including all .java files produced2

.

2. The Documentation directory, including all Javadoc comments and the User Manual.

Notes:

? You must name your .zip file 201921xxxx.zip, where 201921xxxx is your BUPT student

number.

? You must submit your .zip file to the EBU4201 course area in QMplus 3 , under the

assignment activity Mini-Project (submission).

IMPORTANT: This is an individual piece of assessed coursework; therefore, students must

NOT work in groups and must not share code solutions. Students must not post (partial) code

solutions when asking questions about the Mini-Project in QMplus.

2 It will not be possible to mark your work if you only provide .class files.

3 Any work sent via email will be ignored and not marked.


版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp