Question: Considering the class below. Write a method called major Display that receives an int number as an input parameter if the input parameter is 1,

Considering the class below. Write a method called major Display that receives an int number as an input parameter if the input parameter is 1, returns the major in lower case if the input parameter is 2, returns the major in upper case class Student { String name; int id; String major; double gpa; int credits Taken; String initial() { String init = name. substring(0, 1); init = name. toUpperCase() + return init; } int getId() { return id; } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
