subject

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 OldCellPhone() { this(DEFAULT_DSCR, MIN_CAP, false, false); } public OldCellPhone(String dscr, int mem, boolean cam, boolean gp) { // not shown } public String toString() { // not shown } public boolean setMemCapacity(int mem) { // not shown }};A programmer decides to make the static DEFAULT_DSCR mutable, removing its final status, as in: static public String DEFAULT_DSCR = "(generic phone)";A mutator is added for this member. Any String whose length is at least 2 characters will be acceptable as a new DEFAULT_DSCR. Check the true statements (there may be more than one correct answer):A. If the mutator takes a String parameter, newDefault, a reasonable definition would be: if ( newDefault. length() < 2 ) { this. newDefault = DEFAULT_DSCR; return false; } this. newDefault = newDefault; return true;B. If the mutator takes a String parameter, newDefault, a reasonable definition would be: if ( newDefault. length() < 2 ) return false; DEFAULT_DSCR = newDefault; return true;C. The mutator for this member will be an instance method. D. If the mutator takes a String parameter, newDefault, a reasonable definition would be: if ( newDefault. length() > 0 ) return false; DEFAULT_DSCR = newDefault; return true;E. The mutator for this member will be a static method.2.Consider the class as partially defined here://class PizzaOrder class PizzaOrder{ // static public members public static final int MAX_TOPPINGS = 20; // instance members private String toppings[]; private int numToppings; // constructor public PizzaOrder() { numToppings = 0; toppings = new String[MAX_TOPPINGS]; } // accessor tells # toppings on pizza, i. e., #toppings in array public int getNumToppings() { return numToppings; } // etc.}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:50
Using the artofstat website, run a permutation test to see if there is a difference in the mean amount of time spent on emails per day between in state and out of state students. (make sure to generate 10,000 permutations.) in state students: 2 3 3 6 2 1 1 5 3 2.5 out of state students: 1 2 2 1 2 1 4 3 9 1 10 1 3 what is the p-value?
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e.g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
You know the right answer?
Here is an outline for a working class OldCellPhone that has no errors (you may see this exact class...
Questions
question
History, 25.08.2020 14:01
question
Mathematics, 25.08.2020 14:01
question
Physics, 25.08.2020 14:01
Questions on the website: 13722363