Advanced Programming Techniques
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
COSC1076
Advanced Programming Techniques
Assignment 2 Vending Machine
Assessment Type: Both group and individual assessments.
Weight: 40% of the final course mark
Due Date: 23:59, Friday 26 May 2023 (Note that there is also a group demonstration due in Week 10)
Silence Policy: From 5:00pm, Thursday 25 May 2023 (Week 12)
Submission: Online via Canvas. Submission instructions are provided on Canvas.
1 Introduction
1.1 Overview
In this assignment, you will use your C++ programming skills to create a front-end system for a vending
machine. The vending machine serves all kinds of pastry treats. The company’s name is Penelope’s Pastry
Delights and as such, the executable you are creating will be called “ppd”.
The following sections contain the details of this assignment. You are expected to understand every requirement
explained in this document and implement all of them accordingly. This assignment has a strong emphasis on
linked lists. You should get yourself familiar with this concept as soon as possible.
In this assignment you will:
• Practice the programming skills covered throughout this course, such as:
– ADTs
– Linked Lists
– Pointers
– Dynamic Memory Management
– File Processing
– Program State Management
– Exception Handling
• Practice the use of testing
• Implement a medium size C++ program:
– Use features of C++14
– Use elements of the C++ STL
• Work as a team
– Use group collaboration tools
This assignment is divided into four Milestones:
• Milestone 1 (Group work): Test Cases, to be developed to ensure your ppd program implementation is
correct (due week 10).
1
• Milestone 2 (Group work): A fully functioning implementation of the base ppd program, which pass
Milestone 1 tests. The group work (milestone 1 & 2) is worth 25% of the course mark. Your group is
required to demonstrate REQ5, 6, 8 and 9 in week 10 lab session (due week 10).
• Milestone 3 (Individual work): You will individually extend upon your group’s implementation with
additional functionality (called enhancements). The individual work is worth 15% of the course mark
(due week 12).
• Milestone 4 (Group + Individual work): Written report (no more than 4 pages) analysing the design and
implementation of your software, and the use of your test cases. You will demonstrate your group and
individual work. This is where your final work will be graded (due week 12).
Group Progress Update (Group work): Your group will need to provide regular updates on your progress
in this assignment to your tutor during your weekly lab classes. This will require your group to have completed
a list of activities. Group Progress Update will not be marked directly, however, this will influence the final
grade.
1.2 Group Work
The group work must be completed in groups of 4.
• You may form groups with any student in the course.
• We strongly recommend that you form groups from within your labs, because:
– Your tutor will help you form groups, but only within your lab.
– You will have plenty of opportunity to discuss your groups progress and get help from your tutor
during the rest of the course. It will be extremely helpful for your whole group to be present, but
this can’t happen if you have group members outside the lab.
– If you form a group with students from multiple practicals, you will still need to be allocated to a
single tutor and we may need you to switch labs to ensure everyone gets a fair amount of time.
Groups for Assignment 2 must be registered with your tutor by week 8 lab. Your tutor will “register”
your group on Canvas. If you are unable to find a group, discuss this with your tutor as soon as possible.
If at any point you have problems working with your group, inform your tutor immediately, so that issues may
be resolved. We will do our best to help manage group issues, so that everybody receives a fair grade for their
contributions. To help with managing your group work we will be requiring your group to use particular tools.
These are detailed in Section 5.
There are important requirements about keeping your tutor informed if you have been unwell or other wise
unable to contribute to your group. Remember your actions affect everybody in your group.
1.3 Learning Outcomes
This assessment relates to all of the learning outcomes of the course which are:
• Analyse and Solve computing problems; Design and Develop suitable algorithmic solutions using software
concepts and skills both (a) introduced in this course, and (b) taught in pre-requisite courses; Implement
and Code the algorithmic solutions in the C++ programming language.
• Discuss and Analyse software design and development strategies; Make and Justify choices in software
design and development; Explore underpinning concepts as related to both theoretical and practical
applications of software design and development using advanced programming techniques.
• Discuss, Analyse, and Use appropriate strategies to develop error-free software including static code anal-
ysis, modern debugging skills and practices, and C++ debugging tools.
• Implement small to medium software programs of varying complexity; Demonstrate and Adhere to good
programming style, and modern standards and practices; Appropriately Use typical features of the C++
language include basic language constructs, abstract data types, encapsulation and polymorphism, dy-
namic memory management, dynamic data structures, file management, and managing large projects
containing multiple source files; Adhere to the C++14 ISO language features.
• Demonstrate and Adhere to the standards and practice of Professionalism and Ethics, such as described
in the ACS Core Body of Knowledge (CBOK) for ICT Professionals.
2
2 Description of the Program and Functionalities
You have been approached by a company to create a front-end system for a vending machine written in C++.
The vending machine serves all kinds of pastry treats. The company’s name is Penelope’s Pastry Delights
and as such, the executable you are creating will be called “ppd”. In this assignment you are to implement an
application that will perform the above tasks as a single user model.
This section describes in detail all functional requirements of this assignment. You should make a conscientious
effort to write your program in a way that is capable of replicating the functionalities of the ppd program,
described in the requirements below.
REQ1: Command-line arguments
A user of your program must be able to execute it by passing in the names of two data files that the system is
to use. You need to check that exactly 3 command line arguments are entered. Your program will be run using
these command line arguments:
Your program needs to be populated with the data provided in the 2 data files whose names are conveyed
via the command line. You will need to tokenize this data in order to load it into the system. You may use
the class definitions provided in the startup code to store your system data. As part of this requirement you
need to ensure that the specified files are valid (that is, they exist and the data contained in them matches the
specification for this assignment). You need to abort the program and provide a suitable error message if this
is not the case.