Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CSIT121

Object Oriented Design and Programming

Assignment 3

File name MUST BE

YourName_A3.java

Objectives:

Practice java programming with GUI, Collections.

Task 1: (6 marks)

 

What  is  this?  When  I  conducted  the  Java  workshop  recently  my  brain already had what I would have if I was asked to design a Q & A room. The room usually divided into two areas: the participant area and the host area.

Here is the 1st interaction, someone raises a question:

 

You may want to  ask who raise the question. A lot of participants in  a conference or  a workshop; you  can  also  say  this  is my  CSIT121  online lesson and a student raises a question and I, the host, provide the answer.

We can assume that all participants have a button of their own to press. Now for example, Heng 3 presses the button (each button has a default image, and the button changes the color when the mouse moves over the button), the following panel is displayed:

 

In the above image, you can see that another panel popping out.  To let you have better view of the popped panel, here it is:

You  can  see  that  the  student’s  photo,  his  or  her  actual  name,  and  what tutorial class he or she attends is displayed in the popped panel; Heng 3 is just a label to the button; and each button has a default image. The  1st  three lines in above panel came from some “toString” info!!!

When the OK button is pressed in the above panel, we go back to the QA room waiting for the host to reply to the student’s queries:


Now the host replies to student’s query in the host’s area. The mouse now moves to the “Host” button, and you see a change of new image too. You now press the host’s button; another panel is popping out, displaying the host’s reply:

To let you see better of the host’sreplied panel:

When the OK button is pressed, you can now go back to the Q & A room to do some housing keeping:

 

Finally, you press the clear button to erase the messages stored inside the two text areas, i.e. you go back to the 1st  screen:

 

You also need to design a class to describe what a participant is.

 

Usual info for a class, for example, instance variables, constructors, accessor methods, mutator methods; of course don’t forget the toString method that you need to use in this design.

Construct a list of participant’s objects, hard code or whatever, and use it in your design.

In  the  design,   also  explore  the  use  of  fonts,   colors,  background,   and foreground. Explore as much as you can, make it an interesting GUI

IMPORTANT

Put all your classes in a file called YourName_A3.java and make sure that this file can be  compiled and can be executed. Upload ONLY this file to   Moodle.   ALL   ZIP  FILE   SUBMITTED  WILL  BE

REJECTED. You dont have to upload the image files

No re-submission will be allowed after grading.

In  the  above  file,  remember  to  put  down  your  name  and  the  following declaration (some similar contents):

// Tell me if it is your own work, and whether you have passed your // program to your friends etc etc etc

// and willing to accept whatever penalty given to you.

-  Wrong file name: -0.5 mark

-  No declaration, no name etc: -0.5 mark

-  Failing to demo: -1 marks

-  Late penalty: – 0.1 per hour