+ Reply to Thread
Results 1 to 4 of 4

Data Type Hierarchy

  1. #1
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Thumbs up Data Type Hierarchy

    Hello,

    My question is about creating a hierarchy of Data Types.

    I need to code 3 Data Types:
    1.) MealPlan
    2.) Meal
    3.) MealItem

    MealPlan represents a daily meal plan. It should have a certain number of meals. An example of MealPlan would be "Healthy" and have a total of 3 meals.

    Meal represents a single meal. It should have a certain number of meal items. An example of Meal would be "Meal 1" and have a total of 3 meal items.

    MealItem represents a single meal item. It should have a certain number of protein calories, fat calories, carb calories. An example of MealItem would be "Broccoli" and have protein calories of .2, carb calories of .8, fat calories of .1

    By using Data Types, I hope to create meal plans, which are made up of meals, which are made of meal items.

    The following code creates a Data Type hierarchy for two Data Types. I've examined it closely but i'm still having a hard time recreating it for my needs as stated above.

    Please Login or Register  to view this content.
    Looking at this, I know what I'm trying to do is possible - I'm just having a difficult time of it.

    Thanks for any and all help!
    Last edited by CrazyFileMaker; 04-29-2009 at 01:03 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Data Type Hierarchy

    Hi

    I think this sort of covers your question, but I'm not sure why you would want to build things this way...


    Please Login or Register  to view this content.
    rylo

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Data Type Hierarchy

    You can also use arrays:
    Please Login or Register  to view this content.
    ... and I'd add serving size as an element of mealitem.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    03-31-2009
    Location
    Auburn Alabama
    MS-Off Ver
    Microsoft Office Excel 2007 (Windows)
    Posts
    99

    Re: Data Type Hierarchy

    Thanks Rylo - That's just what I needed! And I'm using arrays as SHG suggested. I appreciate the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1