Starting from:

$50

CS202-Assignment 4 and 5 Food Planning Solved

With both programs you will be implementing your solutions using Java. Your goal must be to develop an object-oriented solution but this time implement it in Java. Make sure that your OO Design is not centered around your data structures – your data structures support the design but shouldn’t be the primary emphasis of your design. You may use Eclipse or IntelliJ to develop your software. Your Java programs must follow these rules:

 

• No public or friendly fields (data members)  *** NONE!!!*** • No friendly methods (member functions)
•        Yes, you SHOULD use the string class!

•        Limit your use of static methods – these should be restricted to just utility functions and main

•        Use an inheritance hierarchy using “extends”; there must be a minimum of 5 classes with 3 of them in a hierarchy. These should not be isolated to just your data structures.

•        The application that USES the hierarchy must be in a class on its own. Or, it could be part of a hierarchy, so think about that.

•        Create at least one abstract base class

•        Implement at least one constructor with arguments

•        Implement at least two functions using function overloading between classes and experiment with the way function overloading works in Java. ***Write about this.

•        Implement dynamic binding and experiment with how it works in Java. Prove to yourself that the functions are being overridden versus overloaded. ***Write about this

•        Try out the super keyword in invoking a base class’ constructor. This is what we use instead of an initialization list. ***Write about this in your

 

For each of the above that you experiment with, write up information about it in your efficiency write-up

 

You are required to turn in a paper on how this solution is object oriented (your design). There is ONLY ONE design writeup for the combined programs 4-5. But, with EACH program, you are required to write 400 words about the efficiency and IDE (rather than the debugger). 

Data Structures
In these last two programs, you must implement two data structures:

1.     Program 4:  

a.     If you have already implemented a balanced tree in a previous assignment: A Binary Search tree, implementing insert, display, retrieve, retrieve all related items, remove an individual item, and remove all; the algorithms must be implemented recursively. 

b.     If you have not yet implemented a balanced tree, then:

A red-black tree, implementing insert, display, retrieve, retrieve all related items (no remove individual items).  

c.      Each node needs to have a root pointer to a binary search tree for all items where the key matches. This means there can be duplicate data – but will only appear in one node’s data structure.

 

2.     Program 5: A linear linked list of arrays.

 

The required data structures specified in the assignment must be your own implementation: as in BST (or balanced tree) and linear linked lists. Once you meet the basic requirements of the assignment, you are allowed to use libraries for any subsequent data structures.

 

Program  Requirements
As you go around Portland, it is amazing to see all of the delivery services. There are services which will pick up food that you order and others that will deliver meal plans, recipe cards, and perfectly portioned ingredients.  Soon we won’t have to leave home at all! The problem is that there are over 14 different food planning services and a wide variety of food delivery services (such as Grubhub, Doordash, Caviar, Postmates, UberEATS, etc.). There are just too many to know who to select from and whether or not you will enjoy your dining experience (is
the food fresh, etc.).
 
 

Your job is to create a program of what will ultimately be an App to assist people in ordering meal plans and food delivery all through one application. Before the program can be used to order food, we need to first set up the meal plans and food available to be ordered. This will be the first step with Program #4. Then, once the data exists, with Program #5 we can have users (like me) put together meal plans and order food! When we order, we want to know what the ingredients are (in case we have allergies), the price of the meal, and any special
instructions.
 
 

Start by looking up how to use Grubhub, and get an idea of what information it contains. Here is a brief list of what I came up with:  Location (city, state/region,

country), Food categories (Cuisine), Restaurants available for pickup or delivery,
the most popular dishes (a list).
 
 

Here are some suggestions on where to use the data structures assigned. These are JUST suggestions; you may adjust how the data structures are used:   

1.     Program #4 - A tree of restaurants (or cuisines) supported by our   program, where each node is a tree of the most popular foods available for delivery or pickup. 

2.     Program #5 – A linear linked list of my order, where each array holds the details of the order (ingredients as appropriate, prices, special instructions, etc.).

 

Your job is to come up with a design of an OO framework that will support an meal plan and food ordering type of application.  Although you all have the ability to write this using procedural abstraction, the key is to make sure to solve this problem using Object Oriented methodologies with dynamic binding and function overloading. The use of external data file(s) are necessary! 

More products