Alice and Bob are small business owners who run a Café at Halls Gap in rural Victoria. They are experiencing an increase of customers over the past year or so – mostly international. They would like to improve the way that they handle transactions and to have more flexibility in offering different transactions. Up till now, they did not track individual payments, merely adding the total amount at the end of the day to determine their total sales. Now, Alice and Bob wants to offer credit card payment options (both Pay Wave and PIN), to allow for spontaneous purchases where potential customers may not have cash on hand. Due to the low profit margins on the products and the bank fees charged for the processing of card payments, a 1.5% surcharge on all MasterCard, and Visa card payments is required to keep the business profitable; Amex cards require 3%. With different methods for payment now available, Alice and Bob want an automated method to track both total sales amounts and the total of the card surcharges collected so that this is more streamlined and less time-consuming to manage.
They would also like to be able to add Bitcoin payments in the near future.
You have agreed to design and develop a small Java console program for them, enabling them to select either a cash or card payment and enter the total amount of the sale. For cash payments, no additional charges are required. For card payments, the program will calculate the appropriate surcharge and display the updated total of the sale so that they may enter this directly into the card payment system.
Once the sales have been completed, the program will provide options to enter another sale (cash or card), or to display the current payments received. These payments should be broken down into cash sales, card sales, card surcharges and total product sales (cash sales plus card sales, not including card surcharges). There is no need for this data to persist once the program has stopped running.
They want the system to be flexible so that they can include additional functionality at a later date without having to have the entire program rewritten. This means you will need to use an interface for processing payments, and polymorphism for the various payment classes, so that new, different payment types may be added at a later date with minimal updates to the code. They asked that you provide them with some documentation before you commence coding, so that they are able to verify that the program you intend to code will address their requirements. They would like to see a Use Case diagram and Use Cases to summarize the requirements in written format, as well as Class and sequence diagrams.
You are required to submit the assignment before the due date consisting of:
• A Zip file containing the following
o A written report1 comprising:
- Use Cases summarizing the requirements
- UML Diagrams, created in Enterprise Architect, comprising:
• a Use Case Diagram for processing a purchase
• a Class Diagram of the intended system
• a Sequence Diagram for processing a credit card purchase.
- A short reflection (approximately 200-300 words) discussing the importance of requirements design and analysis, UML diagrams and object-oriented programming with interfaces and polymorphism. As an example, if you found that you changed your initial UML diagrams after you had commenced coding, you should explain what these changes were and explain what you learnt that led to these changes.
o Enterprise Architect file(s) containing your UML Diagrams for the Use Case, Class and Sequence Diagrams
o Your finished Java program, addressing the requirements outlined in the assignment details.
o You must supply your program source code files and your documentation as a single zip file named as follows:
Supply your word-processed documentation in either Microsoft Word or LibreOffice/OpenOffice formats only – no proprietary Mac-specific formats, please.
Assignments will be marked on the basis of fulfillment of the requirements and the quality of the work.
In addition to the marking criteria, marks may be deducted for failure to comply with the assignment requirements, including (but not limited to):
• Incomplete implementation(s)
• Incomplete submissions (e.g. missing files)
• Poor spelling and grammar