Please label your answers (as which one is for which question or which part of w
ID: 3851924 • Letter: P
Question
Explanation / Answer
1. If we compile the above code, it throws
error: constructor Company(String,String,double,int) is already defined in class Company
Since constructor 1 and constructor 2 both are same, they conflicts each other which results in error.
2. Commenting or removing either Constructor 1 or Constructor 2 will fix the code.
//Constructor 2
/*public Company(String inName, String inID, double inRev, int inEmp)
{
coID = inID;
coName = inName;
revenue2011 = inRev;
totNoFTEmployees = inEmp;
}*/
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.