top of page

Cookıng advısory system (c#)

Ekran görüntüsü 2021-10-12 205838.jpg

Development Platform

 

This project is developed on our personal computers. Therefore, properties vary. However a typical minimum may be specified as: 6 GB RAM 500GB HD Standard Graphics (May be onboard). Windows10 Operating system (64 bit), MS Visual studio 2019 with C# tools + .NET Framework 7.0). VS 2019 is an x86 32 bit application but some other utilities during development were 64 bit versions.
 

Visual Studio 2019 Community edition with C# tools were used for the project mainly due to VS’s being one of the most versatile IDEs for C# and freely available.

Software tools

 

uml class dıagrams

 

Ekran görüntüsü 2021-10-12 211457.jpg

All categories are created from the abstract class kitchen. All methods common to sub-classes are in class kitchen with presently only one override method to assign category. It is planned for future that more override methods specific to classes may added in future (e.g. calorie calculation). Also, each category is planned to have their own table of ingredients as selection from a table must be the final method. Due to lack of more than one window this is not implemented yet.

Ekran görüntüsü 2021-10-12 211736.jpg

The first stage of the project: the console test program has been completed with satisfying test results. A brief introduction to Windows form program is included in project folder (Only the exe file included) for demo purposes.

It has been observed that the csv files and the test program provide a useful basis for editing menu items and testing display methods in order to finalize them. The program also provided a good testbench for performance of c# and .Net development environment as well as giving feedback for method class structure development.

It is observed 2’nd stage of the project will have all ingredient names as selections from a list because entering via keyboard may create many names for the same ingredient. There will also be a need for new ingredient addition method. Furthermore, it is also found desirable to have a separate ingredient list for each category as this will produce smaller lists and ease selection.All of these can be solved with a GUI application with drop down list windows.

No administrator for the project group was assigned. All three of us had a shared task and a common management participation. For a team of up to 3 persons this seems to be a good formula and intended to be kept if future work was to be ordered for a team of same size.

The next stage of development must be the completion of the Windows form program GUI structure and database connection. After this point methods developed may be changed to suit the detailed needs of multiple window environment.

OBJECT- ORIENTED EVALUATION OF THE PROJECT

 

Composition, Aggregation: All recipes are defined in their respective category classes which all descend from the main abstract superclass Kitchen. Recipes are instantiated in 6 main categories as Pasta, MeatFish, OliveOil, Salad, Dessert and Soup. Since each instance of a subclass is a single entity and the superclass is an aggregation of MeatFish, OliveOil, Salad, Dessert and Soup Objects however, since this class is abstract abstract there will be no instantiation of aggregate.

Main program is a monitor utility for menu selections, editing and display. However, all menus are instantiated in a separate class InOut. All basic operations are carried out within this class on List items of separate category instances. Category selection is passed with parameters Isel (int) and CurrentC (string). Functions are activated through an instance of InOut class in the main method. InOut class uses Composition of category menu items in List Compositions. ( <Pastas>,< OliveOils>,< MeatFishs>,< Salads>, <Desserts>, <Soups>)

Inheritance: All basic methods for recipes other than category setters and getters are inherited from the Kitchen superclass.

Polymorphism: Polymorphism is frequently used for maximizing code reuse. There are 5 overloaded methods in the Kitchen Class for setting Recipe Name, Ingredients, Calories, Description, Cooking time. These dual methods provide numerical setting or keyboard entry variants for each attribute in a category. Keyboard input methods have void for parameters. A Set Recipe method using combination of all these serve both keyboard entry and display purposes in 4 various formats depending on a method parameter. The keyboard entry with exception handling in class InOut is for keyboard string input and overload with no parameters inputss integers with exception handling.

Abstract Classes and Interfaces: The main kitchen class is defined as abstract since this class is not instantiated and no need in the future was planned. No interfaces were used.

File Operations / Processing: All data for recipes are read from the disk as 6 csv files for each category. These are edited in the program as part of a list item and may be saved to disk as a whole list item for the category in main programs related menu. Loading from disk is also similar. Files are arranged and decoded as csv file with “,” separators. Which restricts the use of coma character. This may be easily dealt with by choosing a different separator character but this would necessitate resetting of Excel’s environment setting every time and not implemented for purpose of ease of editing menus outside the program.

GUI / Console: Program is intended as the first stage towards a Windows form application. A console application is set as the main scope for this project due to time limitation. However, a page design for demo purposes is also developed as a Windows Form design as shown in screen capture below (Figure 2):

.

Ekran görüntüsü 2021-10-12 211807.jpg
bottom of page