Question: As a programmer, you currently participate in developing a game. Today your task is developing a class to represent users. Thinking in the way of

As a programmer, you currently participate in developing a game. Today your task is developing a class to represent users. Thinking in the way of Object Oriented Programming, you want to create a class called User. This class should have three attributes, which are username, nickname, and password. For each class, you should create its corresponding set() and get() methods. Also make sure to have a construction method in the class.

In another class named Program_1, you should first prompt the user to create a profile, which contains all the three attributes. Then you ask the user whether she wants to change the password. The user would answer Yes. Before changing password for the user, you ask for the original password and check whether it is correct. If it is correct, you then prompt the user to input the new password.

Important Notes:

Require language :JAVA

  • Assumed that the user always correctly enters the input.
  • In Eclipse IDE, inside the newly created project HOMEWORK_1, students should create a new program, i.e. a class, named: Program_1 under a new package named PROBLEM_1for his/her work on this problem.

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 Databases Questions!