Consider the following class definition. public class ExamS…

Consider the following class definition. public class ExamScore { private String studentId; private double score;   public ExamScore(String sid, double s) { studentId = sid; score = s; }   public double getScore() { return score; }   public void bonus(int b) { score += score * b/100.0; } } Assume that the following code segment appears in a class other than ExamScore. ExamScore es = new ExamScore(“12345”, 80.0); es.bonus(5); System.out.println(es.getScore()); What is printed as a result of executing the code segment?

Consider the following class declaration. public class Samp…

Consider the following class declaration. public class Sample { private int a; private double b;   public Sample(int x, double y) { a = x; b = y; }   // No other constructors } The following method appears in a class other than Sample. public static void test() { Sample object = new /* missing constructor call */ ; } Which of the following could be used to replace /* missing constructor call */ so that the method will compile without error?

A student has created a Car class. The class contains variab…

A student has created a Car class. The class contains variables to represent the following. A String variable called color to represent the color of the car An int variable called year to represent the year the car was made A String variable called make to represent the manufacturer of the car A String variable called model to represent the model of the car The object vehicle will be declared as type Car. Which of the following descriptions is accurate?