Question: NetBeans a) Create a class UnderGrad with 5 variables: age (int), activity (String), private name (String), grade (double), bonus (double). b) Create a mutator for
NetBeans

a) Create a class UnderGrad with 5 variables: age (int), activity (String), private name (String), grade (double), bonus (double). b) Create a mutator for the variable name. c) Create a method display to print all the variables. d) Create method Math1 of the type void that takes X (int) and determine if it is an even number or not. e) Create a method increaseBonus that takes amount (double) and increase the bonus by that amount. (make sure to use a return-type method) f) Create a default constructor that gives bonus a default value of 150 g) Create an argument constructor that takes age, activity, and grade and gives bonus a value of 150 h) Define object UG1 and use constructor in part F i) Define UG2 and use constructor in part G j) Set the name for UG1 and UG2 (using scanner) k) Increase the bonus for UG1 by 214 1) Print all the details for both UG1 and UG2 using display method in part C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
