Assignment 1

Due date: Week 6 Friday (25-Aug-2017) 11:45 PM AEST Weighting: 20%

Assignment task

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)

The application should ask the user to enter the amount for each account (total N accounts) and calculate the interest. The application should display the interest for each bank account as shown in the example below. At the end of the Nth account’s interest, the details such as total interest, lowest interest, highest interest, average interest and number of accounts with no interest should be displayed. The total interest is calculated by adding the interest for all accounts. The lowest interest is calculated by finding the lowest value from interests for N accounts. The highest interest is calculated by finding the highest value from interests for N accounts. The average interest is calculated by dividing the total interest with the total number of accounts. The number of accounts with no interest is calculated by finding all accounts with zero 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

}

}

Submission

You must submit the following three files using the Moodle online submission system.

• Account.java

• AccountTest.java

• Report.docx (this file contains a brief report that includes student name, student ID number, course name, course code and test results (screenshots/test cases with results to show that your application is working correctly))

Important Note

• You should start your assignment as early as possible. Your tutor will be checking your progress in weeks 4 and 5.

• You should not show your source code and report to any other student. You should not ask anyone to do your assignment. Please read CQU’s plagiarism guidelines.

Marking Criteria

Criteria

Marks

Allocated

1 Variables, constants and types

Declaring and using variables and constants /2

2 Objects and classes

Creating/declaring and using objects and classes /1

3 Loops

Using loops and conditions /1

4 If statements

Using if statements and conditions /1

5 Methods

Declaring and using methods /2

6 Inputs and Outputs

Reading input /1

Displaying results /1

7 Overall logic and program

Calculating quantities (0 mark if program doesn’t compile) /5

Spacing and indentation conventions /1

Naming conventions /1

Comments /1

8 Report

Test results (0 mark if program doesn’t compile) /2

Presentation(fonts, spaces, information, language) /1

Sub-Total /20

Penalties

Late submission : 5% (1 mark) / day or part of a day

Total /20

Due date: Week 6 Friday (25-Aug-2017) 11:45 PM AEST Weighting: 20%

Assignment task

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)

The application should ask the user to enter the amount for each account (total N accounts) and calculate the interest. The application should display the interest for each bank account as shown in the example below. At the end of the Nth account’s interest, the details such as total interest, lowest interest, highest interest, average interest and number of accounts with no interest should be displayed. The total interest is calculated by adding the interest for all accounts. The lowest interest is calculated by finding the lowest value from interests for N accounts. The highest interest is calculated by finding the highest value from interests for N accounts. The average interest is calculated by dividing the total interest with the total number of accounts. The number of accounts with no interest is calculated by finding all accounts with zero 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

}

}

Submission

You must submit the following three files using the Moodle online submission system.

• Account.java

• AccountTest.java

• Report.docx (this file contains a brief report that includes student name, student ID number, course name, course code and test results (screenshots/test cases with results to show that your application is working correctly))

Important Note

• You should start your assignment as early as possible. Your tutor will be checking your progress in weeks 4 and 5.

• You should not show your source code and report to any other student. You should not ask anyone to do your assignment. Please read CQU’s plagiarism guidelines.

Marking Criteria

Criteria

Marks

Allocated

1 Variables, constants and types

Declaring and using variables and constants /2

2 Objects and classes

Creating/declaring and using objects and classes /1

3 Loops

Using loops and conditions /1

4 If statements

Using if statements and conditions /1

5 Methods

Declaring and using methods /2

6 Inputs and Outputs

Reading input /1

Displaying results /1

7 Overall logic and program

Calculating quantities (0 mark if program doesn’t compile) /5

Spacing and indentation conventions /1

Naming conventions /1

Comments /1

8 Report

Test results (0 mark if program doesn’t compile) /2

Presentation(fonts, spaces, information, language) /1

Sub-Total /20

Penalties

Late submission : 5% (1 mark) / day or part of a day

Total /20

I need thesis of 10000 words, my topic is attached in the fileselect one of the industry1)fast food restaurent2) fashion store3) chain store of australia4) retail food chain storeThe structure of your report headings will be1) Introduction2) contectal Background3)...The goal of this task is to integrate and apply knowledge of pathophysiology and safe administration of medication to a patient scenario. This will also incorporate new drug design and your creative and...ASSESSMENT COVERSHEET – ASSESSMENT 1Assessment title SITXCOM005 Manage Conflict – QuestioningStudent NameAssessor NameI declare that this assessment is a product of all my own work:Student’s Signature...Systems Requirement Specification1. TIMELINES AND EXPECTATIONSDue date: Sunday, Week 6, 11:55pm.Weighting: 15%, maximum mark: 100.Minimum time expectation: 30 hours.Your assignment will be assessed by...Assignment No.1 (35%) EIA and Soft ToolsQ1. Using the article “Revisiting the Limits to Growth After Peak Oil” provided in the class summarise key learnings in terms of limit to growth. What are the means...2000 word written assignmentThe final written assessment measures application of knowledge relating to the content areas of the unit and then applied to the action of graduate applications. The finalized...**Show All Questions**