Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please do in java as simply as possible, with the code available for copy. and with comments so I can follow along. Code should also

Please do in java as simply as possible, with the code available for copy. and with comments so I can follow along. Code should also accept user input, not have values hard coded .

Only the use of import.java.Scanner; is necessary. There should't be any others.

There should be two classes.

When a user signs in for the first time to a website, the user must submit personal information, such as last name, first name, email address, and so on. Typically, there are two fields for passwords, requiring the user to enter the password twice, to ensure that the user did not make a typo in the first password field.

Write a class encapsulating user with the following attributes:

UserID

Password

Reentered password

Email address

Last Name

First Name

Zip

You will store these values as strings.

Write the following methods in your class:

1. A constructor which will initialize the 7 attributes listed above.

2. Accessor, mutator, toString methods

3. A method returning the user id consisting of the first letter of the first name, last two letters of the last name and the first three numbers of the zip code and a random number (between 0 and 999)

4.. A method checking if the two Strings representing the password fields are the same, if they are return true, otherwise false.

Write a test class to create 2 user objects (using your constructor) and test all the methods in your class.

Thank you in advance!

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

8-13 What is a botnet?

Answered: 1 week ago