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.
A designer in 3D graphics company wants to design a matrix as a two-dimensional array. The size of 2D array could be the last two digit of arid number. Initially he creates a class matrix that provides the member function to check that no array index is out of bounds. Make the member data in the matrix class a 10-by-10 array. A constructor should allow the programmer to specify the actual dimensions of the matrix (provided they’re less than 10 by 10). The member functions that access data in the matrix will now need two index numbers: one for each dimension of the array. Here’s what a fragment of a main() program that operates on such a class might look like:
If my Arid Number is 20-Arid-254 then: // in case of zero consider next digit
matrix m1(5, 4); // define a matrix object
int temp = 12345; // define an int value
m1.putel(7, 4, temp); // insert value of temp into matrix at 7,4
temp = m1.getel(7, 4); // obtain value from matrix at 7,4
A designer in 3D graphics company wants to design a matrix as a two-dimensional array. The size of 2D array could be the last two digit of arid number. Initially he creates a class matrix that provides the member function to check that no array index is out of bounds. Make the member data in the matrix class a 10-by-10 array. A constructor should allow the programmer to specify the actual dimensions of the matrix (provided they’re less than 10 by 10). The member functions that access data in the matrix will now need two index numbers: one for each dimension of the array. Here’s what a fragment of a main() program that operates on such a class might look like:
If my Arid Number is 20-Arid-254 then: // in case of zero consider next digit
matrix m1(5, 4); // define a matrix object
int temp = 12345; // define an int value
m1.putel(7, 4, temp); // insert value of temp into matrix at 7,4
temp = m1.getel(7, 4); // obtain value from matrix at 7,4
Write a program that defines a class with a data member to holds a “serial number” for each object created from the class. That is, the first object created will be numbered 1, the second 2, and so on. To do this, you’ll need another data member that records a count of how many objects have been created so far. (This member should apply to the class as a whole; not to individual objects. What keyword specifies this?) Then, as each object is created, its constructor can examine this count member variable to determine the appropriate serial number for the new object. Add a member function that permits an object to report its own serial number. Then write a main () program that creates three objects and queries each about its serial number. They should respond I am object number 2, and so on
A designer in 3D graphics company wants to design a matrix as a two-dimensional array. The size of 2D array could be the last two digit of arid number. Initially he creates a class matrix that provides the member function to check that no array index is out of bounds. Make the member data in the matrix class a 10-by-10 array. A constructor should allow the programmer to specify the actual dimensions of the matrix (provided they’re less than 10 by 10). The member functions that access data in the matrix will now need two index numbers: one for each dimension of the array. Here’s what a fragment of a main() program that operates on such a class might look like:
If my Arid Number is 20-Arid-254 then: // in case of zero consider next digit
matrix m1(5, 4); // define a matrix object
int temp = 12345; // define an int value
m1.putel(7, 4, temp); // insert value of temp into matrix at 7,4
temp = m1.getel(7, 4); // obtain value from matrix at 7,4
EMPLOYEE Commission Emp-ld 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 Emp-Name M. Junaid M. Usman M. Awais M. Jawad M. Ali M. Azhar M. Adeel M. Imran M. Nazer M. Asad M. Sadiq M. Kamarn M. Khuram M. Usama Job Title PRESIDENT MANAGER MANAGER MANAGER ANALYST ANALYST CLERK SALESMAN SALESMAN SALESMAN SALESMAN CLERK CLERK CLERK Hire-Date 1991-11-18 1991-05-01 1991-06-09 1991-04-02 1997-04-19 1991-12-03 1990-12-18 1991-02-20 1991-02-22 1991-09-28 1991-09-08 1997-05-23 1991-12-03 1992-01-23 Salary 6000.00 USD 2750.00 USD 2550.00 USD 2957.00 USD 3100.00 USD 3100.00 USD 900.00 USD 1700.00 USD 1350.00 USD 1350.00 USD 1600.00 USD 1200.00 USD 1050.00 USD 1400.00 USD 400.00 USD 600.00 USD 1500.00USD 0.00 USD Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predica
: Define a class called token number that incorporates a token’s number (could be the last 3 digits of your arid number) and its location. Number each token object as it is created. Use two variables of the angle class to represent the token’s latitude and longitude. A member function of the token class should get a position from the user and store it in the object; another should report the serial number and position. Design a main() program that creates three token, asks the user to input the position of each, and then displays each token’s number and position.
Given reasons indicating why following identifiers are invalid,
1)goto
2)Struct
3)true
4)2k
The loop shown below has been written by a c++ programmer
int n =1; //A
while (n>=1){
if(condition){ //B
//C
}
n--;
}
1)Update the value of the variable n to repeat the loop 10 times.
2)Write the condition Statement to select only odd numbers
3)Rewrite the code with the statement n++ (You can only add or modify statement A,B,C)
Write a program that defines a class with a data member to holds a “serial number” for each object created from the class. That is, the first object created will be numbered 1, the second 2, and so on. To do this, you’ll need another data member that records a count of how many objects have been created so far. (This member should apply to the class as a whole; not to individual objects. What keyword specifies this?) Then, as each object is created, its constructor can examine this count member variable to determine the appropriate serial number for the new object. Add a member function that permits an object to report its own serial number. Then write a main () program that creates three objects and queries each about its serial number. They should respond I am object number 2, and so on