## Day 19: Interfaces ( 30 Days of Code)

The AdvancedArithmetic interface and the method declaration for the abstract divisorSum(n) method are provided for you in the editor below.

Complete the implementation of Calculator class, which implements the AdvancedArithmetic interface. The implementation for the divisorSum(n) method must return the sum of all divisors of .

## Day 18: Queues and Stacks (30 Days of Code)

You do not need to read anything from stdin. The locked stub code in your editor reads a single line containing string s. It then calls the methods specified above to pass each character to your instance variables

## Day 17: More Exceptions (30 Days of Code)

Write a Calculator class with a single method: int power(int,int). The power method takes two integers, n and p, as parameters and returns the integer result of n^p. If either n or p is negative, then the method must throw an exception with the message: n and p should be non-negative.

## Day 16: Exceptions – String to Integer(30 Days of Code)

Read a string, S, and print its integer value; if cannot be converted to an integer, print Bad String.
Note: You must use the String-to-Integer and exception handling constructs built into your submission language. If you attempt to use loops/conditional statements, you will get a 0 score.

## Day 15: Linked List (30 Days of Code)

Complete the insert function in your editor so that it creates a new Node (pass data as the Node constructor argument) and inserts it at the tail of the linked list referenced by the head parameter. Once the new node is added, return the reference to the head node.
Note: The head argument is null for an empty list.

## Day 14: Scope(30 Days of Code)

Complete the Difference class by writing the following:
A class constructor that takes an array of integers as a parameter and saves it to the __elements instance variable.
A computeDifference method that finds the maximum absolute difference between any 2 numbers in __elements and stores it in the maximumDifference instance variable.

## Day 13: Abstract Classes (30 Days of Code)

Task Given a Book class and a Solution class, write a MyBook class that does the following: Inherits from Book Has a parameterized constructor taking these 3 parameters: string title … Read more

## Day 12: Inheritance (30 Days of Code)

Task You are given two classes, Person and Student, where Person is the base class and Student is the derived class. Completed code for Person and a declaration for Student are … Read more

## Day 11: 2D Arrays(30 Days of Code)

Task: Calculate the hourglass sum for every hourglass in A, then print the maximum hourglass sum.

## Sparse Arrays (Problem Solving: Data-Structures)

Task: There is a collection of input strings and a collection of query strings. For each query string, determine how … Read more