Create a sales tracking program named salestracking.java

Assignment Help JAVA Programming
Reference no: EM13775879

STEP 1: SalesTracking.java

Back to Top

You must create a sales tracking program named SalesTracking.java. This program must track monthly sales as well as compute average yearly sales, total sales for the year, and which month had the highest sales and which month had the lowest sales.

The program should prompt the user for the sales for each month starting with January. After all the monthly sales have been entered, your program should have methods that do the following.

getSales(): This method prompts the users for the sale for each month. The return value for this method will be the amount that the user entered. This amount should be stored and returned into the corresponding location in the monthlySales array. For example, January sales should be stored in the first location, February sales should be stored in the second location, and so forth. This method should be enclosed in a loop to facilitate this process.

computeTotalSales(monthlySales): This method receives the monthly sales array as an argument and returns the total sales of the year.
computeAverageSales(monthlySales): This method receives the monthly sales array as an argument and returns the average sales for the year.

computeHighestMonth(monthlySales): This method receives the monthly sales array as an argument. This method will search and compare the values of the monthly sales array for the highest value. Once the highest value has been determined, it will store the value in the value that corresponds with the index of that month. The method will return the index of the month with the highest value.
computeLowestMonth(monthlySales): This method receives the monthly sales array as an argument. This method will search and compare the values of the monthly sales array for the lowest value. Once the lowest value has been determined, it will store the value in the value that corresponds with the index of that month. The method will return the index of the month with the lowest value.
displaySaleInfo(totalSales, averageSales, highestMonth, highestSales, lowestMonth, lowestSales): This method will receive the total yearly sales, average monthly sale, the month with the highest sales, as well as the sales for that month and the month with the lowest sales. This method will display all of the data it received as arguments.

All methods must be called from the main method. Sales amounts should be rounded to two decimal places. You should use parallel arrays. Your first array (monthArray) should be initialized with all of the months. This array should have 12 locations of course. Your other array should be named monthlySales. Like your monthArray, this array should be 12 locations and be populated with the getSales( ) method.

Reference no: EM13775879

Questions Cloud

How would you determine a potential course of action : You and your supervisor know that you both will get a monetary bonus if you complete the job by a certain time. How would you determine a potential course of action in handling this situation? What ethical guidelines would you follow in making a d..
Educational videos as related to language development : Many products, diets, and services are marketed to parents as beneficial to infant or toddler development. In order to increase sales to parents and caretakers, some companies use marketing strategies that make exaggerated, unfounded, or unrealist..
The beliefs, values, attitudes and philosophies : Explain the beliefs, values, attitudes, and philosophies this nurse demonstrates and relate it to your long-term goals.
Discuss the concept of the plea bargain : Discuss the concept of the "Plea Bargain". What does it mean, who does it apply to, who is involved in the process and what is it purposes
Create a sales tracking program named salestracking.java : create a sales tracking program named SalesTracking.java. This program must track monthly sales as well as compute average yearly sales, total sales for the year, and which month had the highest sales and which month had the lowest sales.
Explain the effects of radiation on the dna sequence : Describe the chemistry of DNA and explain the effects of radiation on the DNA sequence.
What is the purpose and function of uniform commercial code : The next primer you will prepare for your department's training series will acclimate your colleagues to the inner working of the UCC. What is the purpose and function of the Uniform Commercial Code
Relationship between quasi-experiments-confounding variables : Provide examples of: one-group posttest designs and one-group pretest and posttest designs. What are the limitations of each?
Currency of another nation in an effort to control exchange : Describe when and why central banks buy either their own currency or the currency of another nation in an effort to control exchange rates.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Writing a program that parses

The programming project involves writing a program that parses, using recursive descent, a GUI definition language defined in an input file and generates the GUI that it defines.

  Demonstrates conditions under which the compareto() method

Write an application that demonstrates conditions under which the compareTo() method retrun a positive number, a negative number, and a zero when used to compare two Strings, Save the file as CompareStringValues.java. Lab Assignment

  Guess the number game

The user interface is displayed and the user clicks the "Start Game" button to begin the game - Your application then gets a random number in the range 1-1000 inclusive

  Implement a card game in java

In this assignment, you will be asked to implement a card game. You will need to make several design decisions for your code. It will be expected that all classes you write will utilize the principle of encapsulation.

  Java application to declare and create a vector

Write a java application that perform the following task: declare and create a vector with initial size of 10, increment of 2

  Document the current application describing major classes

Add to the Project Management tool the different planned activities needed to implement the changes to the solution and document the current application describing the major classes used by the application.

  Socket programming in java: tcp

In this project we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web server that is capable of processing multiple simultaneous service requests in parallel.

  Create the working applet to compute tax

Write down a java applet. Your applet assits to find out how much federal tax we require to pay suppose the tax rate is 12%. Create and implement the working applet to compute tax.

  Java class, array, link list , generic class

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

  Album name instance variable

Design a CD class where a CD object represents a single music CD. What kinds of information (artist, genre, total playing time, etc.) do you want to know about a CD?StateAlbum Name instance variable

  Design a java application using the list data structure

You are to design a Java application using the list data structure to manage your contact information. Each contact may have the subsequent data:

  Organizational report

You have been hired as the CIO of a large multinational Internet advertising company. The president of the company is entertaining a major new software development project to keep track of advertising revenues.

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