Highlights
Objectives:
Practice java programming with classes and objects, constructors, copy constructors, enum type, array, ArrayList (generic version), overloaded methods, passing by reference and etc.
Task
In mathematics, a set is a collection of distinct elements and elements in a set are not in order. Here are some examples of sets:
(a) A set of integers, e.g. integerSet = {3, 1, 4, 2}
(b) A set of fruits, e.g. fruitSet = {apple, orange, papaya}
(c) A set of characters, e.g. charSet = {‘A’, ‘m’, ‘&’}
We always enclose elements of sets inside a pair of { }.
Here are some other properties on sets:
(1) A set can be empty, i.e. no element. We call it empty set. In mathematics, we have a special symbol to denote empty set. Convenient to our design later, we will use { } to denote an empty set.
(2) When checking an element is inside a set. We call it “belong to”.
(3) If a set contains in another set, we call it subset. For example, {1, 2, 3} is a subset of {2, 3, 4, 6, 1}. Therefore empty set is a subset of every set.
(4) The cardinal number of a set is the number of elements in a set.
(5) The union of two sets A and B are all the elements belong to A and B, minus the duplications. For example, if A = {1, 2, 3} and B = {2, 3, 4, 5}, the union is {1, 2, 3, 4, 5}.
(6) The intersection of two sets A and B are the common elements of A and B. Using the example quoted in (5), the intersection is {2, 3}.
(7) The equality of two sets A and B are all the elements of A are in B and all the elements of B are in A. Or alternatively, A is the subset of B and vice versa.
(8) The difference of two sets A and B, for example A – B, is those elements in B should not be in A. For example, if A = {1, 2, 3} and B = {2, 3, 4, 5}, A – B = {1} and B – A = {4, 5}.
We have all the required properties for our task.
In this assignment, our universal set is the 12 enumeration constants of calendar months. They are
Jan, Feb, Mar, …, Dec
Data validation is not necessary in this design, when “I” want to add in a month, you can assume that this is a valid month in the enumeration constants; i.e. we have restricted ourselves in a subset of the above 12 months.
The best way to test your design is to develop an educational system to teach some basic set theory. All the sets used in your design should be randomly generated by the system i.e. the sizes (also known as cardinal number, from 0 to 12 elements) and the elements.
This Computer Science Assignment has been solved by our Computer Science Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.