Question: Must be in JAVA! A default (no-args) constructor A constructor with parameter values for all the field A toString() method that uses all the fields.
A default (no-args) constructor A constructor with parameter values for all the field A toString() method that uses all the fields. An equals) method that is based on name of major and the department major is in A compareTo) method that is based on the credits needed to earn the major Once the Major class compiles write a Driver class with the main() method. The main) method will create an array of five Major object references. It will then create the Major objects themselves. Read the data from a text file named majors'txt. The file is comma delimited. Use a loop to do this. After the array has been created use a loop to print the data of each object referred to by the array Test the equals() method using the second Major object and the third Major object. Test the compareTo) method by using the first Major object and the last Major object. Print the results of these two tests. You will be graded on: You must turn in the java source code files for any credit. The code must compile. The code must be well documented. Document each method and use the conventions for naming fields, constants, local variables, constants and class names as well as javadoc tags and comments
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
