Assignments‎ > ‎

EE402 Assignment 1 2019/20

posted 8 Oct 2018, 01:34 by Derek Molloy   [ updated 9 Oct 2019, 12:08 ]

Hi all,


Your first assignment in 2019/20 is to write a section of code that demonstrates the following aspects of OOP in C++:

  1. Correct use of all access specifiers (public, private, protected) in an appropriate way.
  2. Over-loading using either methods or constructors.
  3. Abstract classes with a method that is required in all derived classes.
  4. Operations on pointers to an object.
  5. Over-riding of a method of an abstract class.
  6. An example of multiple inheritance (it does not have to make perfect sense).
  7. Separate compilation with all classes in your assignment (i.e., all classes should have .cpp and .h files).
  8. An example of an object passing itself to a function (not part of a class), which modifies that object.
  9. A class with a modified copy constructor and demonstrate the effect of this on pass-by-value and pass-by-reference calls.
  10. A working destructor with some basic functionality on one of your classes. Demonstrate it working in your main() function.
  11. Correct use of three over-loaded operators (e.g., +, = and ==) for one of your classes.
  12. Use of all four C++ explicit style casts. 
  13. Use of dynamic binding with virtual & non-virtual methods. Demonstrate the impact.
  14. Correct use of new and delete for the allocation of an object/objects, with operations on the object using pointers. (Can be combined with other points)
  15. Static states of a class and an example usage. Demonstrate the impact.
  16. Demonstrates the difference between a C++ class and a C++ struct.
  17. Passing an object to a method by constant reference. Demonstrate the impact.
  18. Write a straightforward example class template.
  19. Use of the vector container to contain a number of objects of one of your classes.
  20. Use of an algorithm on your container.

There are 20 points to address and there is 10% available for the assignment, so 0.5% per point is the outline marking scheme. If you address 14 out of 20 points clearly and correctly then you should receive 7/10 (or 70% on Loop).

Please note, I would recommend that you hard code the input of data, i.e., don't set up a menu system and do not read values in from the user using cin. It is not necessary for this assignment and would lengthen the amount of work involved considerably.

As for the topic; that is up to you, but please keep it simple. If one of the points does not fit into your application, just add it anyway for demonstration, i.e., the application does not have to make perfect practical sense. The rules are that:

  • You CANNOT use bank accounts, personnel/university structures, vehicles/cars, geometric shapes or animals/plant/fish/insect classifications as the application examples. This is because they are the standard examples used in my notes and in books on C++.
  • You must use a single topic for all of the points. You CANNOT write an individual code project for each point.


There should be a brief introduction at the start of your report that explains your application idea and LISTS CLEARLY one numbered paragraph for each of the points listed above (in the same order as numbered) and explains where in your code they have been implemented. In your code comment the sections where you show the points abovedetailing the point that you have addressed. This is for the sole purpose of making it easier for the tutor to correct -- but without this your assignment will not be marked.

Submit your assignment electronically as a SINGLE Google Docs generated document (not live link share!), Word Document, raw text document or PDF. This document should *only* have the following text sections: 

  • Title and Student name, e-mail address, id and programme details etc.
  • Introduction - to briefly introduce your application and program structure.
  • Implementation - one numbered paragraph for each of the points ordered as above, which points to the location in the code where the point has been implemented – e.g. Point 6 – the class Account is an abstract class because it is missing the display() method implementation and this has been provided in the child CurrentAccount class.
  • Source Code - Properly Formatted and Spaced Code. The code should be pasted into the text document. Each file can be pasted in one after the other with its name listed at the top. The code should have comments referring back to the 20 numbered paragraphs.
You should *not* submit a working executable or compilable source code. This assignment should give you some practical experience for the end of semester exam, so I am looking on it as a study aid.


Due for Monday the 4th of November 2019 by midnight.

You should submit the assignments via Moodle at the address:

Once again, use the main discussion forum here: if you have any questions on the assignment. Do not paste your code! Paste in a similar example if you need to clarify a point. If you know the answer to someone else's question please feel free to respond.

One final important issue - Please note that by the electronic submission of your first assignment I am assuming that you are familiar with the academic rules for assignments. The assignment should be 100% your own work. If any unreferenced work is used from any other source (including colleagues, the Internet or past students) it will be a serious matter and referable to the disciplinary board. Please note that all assignment work can be the subject of an interview process. See:

All assignments for this module will be uploaded to plagiarism detection software where the content will be analysed and compared to other assignment from this year and previous years. I take this matter very seriously as a few years ago several students were referred to the disciplinary committee resulting from plagiarism in this module – In one case a student was expelled from the University due to the severity of the plagiarism and the fact that at fourth/fifth year level, he should have known better.

If after you receive your mark you are concerned that there is an error with the correction, please contact the module tutor that corrected your assignment. If the tutor checks it and if you are still unhappy please contact me directly and I will discuss the issue with you and the tutor directly.

If I have failed to address any aspect of this assignment then please post to the forum.