Blog Archives

02: Tree structure – calculate average recursively & iteratively in Java

Q. Complete the following “TreeProcessingImpl” class ….. so that the unit tests shown below pass? Skeleton Code



Prerequisite: if want to work with Maven & eclipse

Here are the basic steps as to how I set up “passing” project using maven & eclipse for the coding exercises. If you are using other IDEs or command line approach then you can ignore this prerequisite. Just create the relevant packages and copy the classes in the passing the test exercises. Using Maven or not, you need the 2 jar files as dependencies to use JUnit.

passing-unit-tests-prerequisite

Step 1: Set up Java, Maven, and Eclipse on your machine following the steps in Setting up Java, Maven, and eclipse

Step 2: Generate a simple project using Maven



Processing data from a file & sorting them

Q. Complete the following “DataProcessingImpl.java” class ….. so that the unit tests shown below pass?



Working with a given input string & character processing

Q. Complete the following StringProcessingImpl.java” class ….. so that the unit tests shown below pass?



Working with monetary values

Q. Complete the following “MonetaryProcessingImpl.java” class … so that the unit tests shown below pass? Skeleton code



300+ Java & Big Data FAQs - Quick Prep

Java & Big Data Tutorials

Top