I am looking for a software engineering project idea (based on Object Oriented Programming) which does not include financial/accounting module, yet provides reasonable challenges in terms of research and modelling to undergraduate students. As this system needs to be implemented, it is preferable that web-based projects are not considered, as they require extensive coding challenges. The challenge is best to be in terms of OO design and requirements gathering.
-
2This isn't a lot to go on. Can you give a bit more about what would make for a good project? What are your learning goals for your students? (You must have something in mind or you wouldn't have precluded financial / accounting in particular) – Ben I. Oct 20 '21 at 10:20
-
Thanks for the reply. I precluded accounting package as it was used last term. It is ok if I consider the accounting package as an external entity, which communicates with my software, but not as the main functionality. I am looking for something. I need something with various stakeholders, different privileges, and software needs to have functionality beyond adding/removing customers and performing simple calculations – User 19826 Oct 20 '21 at 11:10
-
1[Text-based game](https://en.wikipedia.org/wiki/Text-based_game). My personal favorites are the adventure kind. I would make this an answer but it is only a link, so not really a fully fleshed answer. – Guy Coder Oct 20 '21 at 11:15
-
Regarding **"_[you] need something with various stakeholders, different privileges, and [...]_"**: Are you basically saying you want a program that multiple users interact with? – Nat Oct 21 '21 at 04:19
-
Consider implementing some simple scripting language (something [lua](https://lua.org/) like) in C++. See also [RefPerSys](http://refpersys.org/) – Basile Starynkevitch Oct 21 '21 at 05:17
-
A lot of universities use Processing for illustrating OO concepts. The nice thing about using Processing for education is how easily students can be challenged to use visual on-screen entities where you might naturally expect complex behaviour and complex variations in that behaviour (For example, different variations of object display, shape, composition, movements, transformations. Also variations in behaviour for collisions of those objects - e.g. simulating material properties, etc.). Keep in mind OO is fundamentally all about behaviour modelling and interactions between objects. – Ben Cottrell Oct 21 '21 at 17:58
-
1_"it is preferable that web-based projects are not considered, as they require extensive coding challenges"_ What coding challenges, specifically? Creating a basic webpage (not pretty) is about as complex as creating a WPF form. While console applications are easier for basic input and output, they actually have a reasonably high threshold for any menu/UI driven interaction that is more than just "string in, string out". In all mentioned cases, most of the UI interaction can be prepared for by the course instructor, leaving students to fill in the business logic more so than the actual UI. – Flater Oct 22 '21 at 08:58
3 Answers
Let me first make a suggestion. First, understand, yourself, what OO really means at a deep level. It is not, fundamentally, about inheritance, and when inheritance is employed it should be done so that all subclasses of a given class have exactly the same interface with no additional public methods. To break this rule introduces entropy into the program, meaning that a programmer needs to understand the specifics of each class to employ it correctly.
I've found text based games a poor way to do this, since the "things" that you define usually need different methods for their actions. Inheritance gives you very little in such a situation.
Instead OO is best employed to implement composition, in which a complex object is composed from different parts and the parts themselves may be simpler (or a further decomposition needed). But, in a situation like this, the parts can be defined by interfaces and the class hierarchies are very short (usually just 1).
So, the fundamental idea is "Has a", not "Is a". A complex object "has" parts.
A calculator is a good choice of project, since it has Keys, one or more Displays and some internal Operations that make it work. A Calculator is composed of these parts and each part is defined by a class. Lots of classes, few hierarchies, lots of object interactions.
Another one, if your students can handle it is actually a simulator for a simple computer. In particular, each operation of the simulator can be defined by a class, and all of the classes have exactly the same interface. The "Fetch, Increment, Decode, Do" cycle of a simple machine is easy to write and the operations implement methods for Decode and Do.
But any complex item that can be decomposed into parts can serve as the basis of a project. The overall item's class has fields that are objects (not primitives) and the objects are defined by classes tailored to the operation of that part of the whole.
This gives a lot of practice in writing classes to implement "things", and doesn't fall in to the trap of wanting a "subclass" that is "something like" its superclass but not exactly and needs an extended interface that needs to be defined (and remembered) for each case.
I find that the Strategy and Decorator design patterns are really helpful in implementing the ideas above. In particular, one can build a complex program that has cyclomatic complexity = 1. The implication is that all of the complexity is in the interactions between objects
If this is for high school use, then simulating a simple computer is an excellent choice (IMO), since it dispels some of the mystery of computation. Once the simple computer is built, one can also write a compiler for a simple higher level language that compiles to instructions for the simple computer. This can be as simple or as complex as you like, but a recursive descent compiler is simple and emphasizes the importance of recursion, which is another goal of courses for novices.

- 35,808
- 10
- 62
- 115
-
2This is an incredibly good answer. One caveat, however: a recursive descent compiler would be far beyond AP Computer Science A, for which you don't even need to be able to write a recursive method. – Ben I. Oct 20 '21 at 14:47
-
-
1I would add one note, for the benefit of students who are forced to learn C++. We can effectively declare an interface in that language by declaring a pure virtual (i.e., abstract) class, and we can effectively implement the interface by inheriting from the pure virtual class, but the "inheritance" in that case is not the same as the inheritance that you would discourage your students from using. – Solomon Slow Oct 20 '21 at 15:50
-
1@SolomonSlow, I don't discourage inheritance. What I discourage is new public methods in sub classes. A superclass can provide part of an implementation of a new class and the implementation of an existing public method can be changed, but keep the list of public methods (the interface, whether named that in the language or not) the same as you go down any hierarchy. Among other things this avoids casting (which is a [code smell](https://en.wikipedia.org/wiki/Code_smell)). – Buffy Oct 20 '21 at 15:56
-
@Buffy whaat - you write all your programs using only methods you inherited from Object (or whatever your chosen language calls its mother of all objects..)? That's some trick.. (I know what you mean, but how it reads...) – Caius Jard Oct 21 '21 at 11:46
-
1@CaiusJard, I note that library developers often break these rules - especially for graphics and such. But imagine what a large and complex program would be like if every object reference were declared "Object" and every message required a cast. If you obey the rules your programs become much more coherent with lessened chance of errors. You can also, of course, write nested if statements 30 or so levels deep, but then try to find the bug. – Buffy Oct 21 '21 at 12:16
-
@Buffy you gave a similar answer to my question https://cseducators.stackexchange.com/questions/6709/some-real-practical-example-to-teach-object-oriented-concepts-and-programming-i I just updated my question and I will argue that to make calculator a good project to practice OO, it may need some design for the project. – Qiulang 邱朗 Jan 06 '22 at 04:24
If you're looking for AP Computer Science A-level object stuff, Greenfoot is excellent. It's an OO game-design environment created specifically for teaching about OO. It's free (though there is a textbook that can be quite helpful), and there is a large teacher community that regularly posts new labs and assignments.

- 32,726
- 11
- 68
- 151
On this page are three textbooks. You want the 3rd one: C++/Fortran. It has a section with programming projects. These should be doable (in any OO language) after 1 or 2 semesters of programming, and should take students definitely 1 or 2 weeks of work.

- 1,423
- 5
- 13