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
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?
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
