Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Fill in \"public\" or \"private\" as appropriate to make the following statement

ID: 3776294 • Letter: F

Question

Fill in "public" or "private" as appropriate to make the following statements true. By default, the members of a struct are while the members of a class are. Often, classes have data members and function members. If the data members of a class are then must be a constructor to initialize them. List the members you would include in the class definition of a class named BakingDishType A cook wants to use objects in this class to represent banking dishes in her kitchen. When she buys a new dish, she wants to he able to enter an ID for it, three indicators to tell whether or not it can be used on the stovetop, in the oven, and in the microwace and the warranty expiration date(month and year) She wants to be able to see all the member variables' values, to find out where a dish can be used for cooking and to find out the expiration date of the warranty. Write the definition of a constructor with parameters for the dataType class, which has variables for the day. month and year The constructor should enforce data integrity: the day must be between 1 and 31. the month must he between 1 and 12. and the year must be greater than 0.

Explanation / Answer

1. a ) By default the member of a struct are ------------ while the member of a class are ---------------

Answer :-

By default the member of a struct are private while the member of a class are public .

Explanation :

default, members are private in a class while they are public in a structure. The private members are not accessible outside the class; they can be accessed only through methods of the class. The public members form an interface to the class and are accessible outside the class.

1.b) often,classes have ------------------------data member and ------------------------ function member

Answer:-

often classes have interact with data member and member function using to interchanges base class.

explanation :

Member functions and functions are names used interchangeably in reference to classes. Function prototypes are declared within the class definition.

These prototypes can take the form of non-class functions as well as class suitable prototypes. Functions can be declared and defined within the class definition

. However, most functions can have very large definitions and make the class very unreadable. Therefore it is possible to define the function outside of the class definition using the scope resolution operator "::".

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote