Here is an outline for a working class OldCellPhone that has no errors (you may
ID: 3769471 • Letter: H
Question
Here is an outline for a working class OldCellPhone that has no errors (you may see this exact class several times in this exam): class OldCellPhone static public final int MIN-CAP 10; static public final int MAX-CAP 1000; static public final string DEFAULT-DSCR "(generic phone)"; private String description; private int memCapacity; private boolean camera; private boolean gps; public void setCamera( boolean hascam ) { camera hascam; } public void setGps( boolean hasGps ) { gps = hasGps; } public oldCel1Phone() this(DEFAULT_DSCR, MIN_CAP, false, false); public oldCel1Phone (String dscr, int mem, boolean cam, boolean gp) // not shown public String tostringC) // not shown public boolean setMemCapacity(int mem) // not shownExplanation / Answer
If correctly defined , a client could add 30 units of memory to the old cellphone object oldcellphone.addMemory(30)
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.