Implement a simple annual expense estimator

Assignment Help JAVA Programming
Reference no: EM131565447

Introduction

In this assignment, you will implement a simple "Annual Expense Estimator" to tabulate your expense items. Expenses are an important component of a personal income statement. The most accurate way of coming up with your income statement is to keep a record of all incomes and expenses. If year-round record keeping is not possible, professional financial advisers often ask you to keep track of all income and expense records for 2-3 months, then the records can be used to estimate the annual value.

When no record is available at all, you can still estimate your annual expenses. One way to estimate is to list expense items according to their occurrence frequencies and the estimated amount each time the expense occurs. Then you can calculate the annual total of each item and the grand total of all expense items. If you store expense items (amount and frequency) in a 2-D array, you will use array notation to calculate the annual total of each expense item, e.g., expenses[i][0]*expenses[i][1].

Your program should produce formatted output similar to the following table. The ". . . " symbols here mean that additional items are omitted in the illustration. Your output should not have these ". . . ". That is, the expense items in the table are for illustration purposes; you should use the opportunity to produce a list of items as complete as possible to best reflect your expenses. Identify and list at least six items.

Item

Frequency

Times

Amount

Annual Total

Coffee

Daily

365

5.50

2,007.50

Grocery

Weekly

52

120.00

5,240.00

Phone

Monthly

12

75.00

900.00

Tuition

Semi-annually

2

6,500.00

13,000.00

...

...

...

...

 

Total

 

 

 

31,408.50

Implementation Requirement

1. There must be no less than 6 expense items that occur at various frequencies.

2. Use a 1-D array to store the item names.

3. Use a 2-D array to store expense item's amount and number of times it occurs in a year. The array should have just 2 columns. Use double data type for the values in the array.

4. This program must be implemented with a class that includes three methods:
- void main(String[] arg). It is the entry point of the program with expense item name, amount, and number of times occurred in a year hard coded and stored in array variables with appropriate types. It calls the outputInfo method to produce the desired output.
- String getLabel(int times). The method returns a meaningful frequency label based on the value of the times parameter. For example, if times is equal to 365, return
"Daily"; if it is equal to 12, return "Monthly"; and so on and so forth. You can use chained if ... else
- void outputInfo(String item, int times, double amount). It produces the desired
output using printf method. It needs to call the getLabel method with times as
parameter to obtain the frequency label

5. The main method of the program should follow the process described below:

Declare and initialize the 1-D array for item names

Declare and initialize the 2-D array for item amounts and frequencies Declare a variable for grand total and initialize it to 0
Begin for-loop

Add annual total to grand total

Output expense item 's name , amount , frequency as a string , and annual total
End for-loop Output grand total

In the loop, you need to call outputInfo method. For example, if the 1-D array is names and 2-D array is expenses and the frequency is in the second column, you can invoke the method like the following:
outputInfo(names[i],(int) expenses[i][1], expenses[i][0])


Create your write-up using a word processor (e.g., Word). Make sure you include the following parts:

- Title page. The title page should include the assignment information (e.g., Homework 1), your name, and a sentence summarizing what the program is about.

- Table of contents. List of all sections included in the submission. You do not need to have
page number for each section.

- All sections. The required sections of this exercise include:

- Overview. A brief description of the program: its function, input (the input is tuition information hard-coded in the program), and output.

- Design and Implementation. A description of the design choices and structure of the program: class, methods, variables, and other notable functions used (e.g., printf). Include a flowchart of the for-loop part of the main method. Also include a UML class diagram of the class using the notation adopted in this course.

- Testing. Include screenshots to show the function (e.g., output) of the program.
- Discussion. Include the following discussions as subsections:
∗ Difficulties encountered and how you solved them.
∗ Sources of help you used.
∗ What did you learn in terms of programming?
∗ What did you learn in terms of personal finance?
∗ Any other lessons learned from the assignment.
- Source code. Include source code as text, not images. Include comments in the source code to document your understanding of the code.

Reference no: EM131565447

Questions Cloud

Identify partnerships and funding sources : In the second part of your course Assignment, you will identify partnerships and funding sources. Write in on rolling out a school immunization program.
Explain the legislative action in detail : Explain the legislative action in detail. Explain its overall effects on issues of domestic violence. Explain its overall effect on issues of domestic violence.
Present a rebranding strategy for the product : Present a rebranding strategy for the product, including the following:A new name and Changes in packaging etc.
Define imaginary county public schools : Define Imaginary County Public Schools
Implement a simple annual expense estimator : MIST.3050 Business Applications Development - implement a simple "Annual Expense Estimator" to tabulate your expense items. Expenses are an important component
Explain how would you react to a poorly written resume : How would you react to a poorly written resume or cover letter. Would you invite the applicant to an interview
Discuss the red bulls nontraditional marketing tactics : What are Red Bull's greatest strengths as more companies (like Coca-Cola, Pepsi, and Monster) enter the energy drink category and gain market share?
How do the theories impact supervisory practices : How do the theories impact supervisory practices? Include several theories that are essential for success in supervision.
How does logical thinking empower your own career : How does logical thinking empower your own career

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd