Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A Java Swing application has a login page as shown in Figure 5. Users are required to enter the correct passcode to start the application.

image text in transcribed

A Java Swing application has a login page as shown in Figure 5. Users are required to enter the correct passcode to start the application. The system uses a scrambled keypad with a randomly allocated set of numbers from 0 to 9. The display shall show "Enter passcode" initially, and show an asterisk (*) for each number entered. Upon pressing the "Enter" button, the system verifies the passcode. If the passcode is correct, the system invokes a method called startApp) to start the application. Otherwise, it displays the message "Wrong passcode". The "Clear" button shall clear the display Assume that the following methods are available public String getPasscode ) // return the passcode public void startApp ) public void shuffleArray (int [] array) // Start the application // Shuffle (Randomize) the given int array, e.g., // int [] numbers1, 2, 3, 4, 5}; // shuffleArray (numbers); // Randomize the elements Write the codes for the login page. State your assumptions, if any (17 marks) Login CLEAR Enter Figure 5 A Java Swing application has a login page as shown in Figure 5. Users are required to enter the correct passcode to start the application. The system uses a scrambled keypad with a randomly allocated set of numbers from 0 to 9. The display shall show "Enter passcode" initially, and show an asterisk (*) for each number entered. Upon pressing the "Enter" button, the system verifies the passcode. If the passcode is correct, the system invokes a method called startApp) to start the application. Otherwise, it displays the message "Wrong passcode". The "Clear" button shall clear the display Assume that the following methods are available public String getPasscode ) // return the passcode public void startApp ) public void shuffleArray (int [] array) // Start the application // Shuffle (Randomize) the given int array, e.g., // int [] numbers1, 2, 3, 4, 5}; // shuffleArray (numbers); // Randomize the elements Write the codes for the login page. State your assumptions, if any (17 marks) Login CLEAR Enter Figure 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions