Q.No.4 Sony TV Manufacturer want you to design a program that will help their customers to check the price along with the dimensions for their products to be purchased. For this Carefully read all the instructions and follow the requirements. o Create a class called SONY_TV along with two constructors as follows: o A Default constructor to set the length of TV. o A parameterized constructor that will receive the width in float. o By using a friend function calculate the area of the SonyTV o Create a member function to calculate the price of the sony TV by multiplying the area with Rs 100. o Create a show( ) function to show the details of the purchased sony TV. In the main you will construct three objects that will show the use of the two constructors. After calling the constructor it will call the area function, and then the price calculation function. ( Marks 6)
Q.No.4 Sony TV Manufacturer want you to design a program that will help their customers to
check the price along with the dimensions for their products to be purchased. For this
Carefully read all the instructions and follow the requirements.
o Create a class called SONY_TV along with two constructors as follows:
o A Default constructor to set the length of TV.
o A parameterized constructor that will receive the width in float.
o By using a friend function calculate the area of the SonyTV
o Create a member function to calculate the price of the sony TV by multiplying the area
with Rs 100.
o Create a show( ) function to show the details of the purchased sony TV.
In the main you will construct three objects that will show the use of the two constructors. After
calling the constructor it will call the area function, and then the price calculation function.
( Marks 6)
Create a time class having data members hour, minute and second. Make a constructor to set the members zero, make a display function that outputs the time in given format: 00:00:00. Make a function called ticktick() that increments the time in such a way that hour do not change till the minutes and seconds ends at 60. (01:01:01…. 01:59:59 -> 02:00:00). Design the main function, create an object and call the functions accordingly.
Memory sticks (USB Flash drives) are used widely in lots of organizations. List two (2) benefits and two (2) drawbacks of using memory sticks in business establishments
List two (2) benefits and two (2) drawbacks of using memory sticks in business establishments. [4 marks ]
What is the output of following function, if called as foo( rr,0,6) ? arr content as follows: a-b-c- d-e-f
void foo(char arr[], int i, int s)
{
if(i>=s) return ;
cout<< arr[i];
if * (i + 1 < s)
foo(arr, i+2,s) ;
cout<<arr [ i]; }
Select one :
a. a c e a c e
b. a c e e c a
c. a c b e e a
d. a d f f d a
What is the output of following function, if called as fun * (array, 0, 6) array content as follows: 1-2-3-4-5-6 ?
void fun(int array[], int index, int size)
{
if(index >=size)
return;
cout<< array[index];
if(index+1< size)
fun(array , index + 2 ,size);
cout << array[index];
Select one:
a 132551
b. 135531
c.135135
d. 146
Which is the correct syntax for returning an object by pointer ?
Select one :
a. ClassName * functionName (){ }
b.*class object functionName () { }
c. void function Name (){ }
d. object& functionName() { }
Explain the limitation of PCI bus sharing
Select two countries (excluding the United States) and prepare a short report describing their basic Internet infrastructures. Are they public or commercial? How and where do they connect to backbones within the United States