Objectives
The course objectives met by this assignment
include:
•Course
specifications are available online from the USQ website
. Always check the website
for the latest version.
Please read carefully:
•This
assignment must be your own work.
•It is
acceptable to discuss course content with others to improve your understanding
and clarify requirements, but solutions to assignment questions must be done
on your own. Make sure that you do not discuss your solutions or show your
solution to anyone to protect yourself.
•You
must not copy from anyone, including tutors and fellow students (including StudyDesk), nor
allow others to copy your work.
•Assignments that do not adhere to this
requirement will be deemed to be the result of academic misconduct.
•Submit
any work you have done by the due date, even if it is incomplete or does not
work. Our assignment feedback is constructive so we will provide you with
suggestions so that you can do better next time. Submitting incomplete work is better (you get
partial marks but more so also feedback) than not submitting at all. For this
reason, the percentage of this assignment is low to encourage you to present
your work to make sure you are on the right track.
1. How you need to
write your business application
You are required to write a new
business application/solution in accordance to the business requirements
outlined in “2. The program specifications for your business application”.This business application will be written to
use GUI for all its interaction with the user. As a third year student you have
the programming skills to follow the instructions as they are given in this software
development specification.Please keep
in mind that this is a simulation of a real life scenario. We cannot in the
course of 12 weeks achieve a full real life business application, so we have to
work with a cut down version that still enables you to apply what you have learned
in this course.This means that you need
to provide only the functionality requested.
Assume that you are working for an
organisation where an analyst has done the analysis and written the
specification. You are to draw your own conclusions from this specification, as
the analyst is no longer working for the organisation.However, the organisation requests that you
must follow the instructions as they are, and provide the functionality as
specified.You are not allowed to add
any features or functionalities that are not described here.
However, this specification is not a
complete list of all the things that you need to do to provide what has been
asked for.You need to re-read these
specifications a number of times to determine if there is anything implied that
you need to cater for. You will need to think about how you are going to
achieve the requirements.The
assumptions that you will need to make are part of this assessment.This means that you need to think about what
the business application is required to do and how you are going to achieve
this by implementing what you have learned in this course.You will also need to put yourself into the
position of the person that will be using your business application – keeping
the business processes in mind.
When you work on this assignment,
you need to take into consideration the feedback you received for the previous
assignments.As for all your
assessments, the study book provides you with crucial guidelines on how to
program in this course, and how to use the information from the text book.You also need to consider the guidelines from
the lecture slides, and apply the programming style and implementation of
object oriented programming.Examples
have been provided to you in the additional weekly exercises.
Please note that
•You
must not copy any source code from the text book. You must not use any of the
source code provide to you in the weekly exercises posted on the study desk, or
nor copy any source code from the internet or any other source.If you have any questions regard this
assignment, please contact your course leader.
•You
must write your own source code to show that you understand the course material
and show that you can apply it.
•If
you have any issues, such as bugs, incomplete features or processing by the
time that you are submitting your assignment, it would be beneficial for you to
list them with a short explanation in a separate word document.
Style and coding conventions
As this is a third year course, your
source code must be written clearly, logically and concisely at a high level of
proficiency for a third year programming course.It is expected that you review your source
code to reduce duplication, use smaller methods that have one simple task to
perform.Please ensure that your source
code is correctly indented.
In regards to naming conventions,
please refer to the programming standards published on the study desk for this
course.
These are simple steps to ensure
that you are not loosing marks.
Object oriented design and
implementation
You must implement the appropriate
object oriented methodologies by using the coding conventions in this
course.The study book, lecture slides,
and weekly exercises posted on the study desk provide you with guidelines.
Throughout your development you need
to use classes that implement object oriented principles such as inheritance,
interface, etc., as covered in the course material.Classes, fields and methods must be named
appropriately applying the access modifiers as specified in this course. All
classes must have both data and processing methods to be regarded as
classes.
You also need to incorporate the
feedback from the first and second assignment.
Business layer and GUI layer
For this assignment it is essential
that you apply object oriented Java design and methodologies.For this purpose, you must keep your Business
layer separate from your GUI layer.
File handling
File requirements
|
Type |
It is requested that only text files are being used, as this would be |
|
Location |
It is also requested that a special directory is used that will |
|
Layout |
You will need to provide a file for each of the major components of |
|
Loading |
The files must only be read once when the business application is |
|
Saving |
The files must only be written once, at the time that the business |
Collection(s)
You are requested to use an
appropriate collection to store your objects.
You must use only Maps and/or Lists for this purpose. Arrays and
Vectors are not permitted for this solution.
At the start of the application, the
data is to be read from file into the relevant collections.Any change to the data during data entry must
only occur in memory to the relevant collections. The contents of the
collection(s) are then to be written to file only when the application
terminates.
Your design includes to choose the
appropriate type of collection as well as appropriate content, efficiency of
use, and easy maintainable. You need to consider the type of the collection in
accordance with the performance as well as the processing requirements.
Vectors and arrays are not permitted
for the storage of objects.
Reports
Reports screens
There should be an option on the main
screen where the user selects ‘Reports’.
This must lead to the opening of another window, which then lists all
the report options.
Once the report type has been
selected and button has been clicked the reports form will closes and the
report open showing the result of the report on the screen.The bottom of report should have two buttons,
one to close the report screen and one to save the report to a file.The save report button should open a
JFileChooser where the user enters the path and file name for the report to be
saved.After the report has been saved a
message of the success or failure of the operation must be displayed to the
user.Closing the report should take the
user back to the report screen menu.
Closing the report screen should take the user back to the main screen.
Formatting report output
All reports must be correctly
formatted, numeric columns aligned to the right, text columns aligned to the
left, amounts correctly positioned and formatted.Data must NOT be truncated in the display,
and be in the correct order as requested.
Each report must also have a report heading.
The reports must be professional so
that you would feel comfortable to show it to the CEO of the organisation.
For output all names must be in
proper case.All currency fields must
have 2 decimal places (we assume we are using dollars as the currency).All fields in the reports must be left
aligned and numbers right aligned on both the reports and forms.
All reports must be displayed in a
window, with appropriate heading, and a button to allow saving the report to a
text file must be provided.
Data validation
Exception handling
You must use Exception handling as
specified in the course material and where appropriate.
Data entry and reading from file
Data entered by a user or data read
from a file must be appropriately and professionally validated at the business
layer not the GUI layer.This will
require you to pass reference variables across classes to access the business
layer instance methods for validation.
Error messages
You must provide error messages that
users can understand and clearly communicate the problem to them, as well as
providing guidelines to resolving these problems.Take note, that only a few problems can only
be resolved by contacting an IT help desk and that most others by the users
themselves.
Data Entry
JFrames
All windows must be classes that
inherit from JFrame.You must apply
appropriate layout managers to position your components.It is essential that you use at least one
JComboBox and at least one scrollable JList.
You must use labels, text fields, and buttons.For your communication with the user, such as
error messages you must use dialog boxes. Your design must be user friendly,
well balanced, and positioning of buttons must be consistent on all frames.
The main screen contains a number of
SWING buttons which will launch other screens.
As new screens are opened the launching screen will be inaccessible to
the user.
The business application should
consist of multiple sub screens (frames) which are to be opened and closed
appropriately. The main screen is to remain on the screen at all times.
Do not use JDialog instead of
JFrame. The functionality you require for this assignment is available in the
JFrame class.Refer to the Java documentation
and use the appropriate methods.
JDialog
Use dialog boxes only to communicate
with the user for specific purposes such as notification or confirmation, not
to create window for which you must use JFrame.
Starting the business application
As described in more details above,
when the business application is started the user must first be prompted to
select the appropriate file directory.
You must use JFileChooser for this purpose. This directory is then used
to read all the relevant files, where their content is stored in appropriate
collections in memory, as well as written back once the business application is
terminated.
The business application is then
going to display a main window which lists the options a user can choose
from.Each option item is represented by
a button, which you need to centre in the middle of the window.
It is important that the name of the
business application reflects the meaning of it.It is something that the user remembers to
run the business application, so it should not be called Main or Assignment2.
Also, you are requested to use only
one main () method for the whole business application as specified in the
course material.
While the business application is
running all data read from the files and entered through the data entry or
maintained will reside in memory in the relevant collections.Data files will not be updated until the
business application ends.
Terminating the business application
The only way the user can end the
business application is by clicking on the Window close button top right corner
of the window or selecting the “Close Application” action.When this occurs, all data currently stored
in the collections must be written to the relevant files. The files directories
details are recorded when the business application was opened and information
was read into the business application.
A message must be displayed to the user “Files have been
updated”. This is the only time that the business application will write
to the data files.
2. The program
specifications for your business application
Business background
You have been contracted to write a new business solution
for a small family business.The
business is a photographic studio that is still doing all of its processing by
hand. At the moment the business has a large backlog of manual processing of
unpaid purchases, and your new business solution will need to automate some of
this processing.However, given a small
time frame and lack of available funds, you are requested to create an application
that is flexible to allow future additions to the functionalities, but for now you
are only to focus on the needs outlined below.
The business solution must cater for data entry of customer
details.This would be name details,
address and contact details (phone number, email, etc.), customer id. The business owner currently has only two
staff members and is planning to employ more as soon as money has been recovered
from the backlog. You also need to cater
for the details of employees to be entered, using the same data entry screen
that is defaulting to cater for customers, but allows employees (and their
employee number, etc.) to be entered.
However, in your solution you need to work with objects of Customer
class type and Employee class type.
A second data entry screen is required so that the details
of the unpaid purchases can be entered also.
They need to be linked with a customer, so the first thing that the data
entry person will do is to select the correct customer, then the combination of
products need to be entered. You can link the customer and their purchase
through the use of customer id and order id.
A customer can have one or more photos in the following
combination of the options listed below.
The price for taking each photo (covering the service) is
$45 irrespective of the way it is formatted.
One printed photo will cost
|
Size |
Cost – no frame |
Cost –frame |
|
Small |
$20 |
$30 |
|
Medium |
$30 |
$45 |
|
Large |
$40 |
$60 |
Other format
|
Format |
Cost – medium |
Cost – processing |
|
USB drive |
$10 |
$10 |
|
DVD |
$5 |
$10 |
|
|
$0 |
$10 |
The business has adopted the rule that all postage will be
$10.00 for normal and $25.00 for express.
Any combination of the format (printed small/medium/large
with and without frame, and/or USB, DVD) can selected. If a customer picks up
the photos, then no postage will be charged.
While any combinations of the above are possible, two examples
are shown here:
Example 1,
|
One photo |
1 * $45 |
|
Emailed |
$10 |
|
Total |
$55 |
Example 2,
|
Three photos |
3 * $45 |
|
One photo, medium, |
$45 |
|
Three emailed |
$10 |
|
Normal Postage |
$10 |
|
Total |
$200 |
Once the customer data and their purchase details have been
entered into the application, the business owner will run the reports.The customer will either be contacted by
phone or email.
When customer payment is made, the accountant will run your
application and tick a flag to indicate that this customer has paid. So, that
if the relevant reports are run again, the customer no longer shows up.
Your solution will need to cater for the appropriate data entry
screens required for all of this.
All of this data needs to be stored on file. As you are
designing this solution fresh from the start, the business owner leaves it up
to your expertise to design the file(s) – as long as they are in text file format.This requires the files to be read into
memory when the photographer starts running your application. Writing to file
must only occur when the photographer closes the application.While the application is running all data
must stay in memory (using objects and collections).
You need to ensure that the GUI layer does not do any
processing at all, including validation. The GUI layer must use the Business
layer objects for any processing.Each
object of business layer should know what kind of data it has and how this data
should look like. Therefore each class definition will know how data should be
validated.This is useful when it comes
to validating the same data read from the file (it could be corrupted) or when the
same data is entered by the assistant.
Furthermore, the photographer would need to get some reports
from the system.You need to design the
solution so that these reports can be produced. You also need to consider that
in a future iteration more reports would be required, and write your solution
to enable this.
Reports
•Report on all
customers that have received their photos but have not yet paid. Sort the
output by outstanding amount so that the business can call these customers first
to recoup their costs. Provide the phone number and email so that a manual
process can allow follow up. You will also need to provide name details so that
the customer can be addressed professionally.
•Report on all
customers that received their photos by email only so that the business can
promote their printing and framing of photos for additional sales.This too will be followed up manually and the
name and phone number or email address will be required.
•Report on all
customers by year and month of purchase. Sort by total cost and show the format
so that the business can identify which combination is the most favourite. This
will then allow the business to provide some discounts for certain favourite
selections as well as stock up on raw materials.
3. Submission
requirements
This assessment item requires you to print all of your
assignment work, print a coversheet and sign it.Links on the course study desk will provide
you with information how to post your assignment.
•Print
all source code that was used to execute the business application.
Make sure first
to format your source code in NetBeans, right click in the code window to get
the floating menu, then select format. This will make sure that your code is
indented correctly as expected per marking criteria.
DO NOT copy any
source code into word as this will override the formatting.
Print
directly from the IDE, choose File from the menu then select print.Use Portrait as the page layout, as Landscape
uses up too many pages (Green IT/sustainability).
•Print
snapshots of the screens/windows showing
All
data entry screen(s), menu screen(s), report screen(s), messages (dialog boxes)
Use
“Prnt Scrn” key and grab only the relevant screen, not the desktop. Place them all
into a word document. Get two print screens per page to safe paper (Green IT/sustainability).
You can reduce a window before using “Prnt Scrn” which will then provide a
bigger version in the document and be more readable.
•Print
the contents of all text files showing
Contents
of text files before you run your application, making changes to the data as
your application runs, and then print the contents of the text files after you
closed the application.
•Print
the file contents of all saved reports outlined in the business application
specifications.
Important: if printouts are not provided it
is assumed that the business application does not work.
•Provide a list of bugs, features missing, problems
that you have encountered. Volunteering this information will be a good thing





