Question
Hello ; I have a group assignment in Java, the prof asked us to submit only one file which contains all of our work (both
Hello ;
I have a group assignment in Java, the prof asked us to submit only one file which contains all of our work (both what we did individually and what we agreed on as a group)
may u help me in this with a comment, so I can understand the process
that what I did
##
public class Assignment2 {
public static void main(String[]args) {
class Indiviual_Contribution {
public static final (String groub_numeber) {
private String full_name;
private String net_ID ;
void getfull_name(){
}
void getNet_ID(){
}
void q1() {
}
void q2() {
}
void q3() {
}
void q4() {
}
}
}
}
##
General (20 points) First, in a .java file named Assignment2 (name your .java file only Assignment2, with no groupID or netID) define a public class with the same name and define your main method in this class. The rest of the assignment should be done in this single file and you should submit only this file Define a superclass named IndividualContribution. This class has static final string group number, which is set to be the name of your group. It also has two private string variables fullName and netID. The class has two get methods for each of the two string variables. The two get methods are named getFullName and getNetID and return the value of the corresponding variable. This class has four methods q1 to q4 with no implementation and no input arguments, and with return type void Each student in the group should choose two of the bellow methods q1 to q4 and extend the superclass mentioned above and define a subclass with their first name implementing those two methods. This subclass has a constructor receives two String arguments and sets the values of fullName and netID In your main method you should create one object for each of the three subclasses. For each object you should first print fullName and netID of the student who has developed that subclass (both in one line), and then call the two methods that they have implemented. So, your main method has only 12 lines
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started