help please Java , I will upvote

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

help please Java , I will upvote

Post by answerhappygod »

help please Java , I will upvote
Help Please Java I Will Upvote 1
Help Please Java I Will Upvote 1 (142.43 KiB) Viewed 15 times
Help Please Java I Will Upvote 2
Help Please Java I Will Upvote 2 (155.19 KiB) Viewed 15 times
Study the constructs below and answer the questions that follow. interface Depreciable { void depreciate (double percentage); } 4 abstract class Item implements Depreciable{ protected double value; 6 8 10 12 public Item(double value) { this.value = value; } } class MultimediaItem extends Item implements Depreciable{ public MultimediaItem(double value) { super (value); } public void depreciate (double percentage) { value = value - (value (percentage / 100)); } 14 16 20 class CD extends Multimedia Item public CD (double value) { super (value); } } 24 public class Application { public static void main(String[] args) { 22 26 } The compiler will 4 in the Depreciable interface. The compiler will in the Item class. Which of the following may be added, independently, to the interface Depreciable. (Choose all that apply. Note that negative marking applies.) Oa. public abstract void setValue(double v) {} Ob. String name = "null"; Oc. double percentage; Od ; Jd. double boolean owned = true; Oe. public static double percentage; Of. int getPercentage(); = =
Which of the following may be added to the Item class (Choose all that apply. Note that negative marking applies.) Ja. protected abstract void depreciate(); Ob. protected void depreciate(double p){} Oc. c. public abstract double getValue() {} Od. public abstract Item(); De public static final int = 10; Jf. public Item () {} Og. public void setValue(double v); Which of the following may be added to the main method without causing a compile error. (Choose all that apply. Note that negative marking applies.) = = Oa. Item i = new Item(); Ob. Depreciable d = new Item(); Oc. Item i = new Multimedialtem(0); Od. Depreciable d = new CD(0); Oe. Depreciable d = new Item(0); d = new Multimedialtem(0); Of. Depreciable d = new Depreciable();d = new Item(0); =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply