GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

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

To treat primitive type values as objects, you must use ____…

To treat primitive type values as objects, you must use ____________________ classes.

Read Details

How many ways can a president, vice-president, secretary, an…

How many ways can a president, vice-president, secretary, and treasurer be chosen from a  club with 8 members? Assume that no member can hold more than one office.

Read Details

Making an instance of one class a field (data member) in ano…

Making an instance of one class a field (data member) in another class is called ________________.

Read Details

License plates are made using 2 letters followed by 3 digits…

License plates are made using 2 letters followed by 3 digits. How many plates can be made if repetition of letters and digits is allowed?  (There are a total of 26 letters and 10 digits.)

Read Details

In the following code, assume that inputFile references a Sc…

In the following code, assume that inputFile references a Scanner object that has been successfully used to open a file:What will be the value of totalIncome after the following values are read from the file? 2.58.53.05.5abc1.0

Read Details

What is the output of the following code: Circle c1 = new Ci…

What is the output of the following code: Circle c1 = new Circle(3); Circle c2 = new Circle(c1); c1.setRadius(4); System.out.println(c2.getRadius());

Read Details

This type of methods cannot access any non-static members in…

This type of methods cannot access any non-static members in its own class. 

Read Details

If you have defined a class Rainfall with a public static me…

If you have defined a class Rainfall with a public static method getTotalRainfall(), and also created an object referenced, rain, which of the following will call the getTotalRainfall()method?

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