Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

provide short answers for below questions, this is for data sturcture.. 1. The public part of the throttle declaration from class notes is shown below.

provide short answers for below questions, this is for data sturcture..

image text in transcribed

1. The public part of the throttle declaration from class notes is shown below. Mark each function member header as follows: Mark C for any constructor; mark X for any function that is forbidden from changing the throttle's data fields class throttle public: throttle( throttle(int size); void shut off() void shift(int amount); double flow() const; bool is_on() const; 2. Here is a small class definition: class small public: small( ) void k() const; void h(int i); friend f (Small z); private: int size; l; Suppose that x and y are both small objects. Write the word "legal" or "illegal" in each location of this table to indicate whether the indicated statement is legal or illegal in these locations: In the const member function k In a main In the friend functionf Statement program x = y; x.h(42)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions