The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 407 Weeks Ago, 6 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Write an application for a mail order company. The program uses a data entry screen in which the user types an item number and a quantity. Write each record to a file. Save your file as MailOrder.java.
File format should be human-readable, comma-delimited text containing the item number and a quantity. It should be named with a ".txt" extension, such as "mailorder.txt"
Example contents:
1423, 4
221,7
104,22
The data entry screen should be a JOptionPane that displays a text field for item number and another text field for the amount ordered. Each of these text fields should be preceded by labels. Be sure that you clear these fields between calls, e.g., itemNrTextField.setText(""). Post if you have problems doing the multiple text fields for the data input screen. A recent Google found this example, which is pretty good: http://stackoverflow.com/questions/6555040/multiple-input-in-joptionpane-showinputdialog.
The program should continue taking input and appending to the text file until told to stop (e.g., Cancel button is hit instead of OK).
Just keep appending to the same file regardless of how many times the program is run
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- Th-----------ank----------- Yo-----------u f-----------or -----------usi-----------ng -----------our----------- we-----------bsi-----------te -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill-----------