4
$\begingroup$

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.

$\endgroup$
7
  • 2
    $\begingroup$ This 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) $\endgroup$
    – Ben I.
    Oct 20, 2021 at 10:20
  • $\begingroup$ 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 $\endgroup$
    – User 19826
    Oct 20, 2021 at 11:10
  • 1
    $\begingroup$ 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. $\endgroup$
    – Guy Coder
    Oct 20, 2021 at 11:15
  • $\begingroup$ Regarding "[you] need something with various stakeholders, different privileges, and [...]": Are you basically saying you want a program that multiple users interact with? $\endgroup$
    – Nat
    Oct 21, 2021 at 4:19
  • 1
    $\begingroup$ "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. $\endgroup$
    – Flater
    Oct 22, 2021 at 8:58

3 Answers 3

10
$\begingroup$

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.

$\endgroup$
7
  • 2
    $\begingroup$ This 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. $\endgroup$
    – Ben I.
    Oct 20, 2021 at 14:47
  • $\begingroup$ @BenI., I really mourned the end of the AB course. $\endgroup$
    – Buffy
    Oct 20, 2021 at 15:33
  • 1
    $\begingroup$ I 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. $\endgroup$ Oct 20, 2021 at 15:50
  • 1
    $\begingroup$ @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). $\endgroup$
    – Buffy
    Oct 20, 2021 at 15:56
  • 1
    $\begingroup$ @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. $\endgroup$
    – Buffy
    Oct 21, 2021 at 12:16
5
$\begingroup$

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.

$\endgroup$
1
  • 1
    $\begingroup$ Note that the greenfoot site has a very large inventory of projects. $\endgroup$
    – Buffy
    Oct 20, 2021 at 15:05
2
$\begingroup$

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.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.