Question: 1. (3pts) True or False: In Java, every class have exactly one parent class; while an interface can extends multiple interfaces. 2. (7pts) Assume we

 1. (3pts) True or False: In Java, every class have exactly

1. (3pts) True or False: In Java, every class have exactly one parent class; while an interface can "extends multiple interfaces. 2. (7pts) Assume we have defined the following interface and classes > Movable Potion > Weapon Sword The class Sword contains the method: public void sharpen) The class Potion contains the method: public Potion mix (Potion other) The interface Weapon contains the method: public void break) Given the following definitions Movable movable: Weapon weapon; Sword sword; Potion potion; Which of the following are legal? movable sword; swordweapon; weapon . weapon.sharpen ): . (Sword ) potion ; = .((Sword) movable).sharpen () . potion.mix (movable) sword.break ()

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 Databases Questions!