Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

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.


Assuming that weight has type double and value 126.7, and age has type int and value 26, what output is generated by the statement below?

cout << "Age: " << setw(3) << age << ", Weight: " << setw(8)

<< fixed << setprecision(2) << weight << endl;


The following mathematical expression is used to find the number of penny stamps one gets if one inserts dollars number of dollars in a stamp vending machine that returns the change in penny stamps. Replace the given mathematical expression by a simpler expression that gives the same value.

double amount = 19.35;

double amount = 19.95;

What are values of variables a and b after the following assignments?

int a = amount2;

int b = amount2 + 0.5; 


What is wrong with the following C++ expression? Explain.

−(b ∗ b − (4 ∗ a ∗ c)))/(2 ∗ a) ;


Define a class called ‘token number’ that incorporates a token’s 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.



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 predicates for application 1 are P1: Job-Title=

PRESIDENT,P2: Job-Title= MANAGER, P3: Job-Title= ANALYST The second application is

issued at two sites where the employee with a salary less than 15,00 USD are managed at one site,

whereas those with salary grater then 15, 00 USD are managed at a second site. Suppose we set

the simple predicates for site 2 are P4: Salary<15,00 USD, P5: Salary>=15,00 USD and P6:

Commission= 400.00 USD.

1. Perform a horizontal fragmentation of relation EMP with respect to the predicates above.

2. Explain why the resulting fragments of Employee does not fulfill the correctness rules of

fragmentation.


Write main method of a c++ program to read until user enters a 4 digit integer. The program outputs the number of digits in the user input.

SAMPLE OUTPUT 1

Enter a 4 digit number:14

Output:14 has 2 digits.Please enter a 4 digit number

SAMPLE OUTPUT 2

Enter a 4 digit number:145

Output:145 has 3 digits.Please enter a 4 digit number

SAMPLE OUTPUT 3

Enter a 4 digit number:1188

Output:You have entered the correct combination


Question 01

Write only nested if statements to print the message based on the flag user has entered. The scheme is as follows,

Flag Message

1 or 2 Left

3 to 5 Forward

6 Backward

7 Right


Question 02

Identify the errors in each of following statement

1)answer = 2Y+ X5 + 3Z

2)if(x=>1);

cout <<"Equal to 1" <<endl;

cout<<"Greater than 1 "<<endl;

else

cout<<"Not equal to 1"<<endl;

cout<<"End of else"<<endl;

Define a class called token number that incorporates a tokens 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 tokens 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 tokens number and position.


Let’s assume we have a class ‘Arithmetic’ with two member functions Add() and Subtract(). Suppose Add() function is defined within class then how will the subtract() function be defined out of the class boundary. Explain it with the help of some suitable program. 


LATEST TUTORIALS
APPROVED BY CLIENTS