Question: Multiple Attempts Force Completion Not allowed. This test can only be taken once. Remaining Time: 19 minutes, 51 seconds. This test can be saved

Multiple Attempts Force Completion Not allowed. This test can only be takenonce. Remaining Time: 19 minutes, 51 seconds. This test can be savedand resumed at any point until time has expired. The timer willcontinue to run if you leave the test. Your answers are savedautomatically. > Question Completion Status: Question 1 Moving to another question willsave this response. Moving to another question will save this response. 0.5points Fill in the blanks: "In Java, ..... keyword is used toexplicitly throw an exception and keyword is used to declare/specify that an

Multiple Attempts Force Completion Not allowed. This test can only be taken once. Remaining Time: 19 minutes, 51 seconds. This test can be saved and resumed at any point until time has expired. The timer will continue to run if you leave the test. Your answers are saved automatically. > Question Completion Status: Question 1 Moving to another question will save this response. Moving to another question will save this response. 0.5 points Fill in the blanks: "In Java, ..... keyword is used to explicitly throw an exception and keyword is used to declare/specify that an exception might be thrown." O a. throws, throw O b. finally, throw O C. throw, catch O d. throw, throws O e. throw, finally El no lain. CH O Question 1 of 7 > >> 26C Save Answer Question 1 of 7 > >> (4) ENG 15:22 14-06-2022 7 llege.ca/ultra/courses/_663605_1/cl/outline Remaining Time: 19 minutes, 33 seconds. Question Completion Status: A Moving to another question will save this response. Question 3 public class Rectangle extends Parallelogram { 2 points Suppose we have class Rectangle inheriting setters and getters for width and height from class Parallelogram and overriding the rest of the methods as: public Rectangle (double width, double height) { super (width, height); } @Override public double getPerimeter() { return (getWidth() + getHeight()) *2; @Override public String toString() { return "Rectangle {w=" + (new Double(getWidth()).toString()) + " } } Now, if we want to let class Square inherit from Rectangle as: public class Square extends Rectangle { public Square (double side) { super (side, side); } @Override public double getPerimeter() { CER no Lx O 26C Paused < < < Question 3 of 7 > >>> Save Answer h=" + (new Double (getHeight()).toString()) + "}"; (4) ENG ; 15:23 14-06-2022 7 X MyApps college.ca/ultra/courses/_663605_1/cl/outline P Remaining Time: 19 minutes, 28 seconds. Question Completion Status: S O + @Override public double getPerimeter() { return 4 * getWidth(); } @Override public String toString() { return "Square {s=" + (new Double(getWidth()).toString()) + "}"; } 1- Mention two other methods that need to be overridden in class Square in order to have correct functionalities for the objects of this class/type (just two method names please.) 2- Implement one of them (just a short code snippet - no extra explanations please.) For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Paragraph Arial E IT X XG T V 10pt > < K7 KU hn - + V ABC TT 49 D X X 89 Q5 AR Paused : 26C A ... X 0 WORDS POWERED BY TINY (4) ENG 4 15:23 14-06-2022 Multiple Attempts Force Completion Warnings appear when half the time, 5 minutes, 1 minute, and 30 seconds remain. Not allowed. This test can only be taken once. Remaining Time: 19 minutes, 20 seconds. This test can be saved and resumed at any point until time has expired. The timer will continue to run if you leave the test. Your answers are saved automatically. Question Completion Status: Question 4 A Moving to another question will save this response. Which ones can be overridden? O a. abstract methods O b.private methods O c. final methods O d. static methods A Moving to another question will save this response. El automatically when the time expires. hp 26C Question 4 of 7 > >>> 0.5 points Save Answer < < Question 4 of 7 > >> (4) ENG 15:23 14-06-2022 ch Multiple Attempts Force Completion Will save and submit automatically when the time expires. Warnings appear when half the time, 5 minutes, 1 minute, and 30 seconds remain. Not allowed. This test can only be taken once. This test can be saved and resumed at any point until time has expired. The timer will continue to run if you leave the test. Your answers are saved automatically. Remaining Time: 19 minutes, 15 seconds. Question Completion Status: A Moving to another question will save this response. Question 5 O b. A class can't extends more than one class and can't implements more than one interface O c. All the methods in an interface are public and abstract by default O d. interfaces could be used as a bridge to connect conceptually unrelated classes Which one is wrong? O a. If a class implements an interface and doesn't provide implementations for all its abstract methods, the class should be declared as an abstract Moving to another question will save this response. hp < < Question 5 of 7 > 26C 0.5 points Save Answer < < Question 5 of 7 > >> (4) ENG 15:23 14-06-20 Attempts Force Completion This test can be saved and resumed at any point until time has expired. The timer will continue to run if you leave the test. Your answers are saved automatically. Remaining Time: 19 minutes, 07 seconds. Question Completion Status: A Moving to another question will save this response. Question 6 Moving to another question will save this response. Which one is wrong? O a. super keyword could be used to invoke superclass's constructor(s) O b. In a subclass's constructor, we could first initialize its added/specific fields and then, use the super keyword to initialize its inherited ones O c. super keyword could be used to invoke superclass's non-private method(s) O d. The first statement in any constructor would be super () if you don't explicitly call the superclass's constructors O Et ND O Question 6 of 7 > 26C 0.5 points Save Answ Question 6 of 7 (4) ENG Remaining Time: 19 minutes, 01 second. Question Completion Status: A Click Submit to complete this assessment. Question 7 If we have class Extended extends Base, which option is wrong? O a. Extended el = = O b. Base bl new Base (); Oc. Base b2 = new Extended (); d. Extended e2 new Base (); E new Extended (); = Click Submit to complete this assessment. dill no 26C Save and Submit < < Question 7 of 7 0.5 points Save Answer < < < Question 7 of 7 Save and Submit (4) ENG 15:23 14-06-2 Timed Test Multiple Attempts Force Completion This test has a time limit of 20 minutes. This test will save and submit automatically when the time expires. Warnings appear when half the time, 5 minutes, 1 minute, and 30 seconds remain. Not allowed. This test can only be taken once. This test can be saved and resumed at any point until time has expired. The timer will continue to run if you leave the test. Your answers are saved automatically. Remaining Time: 19 minutes, 42 seconds. Question Completion Status: Moving to another question will save this response. Question 2 Which one is wrong? O a. The overridden method in a subclass can't be more restrictive than its superclass version O b. The overridden method in a subclass must have the same signature as its superclass version O c. A method in a superclass could be overridden in the same class or in a subclass O d. A method in a superclass could be overloaded in the same class or in a subclass Moving to another question will save this response. El np O 26C ^ < < < Question 2 of 7 > >> 0.5 points Save Answer < < Question 2 of 7 > >> (4) ENG 15:23 14-06-2022

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!