Java: Please help with my following code and tester. Thankyou.
Instructions for code:
Activity – Implement a program prompts a userfor their name, age, salary, hackername and email address.
- Catches the following exceptions
- NumberFormatException for the salary
- User defined Malformed email address (See below)
- Allows the user to try again in either case.
- User Class
- Stores user information in instance variables name, age,salary, hacker name and email address in the appropriate datatype.
- Default constructors only
- Accessor and mutator methods including:
- boolean setSalary(String newSalary)
- receives a string and converts it to a number
- Handles the NumberFormatException.
- Returns true if conversion is successful and false if not.
- boolean setEmail(String newEmail)
- receives a String
- Tests for Malformed email address and
OR
PayPal Gateway not configured
ORPayPal Gateway not configured
- boolean setSalary(String newSalary)