Question: please answer all questions...not enough credit Question 4 10 pts Consider the following scenario: a student falls ill with chickenpox in CSE205. Starting with the


Question 4 10 pts Consider the following scenario: a student falls ill with chickenpox in CSE205. Starting with the CSE205 course roster, ASU needs to inform every student in the course, as well as every student who shares a class with someone in CSE205, or who shares a class with someone who shares a class with someone in CSE 205. Students can be notified with a recursive algorithm. For this algorithm: What would a sub-problem look like? What is the stopping condition? HTML Editore B I VA - A - I E 3 1 1 1 * X, - DO N Vx Sev on 12pt - Pa Consider the following implementation of an equals method for comparing a grade object. Is it correct? public class Grade public int id; public int score: Womitted code) public boolean equala (Object o) if (this != 0) return false; if (o.getClass() !=this.getClass()) return false; Grade g = (Grade) o; return this.id = g.id as score -- 9.score: Yes - it checks if the other class is of the correct type and only then checks the member variables Yes - the member variables are primitive types and can be compared directly. No - it has identical functionality to the address comparison performed by ==. No - boolean expressions cannot be returned by a return statement so this code won't compile Hi APSAM Question 9 Consider the following constructor for an immutable matrix ADT: public class SolnMatrix implements Matrix { private final int[] [] data; public SolnMatrix(int[] [] matrix) { data = new int[matrix.length] (): for (int y = 0; y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
