Question: Write a program that defines Person with Name and Password as in UML-class diagram below. Person -Name: String -Password: Integer +all Mutator Methods Create 4


Write a program that defines Person with Name and Password as in UML-class diagram below. Person -Name: String -Password: Integer +all Mutator Methods Create 4 object Persons to hold data is as follows. Name "Hala" "Lia" "Zainab "Marwa" Password 333 "666" 1010 111 The program sets users with the password above and will show the person gate based on the password entered Use sample output in Table to guide your program compile and save as ML Your Name.java. Copy paste the successfully compiled code in the space provided. 25 Marks Table 1.0 Password Gate 111, 222.555 333, 444 Gate ! Gate 2 Gate 3 Message Welcome to Gate 1 Welcome to Gate 2 Special Access Invalid password 6666 Others Sample output: Please enter your password>111 Hi Marwa. Welcome to Gate 1 Program ended with exit code: 0 Please enter your password>666 Hi Lia. Special Access Program ended with exit code: 0 Please enter your password: 333 Hi Hala. Welcome to Gate 2 Program ended with exit code: 0 Please enter your password>1010 Invalid password Program ended with exit code: 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
