Write a java console application that calculates and


Assignment: Java Screening test

(**NOTE: Requesting candidates to send complete Java Project for each assignment without having any compilation errors.Assignment would be considered as incomplete as any assignment is incomplete.)

Task 1

Write a java console application that calculates and displays the bank interest for N bank accounts. N should be declared as a constant and it should be equal to the largest digit of your student ID number (e.g. if your ID number is S334261 then N should be equal to 6 and you can declare it as final int N=6). The interest is based on total amount in account as shown below in Table 1.

Table 1. Amount and Interest

Amount                          Interest
$0 - $1000                     0% (no interest)
$1001 - $5000                2.5%
$5001- $10000               5%
Over $10000                   8% (high interest)

Example for N=4

Enter the amount for account number 1: 500
The interest for account number 1 is $0
Enter the amount for account number 2: 2000
The interest for account number 2 is $50
Enter the amount for account number 3: 10000
The interest for account number 3 is $500
Enter the amount for account number 4: 12000
The interest for account number 4 is $960

Interest Details
Total Interest: $1510
Lowest Interest: $0
Highest Interest: $960
Average Interest: $377.5
Number of accounts with no interest: 1

Your application is to follow the same format for input and output as in the example above, but with customised welcome and exit messages.

The application is to use the following classes.

public class Account
{
public Account()
{
// constructor
}
public double interest(int amount)
{
// code to calculate interest goes here
}
public int interestType(double interest)
{
// code to determine accounts with no interest goes here
}
}

public class AccountTest
{
public static void main(String[] args)
{
// local variable declarations go here
// display welcome message
// loop to input amount, calculate and display interest, calculate summary values
// generate and display summary
// display exit message
}
}

You must submit the following two files.

- Account.java
- AccountTest.java

Task2

Disk Backed Map Collection

Implement a Map, which spills on to disk when it exceeds the heap, or a specified limit.

Time Complexity should be same as Current Map implementations (HashMap, TreeMap, etc.)

- Should be capable of handling in a multithreaded environment.
- Put and GET operations, should be Thread Safe.
- Should provide API level Tuning configurations, Where ever applicable.

You must complete compile free source code, with relevant code comments where ever necessary (only to explain the logic).

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a java console application that calculates and
Reference No:- TGS02676481

Expected delivery within 24 Hours