CJCoding With Joseph
TitleTopicsAction
172
Write a Generic Printer MethodComplete the generic static method `printItem` inside the `Printer` class. It ta...
easy○ Not Started
GenericsMethods
Solve
175
Return the First Item from a Generic ArrayComplete the generic method `getFirst` that takes an array of any type and retur...
easy○ Not Started
GenericsMethods
Solve
177
Write a Generic Method to Print Two ItemsComplete the generic static method `printTwoItems` that takes two values of the ...
easy○ Not Started
GenericsMethods
Solve
178
Store Three Generic Items in an ArrayListComplete the method `buildList` so it creates an `ArrayList<T>`, adds the three ...
easy○ Not Started
GenericsMethods
Solve
180
Check If Two Generic Values Are EqualComplete the generic method `areEqual` that returns `true` if two values are equ...
easy○ Not Started
GenericsMethods
Solve
189
Return the Middle Item from Three Generic ValuesComplete the generic method `getMiddle` that receives three values of the same t...
easy○ Not Started
GenericsMethods
Solve
249
Square MethodComplete the static method `square` so it returns its parameter multiplied by it...
easy○ Not Started
Methods
Solve
250
Add MethodComplete the static method `add` so it returns the sum of its two parameters. F...
easy○ Not Started
Methods
Solve
251
Greeting MethodComplete the static method `greet` so it PRINTS a greeting in the form 'Hello, [...
easy○ Not Started
Methods
Solve
252
Max MethodComplete the static method `max` so it returns the larger of its two parameters....
easy○ Not Started
Methods
Solve
253
Even Check MethodComplete the static method `isEven` so it returns true when its parameter is eve...
easy○ Not Started
Methods
Solve
254
Cube MethodComplete the static method `cube` so it returns its parameter raised to the thir...
easy○ Not Started
Methods
Solve
255
Absolute Value MethodComplete the static method `absValue` so it returns the absolute value of its pa...
easy○ Not Started
Methods
Solve
351
Half of a Number MethodWrite a method `half(int n)` that returns `n` divided by 2 using integer divisio...
easy○ Not Started
Methods
Solve
352
Minimum of Two MethodWrite a method `min(int a, int b)` that returns the smaller of the two values. C...
easy○ Not Started
Methods
Solve
353
Celsius to Fahrenheit MethodWrite a method `toFahrenheit(double c)` that converts a Celsius temperature to F...
easy○ Not Started
Methods
Solve
354
Negate a Number MethodWrite a method `negate(int n)` that returns the negative of `n`. Call it with `7...
easy○ Not Started
Methods
Solve
355
Boolean isPositive MethodWrite a method `isPositive(int n)` that returns `true` when `n` is greater than ...
easy○ Not Started
Methods
Solve
356
Print a Banner MethodWrite a `void` method `printBanner()` that prints this exact line: ===== MENU =...
easy○ Not Started
Methods
Solve
357
Triple a Number MethodWrite a method `triple(int n)` that returns `n` multiplied by 3. Call it with `9...
easy○ Not Started
Methods
Solve
358
Increment MethodWrite a method `increment(int n)` that returns `n` plus 1. Call it with `41` and...
easy○ Not Started
Methods
Solve
359
Last Digit MethodWrite a method `lastDigit(int n)` that returns the last digit of `n` using the r...
easy○ Not Started
Methods
Solve
360
Average of Two MethodWrite a method `average(int a, int b)` that returns the average of the two value...
easy○ Not Started
Methods
Solve
361
Percentage MethodWrite a method `percent(int part, int whole)` that returns what percentage `part...
easy○ Not Started
Methods
Solve
362
Square Root MethodWrite a method `root(double n)` that returns the square root of `n` using `Math....
easy○ Not Started
Methods
Solve
363
Remainder MethodWrite a method `remainder(int a, int b)` that returns the remainder of `a` divid...
easy○ Not Started
Methods
Solve
148
Power of Two Using RecursionRead an integer n (at least 1). Complete the twoPow(int n) method to calculate 2...
medium○ Not Started
Methods
Solve
179
Count Matching Generic ValuesComplete the generic method `countMatches` that takes an array and a target valu...
medium○ Not Started
GenericsMethods
Solve
182
Return the Last Item from a Generic ArrayListComplete the generic method `getLastItem` that takes an `ArrayList<T>` and retur...
medium○ Not Started
GenericsMethods
Solve
183
Create a Generic Method That Repeats a ValueComplete the generic method `repeatValue` that takes a value and a count, then r...
medium○ Not Started
GenericsMethods
Solve
184
Find the Index of a Generic ValueComplete the generic method `findIndex` that searches an array for a target valu...
medium○ Not Started
GenericsMethods
Solve
186
Copy a Generic Value into a BoxComplete the generic method `copyIntoBox` in the `BoxTools` class. It receives a...
medium○ Not Started
GenericsMethods
Solve
187
Create a Generic Method to Print an ArrayComplete the generic method `printArray` that takes an array of any type and pri...
medium○ Not Started
GenericsMethods
Solve
256
Sum To N MethodComplete the static method `sumTo` so it returns the sum of all integers from 1 ...
medium○ Not Started
Methods
Solve
257
Overloaded Area MethodsMethod overloading means two methods can share a name if their parameter lists d...
medium○ Not Started
Methods
Solve
364
Method Calling Another MethodWrite two methods. `square(int n)` returns `n * n`. `sumOfSquares(int a, int b)`...
medium○ Not Started
Methods
Solve
365
Varargs Sum MethodWrite a method `sum(int... nums)` that accepts any number of `int` arguments and...
medium○ Not Started
Methods
Solve
366
Sum of Array MethodWrite a method `sumArray(int[] arr)` that returns the sum of all elements. In `m...
medium○ Not Started
Methods
Solve
367
Overloaded Print MethodsWrite two overloaded methods, both named `show`. `show(int n)` prints `Number: `...
medium○ Not Started
Methods
Solve
368
Is Prime MethodWrite a method `isPrime(int n)` that returns `true` when `n` is a prime number a...
medium○ Not Started
Methods
Solve
369
Is Leap Year MethodWrite a method `isLeapYear(int year)` that returns `true` for leap years. A year...
medium○ Not Started
Methods
Solve
370
Reverse a Number MethodWrite a method `reverse(int n)` that returns `n` with its digits reversed (assum...
medium○ Not Started
Methods
Solve
371
Count Digits MethodWrite a method `countDigits(int n)` that returns how many digits `n` has (assume...
medium○ Not Started
Methods
Solve
372
Even Sum MethodWrite a method `sumEvens(int n)` that returns the sum of all even numbers from 1...
medium○ Not Started
Methods
Solve
258
Recursive Factorial MethodComplete the static method `factorial` so it returns n! using RECURSION (the met...
hard○ Not Started
Methods
Solve
259
Recursive Sum of DigitsComplete the static method `sumDigits` so it returns the sum of the digits of a ...
hard○ Not Started
Methods
Solve
260
Recursive Fibonacci MethodComplete the static method `fib` so it returns the nth Fibonacci number using RE...
hard○ Not Started
Methods
Solve
373
Recursive Greatest Common DivisorWrite a recursive method `gcd(int a, int b)` that returns the greatest common di...
hard○ Not Started
Methods
Solve
374
Recursive Power MethodWrite a recursive method `power(int base, int exp)` that returns `base` raised t...
hard○ Not Started
Methods
Solve
375
Recursive String ReverseWrite a recursive method `reverse(String s)` that returns the string with its ch...
hard○ Not Started
Methods
Solve