Answers.Body: <p>If you're looking for AP Computer Science A-level object stuff, <a href="https://www.greenfoot.org/door" rel="noreferrer">Greenfoot</a> is excellent.  It's an OO game-design environment created specifically for teaching about OO.  It's free (though there is a <a href="https://www.greenfoot.org/book/" rel="noreferrer">textbook</a> that can be quite helpful), and there is a large teacher community that regularly posts new labs and assignments.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T15:05:52.703Z
Answers.Text: Note that the greenfoot site has a very large inventory of projects.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T13:43:01.287Z
Answers.LastActivityDate: 2021-10-20T13:43:01.287Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>On <a href="https://theartofhpc.com/" rel="nofollow noreferrer">this page</a> 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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-30T20:25:45.367Z
Answers.LastActivityDate: 2022-05-10T11:58:13.417Z
Answers.LastEditDate: 2022-05-10T11:58:13.417Z
Answers.UserDisplayName: Victor Eijkhout
Answers.Body: <p>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 <em>exactly</em> 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.</p>
  <p>I've found text based games a poor way to do this, since the &quot;things&quot; that you define usually need different methods for their actions. Inheritance gives you very little in such a situation.</p>
  <p>Instead OO is best employed to implement <em>composition</em>, 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).</p>
  <p>So, the fundamental idea is &quot;Has a&quot;, not &quot;Is a&quot;. A complex object &quot;has&quot; parts.</p>
  <p>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 <em>composed</em> of these parts and each part is defined by a class. Lots of classes, few hierarchies, lots of object interactions.</p>
  <p>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 &quot;Fetch, Increment, Decode, Do&quot; cycle of a simple machine is easy to write and the operations implement methods for Decode and Do.</p>
  <p>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.</p>
  <p>This gives a lot of practice in writing classes to implement &quot;things&quot;, and doesn't fall in to the trap of wanting a &quot;subclass&quot; that is &quot;something like&quot; its superclass but not exactly and needs an extended interface that needs to be defined (and remembered) for each case.</p>
  <p>I find that the Strategy and Decorator <a href="https://en.wikipedia.org/wiki/Software_design_pattern" rel="noreferrer">design patterns</a> are really helpful in implementing the ideas above. In particular, one can build a complex program that has <a href="https://en.wikipedia.org/wiki/Cyclomatic_complexity" rel="noreferrer">cyclomatic complexity</a> = 1. The implication is that all of the complexity is in the interactions between objects</p>
  <hr />
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T14:47:39.250Z
Answers.Text: 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.
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T15:33:51.767Z
Answers.Text: @BenI., I really mourned the end of the AB course.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T15:50:05.803Z
Answers.Text: 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.
Answers.UserDisplayName: Solomon Slow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T15:56:07.683Z
Answers.Text: @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)).
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-21T11:46:50.930Z
Answers.Text: @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...)
Answers.UserDisplayName: Caius Jard
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-21T12:16:38.473Z
Answers.Text: @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.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-06T04:24:59.140Z
Answers.Text: @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.
Answers.UserDisplayName: Qiulang 邱朗
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-20T14:01:00.957Z
Answers.LastActivityDate: 2021-10-20T15:41:23.127Z
Answers.LastEditDate: 2021-10-20T15:41:23.127Z
Answers.UserDisplayName: Buffy
Body: <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-20T10:20:03.700Z
Comments.Text: 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)
Comments.UserDisplayName: Ben I.
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-20T11:10:54.330Z
Comments.Text: 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
Comments.UserDisplayName: User 19826
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-20T11:15:08.093Z
Comments.Text: [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.
Comments.UserDisplayName: Guy Coder
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-21T04:19:40.263Z
Comments.Text: Regarding **"_[you] need something with various stakeholders, different privileges, and [...]_"**: Are you basically saying you want a program that multiple users interact with?
Comments.UserDisplayName: Nat
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-21T05:17:35.027Z
Comments.Text: Consider implementing some simple scripting language (something [lua](https://lua.org/) like) in C++. See also [RefPerSys](http://refpersys.org/)
Comments.UserDisplayName: Basile Starynkevitch
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-21T17:58:09.817Z
Comments.Text: 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.
Comments.UserDisplayName: Ben Cottrell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-22T08:58:28.550Z
Comments.Text: _"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.
Comments.UserDisplayName: Flater
Tags: <object-oriented-paradigm><ap-computer-science-a><homework>
Title: Object Oriented Software Engineering Project
ThreadText: # Object Oriented Software Engineering Project
  
  (Asked by: username_0 on 2021-10-20)
  
  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.
  
  **Tags:** object-oriented-paradigm, ap-computer-science-a, homework
  
  > **Comments:**
  > **username_1**: 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)  
  > **username_0**: 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  
  > **username_2**: [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.  
  > **username_3**: Regarding **"_[you] need something with various stakeholders, different privileges, and [...]_"**: Are you basically saying you want a program that multiple users interact with?  
  > **username_4**: Consider implementing some simple scripting language (something [lua](https://lua.org/) like) in C++. See also [RefPerSys](http://refpersys.org/)  
  > **username_5**: 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.  
  > **username_6**: _"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.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_7 on 2021-10-20. Score: 10 | Accepted answer
  
  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](https://en.wikipedia.org/wiki/Software_design_pattern) are really helpful in implementing the ideas above. In particular, one can build a complex program that has [cyclomatic complexity](https://en.wikipedia.org/wiki/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.
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_7**: @BenI., I really mourned the end of the AB course.  
  > **username_9**: 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.  
  > **username_7**: @username_9, 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)).  
  > **username_10**: @username_7 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...)  
  > **username_7**: @username_10, 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.  
  > **username_11**: @username_7 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.  
  
  ---
  
  ### Answer by username_1 on 2021-10-20. Score: 5
  
  If you're looking for AP Computer Science A-level object stuff, [Greenfoot](https://www.greenfoot.org/door) is excellent. It's an OO game-design environment created specifically for teaching about OO. It's free (though there is a [textbook](https://www.greenfoot.org/book/) that can be quite helpful), and there is a large teacher community that regularly posts new labs and assignments.
  
  > **Comments:**
  > **username_7**: Note that the greenfoot site has a very large inventory of projects.  
  
  ---
  
  ### Answer by username_8 on 2021-12-30. Score: 2
  
  On [this page](https://theartofhpc.com/) 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.
  
  
  ---
  
  