Q5: a- create a class with four integer member variables x. y. z and w; it also has the following member functions: parameterized constructor to set the values of the private variables. friend function to calculate and return the value of p as follows: ((5x + y- 2) Vxyz x- yl if 1sws5 if6 sws 10 otherwise

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter13: Overloading And Templates
Section: Chapter Questions
Problem 31SA
icon
Related questions
Question

Write in c++ ....

Q5: a- create a class with four integer member variables x, y, z and w; it also has the following member
functions:
parameterized constructor to set the values of the private variables.
friend function to calculate and return the value of p as follows:
if 1sws5
if6 sw s 10
(5x+y-z)
xyz
Ix - yl
otherwise
Transcribed Image Text:Q5: a- create a class with four integer member variables x, y, z and w; it also has the following member functions: parameterized constructor to set the values of the private variables. friend function to calculate and return the value of p as follows: if 1sws5 if6 sw s 10 (5x+y-z) xyz Ix - yl otherwise
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning