Question: For this assignment, you will use the Visual Studio Code (VS Code) IDE to compile and run a Java program; you can do this in
For this assignment, you will use the Visual Studio Code (VS Code) IDE to compile and run a Java program; you can do this in the VCASTLE environment or on your own computer if you have VS Code installed and configured to do Java development. You will create the Java code based on the requirements provided below.
Your application will demonstrate the use of of constructors, getters and setters, class methods, and instance variables (class properties). Incorporate the following requirements into your application:
- The application will consist of two files - the main application class (App.java) and the Employee class (Employee.java)
- Include documentation at the top of each file that includes
- Your name
- Date of development
- Assignment (e.g., SDC230 Performance Assessment - Classes)
- Description of the class
- Include documentation at the top of each file that includes
- The Employee class must meet the following requirements
- Include private instance variables (properties) for the following:
- First Name (String)
- Last Name (String)
- Monthly Salary (double)
- Include a public constructor
- Include parameters to initialize all variables
- Only set the Monthly Salary if the provided salary is greater than or equal to 1000
- Include setters and getters for each instance variable
- Only set the Monthly Salary if the provided salary is greater than or equal to 1000
- Include private instance variables (properties) for the following:
- The main application class must meet the following requirements
- Print a line that states "Your Name - Week 1 PA Classes"
- Create 2 Employee class objects (instances)
- Use an invalid salary for one of the employees
- Print the name and salary information for each employee with a header line above the information
- Update the employee information as follows
- Update the last name of one employee
- Update the first name of the other employee
- Update the salary information of both employees
- Print the updated employee information for each employee with a header line above the information
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
