Help me with an idea | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Help me with an idea

Hello! Please help me with an idea for my homework! This is what my teacher asked for: I have to implement a collection of classes where I need to use is-a and has-a relationships. I have to also use virtualization too that has to be tested in main. One class has to contain minimum one vector of pointers to objects from the main class to emphasize the virtualization. I think I can handle the rest, but I need at least an idea for this. Thank you in advance!

10th Jan 2020, 11:12 PM
Ana-Maria
Ana-Maria  - avatar
2 Answers
+ 2
Let me just shamelessly steal from elsewhere: 1. Based on these two challenges, you could either implement the terminal or the assistent and model the command system OOP-based, i.e. you have a base command class that you can derive various different commands from that send differing instructions to it: https://www.sololearn.com/learn/9603/?ref=app https://www.sololearn.com/learn/14671/?ref=app 2. You could implement this challenge: https://www.sololearn.com/learn/15057/?ref=app With a lot of potential for different kinds of rovers, different kinds of rocks, and different kinds of commands, all of which can be implemented through class hierarchies. You could also build the rover from various smaller parts like wheels, instruments, the rock container, idk, a lot is possible. 3. Some kind of hero battler with different classes, different monsters, which all have attributes like strength etc, combined with a small inventory system. Could even be turned into a small text adventure game. ...
11th Jan 2020, 1:23 AM
Shadow
Shadow - avatar
+ 1
4. Model an ice cream machine. Ice cream consists of a cone, scoops, sprinkles, and possibly more, all of which have different sub-groups, e.g. different flavours. The machine could create one based on what the user wants, and also keep track of the price, or if something needs to be refilled, and so on. 5. Perhaps a filter system for some kind of collection, e.g. a movie base, or a card collection, or whatever, where the filters are modelled through classes, and you have different filters based on what the user is looking for. That's it for now. Not sure if any of those are helpful to you. I'm sure you can also get creative and further improve an idea in case one sparked your interest. Also looking forward to what others might have in store.
11th Jan 2020, 1:28 AM
Shadow
Shadow - avatar