![]() |
Help: A Simple Class
Help is available for each task, or you can go straight to the solution source code.
Two variables are needed, a String name, and an int, tenureInMonths. Task 2Write a constructor for Employee.The public constructor for Employee takes a String as an argument, and assigns it to the name variable. Task 3Write the setTenure method for Employee.This public method takes an integer argument and assigns it too the tenureInMonths variable. Task 4Add a call to setTenure in the main method.Add the call just after the constructor call. |
Copyright © 1996-1997 MageLang Institute. All Rights Reserved. |