GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

BURNING of CALORIES while AT REST.

BURNING of CALORIES while AT REST.

Read Details

IN STEP #1: SET MUSCULAR GOALS… Your muscular goals will dic…

IN STEP #1: SET MUSCULAR GOALS… Your muscular goals will dictate how you structure your routine.

Read Details

WHAT IS THIS FREE WEIGHT EXERCISE CALLED?

WHAT IS THIS FREE WEIGHT EXERCISE CALLED?

Read Details

[6 points]  Primitive Types and Reference Types Consider t…

[6 points]  Primitive Types and Reference Types Consider the code below: public static void main(String[] args) {   int x = 7;   int y = x;   y = y + 10;    String[] petsA = {“cat”, “dog”, “bird”};   String[] petsB = petsA;   petsB[1] = “lizard”;   System.out.println(x);   System.out.println(y);   System.out.println(petsA[1]);   System.out.println(petsB[1]); } (a) [4 pts] What is printed when the code is executed? There are four lines of output. (b) [2 pts] What is aliasing?

Read Details

[3 pts] Programming Approach  You’ve been asked to write a…

[3 pts] Programming Approach  You’ve been asked to write a program that reads a list of daily step counts for a week (7 integers) and reports the total steps and the best (highest) day. You do not need to write the full program. Instead, describe how you would approach solving it, using the steps we recommend in class.

Read Details

[4 points] Recursion & Complexity Consider this method, whi…

[4 points] Recursion & Complexity Consider this method, which computes the n-th Fibonacci number: public static int fib(int n) {     if (n

Read Details

[6 points] UML, Inheritance & Encapsulation The UML diagram…

[6 points] UML, Inheritance & Encapsulation The UML diagram specifies a small class hierarchy for a game. A student’s implementation follows. The code does not match the diagram in three places. For each, name the member and briefly state what’s wrong. ┌────────────────────────────────┐ │         GameCharacter                                                    │ ├────────────────────────────────┤ │ # health: int                                                                 │ │ # name: String                                                             │ ├────────────────────────────────┤ │ + GameCharacter(String, int)                                       │ │ + attack(): void                                                             │ │ + getName(): String                                                     │ └────────────────────────────────┘                  ▲                  │         ┌────────────────┐         │     Warrior                          │         ├────────────────┤         │ – armor: int                        │         ├────────────────┤         │ + Warrior(String, int, int)  │         │ + attack(): void                 │         └────────────────┘ public class GameCharacter {     private int health;     public String name;     public GameCharacter(String name, int health) {         this.name = name;         this.health = health;     }     public void attack() {         System.out.println(name + ” attacks!”);     }     public String getName() {         return name;     } } public class Warrior extends GameCharacter {     private int armor;     public Warrior(String name, int health, int armor) {         this.name = name;         this.health = health;         this.armor = armor;     } } Hint : Compare access specifiers and function implementations in both.

Read Details

[2 pts] Write any two differences between Java and Python (…

[2 pts] Write any two differences between Java and Python ( excluding syntax ) 

Read Details

[2 pts] What is overloading and overriding? 

[2 pts] What is overloading and overriding? 

Read Details

[2 pt] What is the purpose of the super keyword?

[2 pt] What is the purpose of the super keyword?

Read Details

Posts pagination

Newer posts 1 … 3,193 3,194 3,195 3,196 3,197 … 96,556 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top