1. (2 points each) Create the following objects as described below. Use any name
ID: 3704672 • Letter: 1
Question
1. (2 points each) Create the following objects as described below. Use any name Create an object of type Homework, named homework1, using a constructor that does not take in any arguments. a. b. Create an object of type School, named mySchool, using a constructor that takes in three String arguments. Use "University", "of", and "Oklahoma" as those arguments c. Create an object of type Semester, named spring, using a constructor that takes in two arguments: the string "Spring" and the int 2016. d. Create an array of 5 Grade objects, named ray. (Leave them as initialized to the default value)Explanation / Answer
Please find the answer below:
in c/c++
1) Homework homework1();
2) School mySchool("University","of","Oklahoma");
3) Semester spring("Sprint",2016);
4) Grade ray[5];
in java
1) Homework homework1 = new Homework();
2) School mySchool = new School("University","of","Oklahoma");
3) Semester spring = new Semester("Sprint",2016);
4) Grade ray[] = new Grade[5];
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.