Hi all! First of all I apologize if I am on a wrong forum but I am using this forum first time.
I am new to this field and I have a big problem. I take a class for pseudocode and I have an assignment to create a program that will manage a recipe collection. The last 7 weeks we were working with modular processing and the last week we learned a little bit about object-oriented programs. I still do not have feedback from the professor for that OOP assignment and I am not even sure if I got it right. Meanwhile I have to create this program and make a combination of both oop and modular procesingg. Based on my knowledge till now I started creating a modular processing but I always get stuck when I think about how to include OOP too.
So, I have a Recipe Collection that contains recipes which belong to 8 different categories(appetizers, soups, salads, main dishes, side dishes, deserts, beverages, uncategorized). The actions included in this program would be Add new recipe, Find a recipe, Remove a recipe, and maybe List all recipes. I have so many ideas how to do this and I end up confused. Please I need guidance how to start. Should I create classes and subclasses first or should I use arrays and sequential files? Please help as soon as possible. Thank you!
This is called "functional decompisition" - breaking the problem down into understandable chunks. Using pseudo-code is good for this. The approach to solving this problem in particular can be functional, or class-oriented. First, think about the problem domain, and then determine which approach fits best. FWIW, sometimes it is a combination of both! :-) In my 30+ years of software engineering experience, I still find that most problems are best solved with a combination approach.
Thanks for your response but the most confusing part for me is the combination. Obviously the requirement I must create both OOp and modular processing but I do not know how to connect those two things. I was thinking to create the modlues as usually and then create the classes and subclasses with their attributes and methods. Still I do not know how to connect them in one single program. This is all due to the small amount of time dedicated to learning OOP. I guess this is the biggest disadvantage of this course I take. I do not think that anyone can learn OOP just with reading one single lesson on 15 pages. And I still do not have the feedback from my instructor about the OOP assignment which means I am not sure if I know that too. I got all A till now and it is a shame to blew it up now at the end just because I have aweful instructor who does not help me at all. I feel desparate....:(
You have not operations to handle persistence through class, so I would modularize out the persistence and user interface and use OOP as 'type definitions for recipe objects' to use as any normal type in program.
Hi guys! I just want to let you know that I got the grade for my final project and it is 100% A!!!!
I am so happy! I created a pseudocode for modular processing (as normal), a flowchart and hierarchy chart, a GUI, test cases and OOP where I actually defined the recipe objects and its attributes. I was actually worried for nothing. However thanks for your replies.