Restaurant Class
You are approached by a company in the restaurant review business, and they need your help! They want to create a database of chain restaurants, but they don't know where to start. They are not sure what information they should track for each restaurant, and they also don't know how to implement a data model in C#. For whatever reason, YOU are the most qualified consultant they have, so you have to help them implement their Restaurant class!
Modeling
First, think about what information is pertinent to a chain restaurant. What would this review business need to see for each restaurant in their database? Write out a table with whatever data columns you think make the most sense to store. The table should contain the attributes and their data types. It should look something like this (but for restaurants instead of dogs):
Examples
As you create your table, consider some specific chain restaurants that the client could track. How would the data appear for those restaurants? Fill in data for at least three restaurants.
Implementing
Once you have your table, create a real C# class definition! Write it out, making sure to include all of the data from the model. Call the class Restaurant
. Try to make the class code as syntactically accurate as possible.
Examples
For each example chain restaurant you modeled, write out how you would create a new object instance of the Restaurant
class! Remember, Restaurant
is a type, and any specific Restaurant you create is an object. Set all of the proper data values for the class fields, and try to make the object instantiation code as syntactically accurate as possible.
Restaurant Abilities
Consider what the client may want to do with these Restaurant
objects. How could they interact with each other? What capabilities should they have? Try to translate some of those capabilities into methods on the Restaurant
class definition!