GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

Shared Instructions Indicate the result of the snippet of co…

Shared Instructions Indicate the result of the snippet of code, assuming that it is in a main method of a class. More specifically, you must indicate one of the following: the output of the code, if the code compiles and runs without errors which statement(s) don’t compile (line #s, first line is #1) and why, if the code doesn’t compile when put in a main method the type of runtime error (a class name ending with Exception) and the statement that caused it (line #, first line is #1) if the code compiles but doesn’t run properly Shared Code public class Vehicle { // In Vehicle.java public String toString() { return “vehicle”; } public String fuel() { return “gas”; }}public class Truck extends Vehicle { // In Truck.java public String toString() { return “truck”; }}public class Car extends Vehicle { // In Car.java public String toString() { return “car”; } public String honk() { return “beep”; }}public class Sedan extends Car { // In Sedan.java public String toString() { return “sedan”; }} Unique Snippet Vehicle v = new Car();Truck t = (Truck) v;System.out.print(t.toString());

Read Details

Using an interface solely to store constants (a constant int…

Using an interface solely to store constants (a constant interface) is considered good design practice in Java.

Read Details

Shared Instructions Indicate the result of the snippet of co…

Shared Instructions Indicate the result of the snippet of code, assuming that it is in a main method of a class. More specifically, you must indicate one of the following: the output of the code, if the code compiles and runs without errors which statement(s) don’t compile (line #s, first line is #1) and why, if the code doesn’t compile when put in a main method the type of runtime error (a class name ending with Exception) and the statement that caused it (line #, first line is #1) if the code compiles but doesn’t run properly Shared Code public class Vehicle { // In Vehicle.java public String toString() { return “vehicle”; } public String fuel() { return “gas”; }}public class Truck extends Vehicle { // In Truck.java public String toString() { return “truck”; }}public class Car extends Vehicle { // In Car.java public String toString() { return “car”; } public String honk() { return “beep”; }}public class Sedan extends Car { // In Sedan.java public String toString() { return “sedan”; }} Unique Snippet Car c = new Sedan();Vehicle v = c;System.out.print(v.toString());

Read Details

Analyze the following code snippet and determine its Big-O t…

Analyze the following code snippet and determine its Big-O time complexity. Show your reasoning by identifying how many times each loop executes. public static void analyze(int n) {   for (int i = 0; i < n; i++) {       for (int j = 0; j < n*n; j++) {           System.out.println(i + "," + j);       }   }} Outer loop executes: __a__ times Inner loop executes: __b__ times (per outer loop iteration) Big-O Notation: __c__ Growth Rate: __d__   Use this template for your answer (please type fully - you cannot copy): a: [answer in blank a] b: [answer in blank b] ... d: [answer in blank d]

Read Details

Which of the following scenarios best demonstrates an organi…

Which of the following scenarios best demonstrates an organism maintaining homeostasis?

Read Details

A class can implement multiple interfaces but can only direc…

A class can implement multiple interfaces but can only directly extend one class.

Read Details

Which of the following digestive accessory organs is respons…

Which of the following digestive accessory organs is responsible for storing the bile that is used in the breakdown of fats?

Read Details

Both the presentation posted by Shanika M & Pamela T mention…

Both the presentation posted by Shanika M & Pamela T mention this: 

Read Details

[4pts EXTRA CREDIT] Perform Binary Search on the array below…

[4pts EXTRA CREDIT] Perform Binary Search on the array below to find the value 58. Fill in the table below with elements examined in order (one number per row). For example, if we look at 7 first, put 7 as the first entry of the table. You may not need to use all entries of the table. Array: {7, 13, 19, 31, 58, 73, 90} 1. __a__ 2. __b__ 3. __c__ 4. __d__ 5. __e__ 6. __f__ 7. __g__   Use this template for your answer (please type fully – you cannot copy): a: [answer in blank a] b: [answer in blank b] *do not include if there is no answer c: [answer in blank c] *do not include if there is no answer … g: [answer in blank g] *do not include if there is no answer

Read Details

As mentioned in Pamela T’s presentation, this phenomenal thi…

As mentioned in Pamela T’s presentation, this phenomenal thinker,_______________________,who  was the author of “In Praise of Folly & who, as Pamela stated. was a______________________

Read Details

Posts pagination

Newer posts 1 … 68 69 70 71 72 … 81,987 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top