Define method headers for computeaveragesales

Assignment Help JAVA Programming
Reference no: EM13806859

A - Your technical leader has submitted additional requirements for your application. You have been asked to enhance the application so that it includes data validation, computes average sales data, and computes average shipping charges. To plan for this new functionality, you will define 2 new method headers and develop pseudocode.

Data Validation Requirement

To incorporate data validation at the time of product data entry, you will need to include an error-checking condition to allow the user to reenter a data value that is not valid. For example, if a class should have a positive number for an attribute, continuously prompt the user for a valid positive number until one has been entered by the user. Based on the attributes you provided, you will select where to include appropriate error checking. You must include error checking for at least one value required by the user. Provide pseudocode that includes error checking.

New Methods

Define method headers for computeAverageSales() and computeShipping Charges() according to the following requirements. Develop pseudocode for two new methods to be added to your product class:

The computeAverageSales() method should use sentinel-controlled repetition to allow a user to enter product sales data until the user has indicated that he or she is done. The average of the entered sales data will be computed and returned by the method to be displayed by the application. For example, if the user entered 500.50, 250.50, and 300.30, then the average sales would be computed for these 3 values and returned by the method. The prompting of the sales data is done within the method. If the value of the average sales exceeds, $200.00, a message should be displayed to alert the user that the product has produced a significant amount of revenue. The computeAverageSales() method should return type "double."

The computeShippingCharges() method should use sentinel-controlled repetition to allow a user to enter shipping data until the user has indicated that he or she is done. The total shipping charges will be computed and returned as a double value.

Post your pseudocode for the data validation, method headers, and pseudocode for each new method to the Discussion Board. You will use your pseudocode to make the modifications to your application in an upcoming task.

B. Implement the data validation enhancement you designed in the previous task. Include an error-checking condition to allow the user to reenter a data value that is not valid. For example, if a class should have a positive number for an attribute, continuously prompt the user for a valid positive number until one has been entered by the user. Based on the attributes you provided, you have selected where to include appropriate error checking. You must include error checking for at least 1 value required by the user.

Reference no: EM13806859

Questions Cloud

Tagistan a new country in asia the gov­ernment of tagistan : International Diversified Corporation (IDC) owns assets in Tagistan, a new country in Asia. The gov­ernment of Tagistan wants to nationalize all assets owned by foreign firms and investors. What can IDC do? Can it at least obtain payment for the asse..
Conduct a comparative analysis of the firms : Normal 0 false false false EN-US X-NONE X-NONE Conduct a comparative analys..
Patriot act was used to guarantee the ignorance of american : The Patriot Act was used to guarantee the ignorance of the American people, so you will be deprived of real factual information that you could use to make an educated choice about what you want from leadership and foreign policy.
Define method headers for computeaveragesales : Define method headers for computeAverageSales() and computeShipping Charges() according to the following requirements. Develop pseudocode for two new methods to be added to your product class
Write a paper that define eating disorder : Write a paper that define eating disorder and explain how people with eating disorders behave, act and deal with it.
Cognitive therapy (ct) and cognitive-behavioral therapy : What statistical test should be used to analyze the data?
Discuss the factors that currently motivate corporate leader : Identify the critical factors on each side of the "shareholder versus stakeholder debate." Discuss the factors that currently motivate corporate leaders to address this issue. Discuss the aspects of strategic stakeholder management. Discuss how it ha..
Assignment on training and development in small businesses : Normal 0 false false false EN-US X-NONE X-NONE Training and Development in ..

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