Question: Question 3 ( 1 5 marks ) a ) The GUI below is used for logging in a user into a simple Object - Oriented

Question 3(15 marks)
a) The GUI below is used for logging in a user into a simple Object-Oriented Program. Write a Java Code snippet for creating it.
(8 marks)
b) Write a method using Java, that would implement Event Listeners in order to redirect the user to a home page (home.java) upon successful login.
(7 marks)
Question 4(15 marks)
a) Within an Object-Oriented Program there exists a method for computing the mean age for a Customer object. Using Java, write this method which takes in one parameter (ageint[I) which is an array of ages and returns the mean age.
(5 marks)
b) When asked for their age in (a) above, a user enters a String value instead of an integer. Write a brief Java snippet that would be used to handle this exception.
(10 marks)
Question 3 ( 1 5 marks ) a ) The GUI below is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!