Java Programming Phase

Java Programming Phase

Primary Task Response: Within the Discussion Board area, write 400–600 words that respond to the following questions with your thoughts, ideas, and comments. This will

be the foundation for future discussions by your classmates. Be substantive and clear, and use examples to reinforce your ideas:

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,

READ ALSO :   Open a private and a small business

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.

PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂