UOP PRG421 Week 2 Discussion Latest 2020

Question # 00786625 Posted By: rey_writer Updated on: 12/10/2020 12:19 PM Due on: 12/10/2020
Subject Education Topic General Education Tutorials:
Question
Dot Image

PRG421 Java Programming II

Week 2 Discussion

DQ1 Data Conversion

Accepting input and producing output virtually always requires data conversion. Because Java™ students new to I/O are often surprised at the steps necessary to read data and then put it in a form that can actually be used, the purpose of this discussion is to experiment with data conversion techniques and share the issues that arise to arrive at a better understanding of the critical role data conversion plays in Java I/O.

Copy and paste the linked code into a Java™ program (or rename the file using a .java extension) and run it in NetBeans. The purpose of the program is to calculate a salesperson's total annual compensation. The program asks the user for the total amount dollar amount of sales for a year, and then uses that input to make calculations.

Post your results after running the program to the discussion area.

Discuss with your classmates what errors were produced, what could have caused the errors, and how this code can be fixed. Is there an approach you learned from this code that you can apply to all those situations in which you need to read data and convert it to a usable form?

Note: To interpret your results, you may want to refer to Ch. 5, "Dates, Strings, and Localization," of OCP: Oracle® Certified Professional Java® SE8, Programmer II Study Guide.

DQ2 Choosing a Data Output Option

Before you can perform data output, you must first decide the form in which you want the output data to appear. Onscreen and flat-file output are sometimes appropriate in a small system, such as a modest inventory application in which updated results display on a screen to be analyzed by a user, and in which output is designed for little more

than backup on a local, secure machine. Displaying information onscreen can be a benefit, since the user does not have to produce and review a program-generated report, while saving small amounts of data to an easily-read file with no requirement to manage a database can be the best approach if program requirements do not dictate otherwise.

However, in high-volume scenarios where one program "feeds" large amounts of data to another program, console output and flat-file data storage may not make practical sense.

Post to the discussion area descriptions of at least two scenarios for which console or flat file output would not be appropriate. For each scenario, describe why console/flat file output would not be appropriate, and identify an alternative approach that might make more sense.

Review your classmates' posts, then explain what characteristics the scenarios of your classmates and you described share. In general, for what types of programming scenarios are flat file/console output inappropriate?

 

Dot Image
Tutorials for this Question
  1. Tutorial # 00786541 Posted By: rey_writer Posted on: 12/10/2020 12:22 PM
    Puchased By: 2
    Tutorial Preview
    The solution of UOP PRG421 Week 2 Discussion Latest 2020...
    Attachments
    UOP_PRG421_Week_2_Discussion_Latest_2020.ZIP (18.96 KB)

Great! We have found the solution of this question!

Whatsapp Lisa