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

A lady behaves like a teacher in a classroom, mother or daughter in a home and 

customer in a market. Here, a single person is behaving differently according to the 

situations. Consider a above real-life example and which concept you will use in cpp. 

Elaborate the concept.


Write a program to create a base class: “Question3”, with protected data member: x 

(int) and with pure virtual function: “Task ()” [Returns no value and takes no argument]. 

Create a derived class of “Question3” such as “Sub1” (Derive features in public mode). 

In sub1, there is a member function in public section: get_data1 () to take input for x, 

and define Task () in this class to display the factorial of x. [Implement the above 

program by creating pointer to base in main () function and call the necessary 

functions].


Create a class: Doctor, with private data members: id, name, specialization and salary 

with public member function: get_data () to take input for all data members, show_data

() to display the values of all data members and get specialization () to return 

specialization. Write a program to write for detail of n doctors by allocating the 

memory at run time only


Create a class named as Recruitment which is derived from two base classes named as 

Basic qualification and interview. Basic qualification contains the Name, marks in last 

qualification, Interview class contains the marks obtained in interview. Recruitment class 

will display the message as recruited or not recruited. Criteria for recruitment is if the 

marks in last qualification is more than 80 and interview marks are greater than equal to 6 

out of 10 for interview marks. Make sure that negative marks are not allowed.


Non-Adjacent Combinations of Two Words

Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.


The input will be a single line containing a sentence.Output


The output should be multiple lines, each line containing a valid unique combination of two words. A valid combination will not contain the words that appear adjacent in the given sentence. Print "No Combinations" if there are no valid combinations_Explanation.


Sample Input 1

raju always plays cricket


Sample Output 1

always cricket

cricket raju

plays raju


Sample Input 2

python is a programming language


Sample Output 2

a language

a python

is language

is programming

language python

programming python


Please the output should be printed exactly as shown in the above testcases.


Design and write class definition for class Circle,Square,Triangle which are derived from a class Shape.Define a function intersect () that takes two shape* arguments and calls a suitable member function to determine if two shape of same class overlap. Make sure to add suitable declaration of member functions to the classes to achieve this


With the aid of the functions above, write a program that

a. Gets from the user the size of a data set, N.

b. Creates an array for real numbers using the value from (a) as size.

c. Uses the function from (1) to populate the array with values from the user.

d. Uses the function from (3) to get the mean, variance, and standard deviation. 

e. Uses the function from (2) to display the numbers in the array (data set).

f. Displays the mean, variance, and standard deviation of the data set.

SAMPLE RUN

Enter size of data set: 5

Enter 5 numbers

2.4

-3

6

11.2

3

DATA SET

Index 4: 3.000000

Index 3: 11.200000

Index 2: 6.000000

Index 1: -3.000000

Index 0: 2.400000

Mean: 3.920000

Variance: 21.673600

Standard Deviation: 4.655491


With the aid of the functions above, write a program that

a. Gets from the user the size of a data set, N.

b. Creates an array for real numbers using the value from (a) as size.

c. Uses the function from (1) to populate the array with values from the user.

d. Uses the function from (3) to get the mean, variance, and standard deviation. 

e. Uses the function from (2) to display the numbers in the array (data set).

f. Displays the mean, variance, and standard deviation of the data set.



With the aid of the functions above, write a program that

a. Gets from the user the size of a data set, N.

b. Creates an array for real numbers using the value from (a) as size.

c. Uses the function from (1) to populate the array with values from the user.

d. Uses the function from (3) to get the mean, variance, and standard deviation. 

e. Uses the function from (2) to display the numbers in the array (data set).

f. Displays the mean, variance, and standard deviation of the data set.



Write a function that uses the formulas below

𝑚𝑒𝑎𝑛 = (𝑥1 + 𝑥2 + ⋯ + 𝑥𝑁)/𝑁

𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 =

𝑠(𝑥1 − 𝑥̅)2 + (𝑥2 − 𝑥̅)2 + ⋯ + (𝑥𝑁 − 𝑥̅)2

𝑁

𝑠𝑑 = √𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒

a. Returns the mean (i.e. average) 𝑥̅, of the values in an array by value.

b. Returns the variance of the data set by reference.

c. Returns the standard deviation of the data set by reference. 


LATEST TUTORIALS
APPROVED BY CLIENTS