Advanced Programming Assessment Brief - Smart Home System - 2024-5
Advanced Programming Assessment Brief - Smart Home System - 2024-5
Submission date/time: Blackboard submission: Yes Format: Single ZIP file containing C/C++
19th December 2024 / 3pm Turnitin submission: No Visual Studio 2022 project
Planned feedback date: Mode of feedback: Rubic and written
23rd January 2025
In this assessment are Inclusivity and accessability Not applicable
students asked to consider: Sustainability Not applicable
Describe, identify and apply good-practice object-oriented principles and concepts in a modern programming
language, such as C++, to implement object-oriented designs and encapsulate functionality associated with
classic computer science algorithms and data-structures
Identify and apply appropriate facilities provided in standard libraries and design patterns in the development
of an application, including event-based and reactive programming.
Identify and apply memory management principles and demonstrate the impact of resource allocation within
a program
Assessment Brief
The purpose of this assessment is for you to demonstrate and apply your learning from all aspects and topics
covered in the module; the more you demonstrate your knowledge from the module, the higher your grade will be,
and if you continue to demonstrate relevant knowledge beyond the materials covered, your grade will continue to
rise.
1
This will depend on your level of skill, experience, knowledge, and engagement in the module.
2
This would turn the heating on for just 1 hour
All devices should also have a user-editable device name that is unique across your system (case insensitive). Your
system needs to be able to handle zero or more of any of the above devices, in any combination, and unlimited in
number.
While you aren’t expected to interact with actual hardware smart devices (in fact, don’t do this even if you know
how), your application needs to demonstrate interactivity with the device features. For example, your application
knows the state of a light and when you interact with the on/off feature, it changes that state.
All devices should have a “Quick View” that shows at-a-glance relevant information and either no or a single “one-
click” action. For example, a Light might show the following based on its state:
A Temperature & Humidity Sensor might look like the following3 (note, the intended absence of a “one-click” action
as there isn’t one associated with this type of device):
To activate the “one click” action, you should just type the device name into your user prompt. It is up to you
whether you show that device again to demonstrate the state change or reshow the entire list of devices.
When you list all devices in your Smart Home System, you should show the Quick View for each device.
When your application starts, you need to load your collection of smart devices from a single file into objects in
memory that represent them. When your application ends, you should write that in-memory representation back to
a single file. While the programming is running, all operations must be done to the in-memory data and no disk/file
operations should be made until the program ends, at which point you will persist the data by writing it back to your
single file.
From the main user prompt, you need to offer sorting the devices by name, or by device type and then name. You
also need to be able to add a new device and select a particular device to interact with its full feature set. You will
be using a command-line interface to interact with your Smart Home System, and suggest the following menu
system that is shown at the end of the device list:
You should present a similar and relevant menu system to the user upon selecting to interact with a device’s full
feature set (option 4 in the above example menu system). That sub-menu also needs to give the user the option to
delete that device / itself.
You should make your application as robust as possible against user input.
3
It is up to you to determine how to generate live and historic sensor data, but it must not be hard coded but stored in memory
and read and written to file as part of the application launch and terminate file operations
General Coding Tips and Comments
Look over the topics we have covered in this module and think about how to demonstrate them in a
meaningful way through this coursework. The more you demonstrate back to us, the better your mark.
Remember to use appropriate data types for variables, objects, and full encapsulation principles
Sensibly clean up dynamic memory as soon as it is no longer needed
Write good object-oriented code where algorithms that operate on data are put into the same class and
data members have as restrictive access as possible. A poor design is one where you have a class of data and
just get and set methods and the operations on those bits of data are done outside of the class
You are expected to extract an inheritance-based class structure from this brief, which you can apply
polymorphic operations
Use runtime type operators to help identify the subtype of an object in a collection of supertypes
Try and sensibly use more advanced aspects of C/C++ such as function pointers and smart pointers, although
don’t neglect the basics
Think about your code, use appropriate C/C++ constructs, and keep the implementation as simple as it
allows – code that is unnecessarily complex is harder to maintain, debug, and likely inefficient
Submission
Your assignment should be submitted electronically through the module Blackboard site as a single ZIP file that
contains your project and source code files (without version control, build or intellisense4 files).
Your last on-time attempt will be viewed and graded (as per university regulations).
The project submission must be in the form of a C/C++ Visual Studio 2022 project within the compressed ZIP file
and contain all files that allow the project to be opened, built, and run on a campus computer. Make sure that you
upload the correct files by checking what you have submitted by downloading it again from Blackboard and
opening the project from the unzip of the submission - mistakes discovered after the deadline cannot be corrected;
it is your responsibility to ensure that you submit the correct files by the deadline. You may be asked to provide a
walkthrough of your code during which you will need to discuss all aspects of the work you submitted before a grade
is awarded.
Assessment Criteria
The assessment for this task will be based on your ability to demonstrate what you have learnt in the module against
the implementation of this case study. If you submit a production-ready application but fail to demonstrate the
concepts learning covered in the module, you will get a poor grade but conversely, if you show a solid understanding
of the module learning through your code with only a partial solution, you will still be rewarded with a suitable
grade.
You will receive an overall grade for your work against that demonstration of module learning/teaching, that
corresponds to the grade characteristics provided in the Level 5 University Grade Descriptor at the end of this
document.
The areas of competencies that you should pay particular attention to include:
Sensible code separation (use of class and functions), encapsulation, inheritance, and data validation
Use of OO in C++ including, polymorphism, runtime type operators, operator overloading and general
language usage (and all other topics we cover in the module)
Use of Standard Template Library
Dynamic memory management and ownership without memory leaks
4
The intellisense files get large and stored in the hidden .vs folder in the root of the project folder – you can safely delete the .vs
folder with the project closed as that folder is recreated by visual studio when the project is opened next
Clean concise code, good use of comments, spacing, constants, source files, naming and labelling and code
structure without unnecessary repetition
Avoiding Plagiarism
Looking for snippets of code on the internet and searching for materials that will help solve parts of a problem is part
of software development. If you do this, you must add a comment in your code stating:
the URL for snippets of code that have heavily influenced your solution and
a short summary of what you have taken / learnt to demonstrate you understand
You should not directly copy from the internet (or elsewhere), even once referenced; make the code your own.
There is no need to reference core learning that you apply to this task – for example, if you have learnt how to use
lambda expression and applied it here, that is fine.
This assessment is about you demonstrating your knowledge and understanding when it comes to programming and
not the internet’s, your friend’s, or Discord’s. If you try to pass off work as your own that isn’t, then an academic
conduct meeting will be arranged, and you’ll likely get zero marks. A second offense can lead to withdrawal from the
course, so please ask if you’re unsure.
Contract cheating/concerns over authorship: This form of misconduct involves another person (or artificial
intelligence) creating the assignment which you then submit as your own. Examples of this sort of misconduct
include: buying an assignment from an ‘essay mill’/professional writer; submitting an assignment which you have
downloaded from a file-sharing site; acquiring an essay from another student or family member and submitting it as
your own; attempting to pass off work created by artificial intelligence as your own. These activities show a clear
intention to deceive the marker and are treated as misconduct.
Zero Zero 0-5 0 Work not submitted, work of no merit, penalty in some misconduct cases.