Question: please use C++ OOP QUESTION 1 (15 Marks] NutritionFact serving Size : double Sellable G Food price: double - expiry : string Shirt IceCream -
please use C++ OOP![please use C++ OOP QUESTION 1 (15 Marks] NutritionFact serving Size :](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4589e6d622_50166f4589db2442.jpg)
QUESTION 1 (15 Marks] NutritionFact serving Size : double Sellable G Food price: double - expiry : string Shirt IceCream - size: string - favour string Figure C-1 Consider the class diagram in Figure C-1. Based on the class diagram answer the following questions: a. Determine the pairs of classes or a group of classes that form the relationship according to the questions below. If there is no such relationship in the class diagram, then write your answer as No such case. i Name TWO(2) pairs of classes that form a single inheritance relationship. il. Name a pair of classes that form a composition relationship. ii. Name a pair of classes that do not form any relationship (7 marks) b. Write a code segment in C++ that implements these THREE (3) classes: NutrionFact, Food, and Icecream. Your implementation does not need to include any methods including constructors, (8 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
