GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

Consider the following statement: String greeting = “Hello,…

Consider the following statement: String greeting = “Hello, World!”; //note: there is a space after the camma int len = greeting.replace(“World”, “Dave”).length(); What is the value of the variable len?

Read Details

What percent of the total area under the normal curve is abo…

What percent of the total area under the normal curve is above z = 1.22?  Round to one decimal place.

Read Details

To compare two objects in a class to see whether they contai…

To compare two objects in a class to see whether they contains same values for all fields,

Read Details

Consider the following three classes: public class A { priva…

Consider the following three classes: public class A { private int number; protected String name; public double price; public A() {  … } private void foo1() { System.out.print(“A version of foo1() called.”); } protected int foo2() { System.out.print(“A version of foo2() called.”); return number; } public String foo3() { System.out.print(“A version of foo3() called.”); return “Hi!”; } }  //end class A   public class B extends A { private char service; public B() {  … } public void foo1() { System.out.print(“B version of foo1() called.”); } public int foo2() { int n = super.foo2(); System.out.print(“B version of foo2() called.”); return n + 5; } public String foo3() { String temp = super.foo3(); System.out.print(“A version of foo3() called.”); return temp + ” foo3.”; } }  //end class B   public class C extends B { public C() {  … } public void foo1() { System.out.print(“C version of foo1() called.”); } }  //end class C Answer the following questions: 1. The instance data members are inherited by B class from A class are [ans1]  and [ans2]. 2. The instance methods are inherited by B class from A class are [ans3] and [ans4].  (For the answers to the following questions, watch out space!) 3. What is the output of the following code sequence? B b1 = new B(); b1.foo1();  [ans5] 4. What is the output of the following code sequence? B b2 = new B(); int n = b2.foo2();  [ans6] 5. What is the output of the following code sequence? B b3 = new B(); System.out.print(b3.foo3());  [ans7] 6. What is the output of the following code sequence? C c1 = new C(); c1.foo1();  [ans8]

Read Details

What percent of the total area under the normal curve is bet…

What percent of the total area under the normal curve is between z = 0.54 and z = 1.91? Round to one decimal place

Read Details

Find Q1 from the data set below: 20, 25, 26, 26, 26, 27, 29,…

Find Q1 from the data set below: 20, 25, 26, 26, 26, 27, 29, 33, 41, 43

Read Details

Find the mean of the following data set: 54, 61, 59, 56, 55,…

Find the mean of the following data set: 54, 61, 59, 56, 55, 68 Round to two decimals

Read Details

A bag contains 2 red marbles, 5 blue marbles, and 6 green ma…

A bag contains 2 red marbles, 5 blue marbles, and 6 green marbles.  What is the probability that a randomly selected marble is blue?  Give answer in a reduced fraction.

Read Details

If the ProductionWorker is a subclass of the Employee class,…

If the ProductionWorker is a subclass of the Employee class, which feature of the object-oriented language is demonstrated by the following code?   Employee e;   ProductionWorker  p = new ProductionWorker();   e = p;

Read Details

What is the purpose of the following algorithm, assuming s r…

What is the purpose of the following algorithm, assuming s references a String? boolean valid = (s != null);int i = 0;char ch;while (valid && i < s.length()){     ch = s.charAt(i);   valid = Character.isLetterOrDigit(ch);   i++;}

Read Details

Posts pagination

Newer posts 1 … 49,089 49,090 49,091 49,092 49,093 … 70,567 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top