CSC 205 – Spring 2014
Programming Project 2 – Awesome Smartphones © 2.0
The Awesome Smartphones decided to create an online store front and you are hired to help develop its first editionwith GUIs using dialog boxes.
Problem:As we have seen in Lab 1 (and soon in Lab 2), the store keeps track of phone model and service area information with a plain text file. Your job is to create an app with consistent look and feel (such as wording in the title bar) and serving the customers whenever there is a request (i.e., loops forever if needed).
Requirements:From application’s function perspective, a couple enhancements need to be added to the workflow as described in Lab 1:
- A “Welcome to <MyStore>” screen is needed, where MyStore is to be replaced with an attractive phrase with your name and kind of business embedded somehow. A nice icon image (in a reasonable size) is also required.
- The app should not stop when one order is fulfilled. Instead, it should go back to the “Welcome” screen as mentioned above.
- When showing models in the dropdown list, the models are to be sorted by name in ascending order, with appropriate price per customer’s choice on contract.
- Showing your customer what s/he got: on the invoice screen, display a picture of the phone. This means that your system needs to manage a picture for each phone model, as practiced in Lab 2.
Analysis & Design:To keep track of the pictures, some changes are needed in the data file (phoneinfo.txt) as used in Lab 1.One way is to append the image file name to the end of each “phone model line” and use a special character (e.g. |) as delimiter. When parsing each line, you just need to replace "$" with "$|" (or your character of choice). Another way change it to CSV format and parse the file accordingly. You need to include at least 5(up-to-date) phone models and 4 area codes in the file.
To make your system design more flexible, consider using classes dedicated to a specific type of functions: such as one for tracking phone data, one for reading data from the file, and one that controls the workflow. Your system needs to have at least two classes: a control class (such as PhoneStoreMain) and a PhoneModelclass. Another class responsible for accessing the phone info text file and manage a collection of PhoneModel objects may also be used.
Optionally, design the PhoneModel class to make it comparable: sort the entries on brand name in ascending order,and provide other useful operations and constructors. Sorting may be carried out in the third class if you use it.
Coding, Testing & Documentation:Follow the Java naming convention to name your classes, methods, variables appropriately and consistently. Use javadoc style comments as described in your textbook to comment your code. Take screenshots during testing and use them (together with concise descriptions) in a Project Report (such as a Word file) to demonstrate how your system works.Organize your code and other artifacts, such as text and image files, test cases and report nicely in your project folder.
You need to test at least one order with contract and one without. Make sure to include screenshots as well as contents of your text and image files in your report to verify the performance of your system.
Deliverables and Due Dates:Create your project folder, with folders for source code, text and image files on Z: drive (or Google drive). Use your project report (in Word format)should include your source code, phone-info file, test scenarios and snapshots, and upload to Canvas. The project is due by Monday, Feb5.