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

b. Write an algorithm to determine the average of any six (5) numbers and display the below after: The sum, the product and the average. 

c. Describe what is a variable and how is it used in a program.


b. Write an algorithm/pseudocode for a movie rental company that wants to screen their customers from 18years and above. The system should be able to deny access to customers that appear below 18. (8pts)

c. Draw a Flowchart to illustrate the above program


Given a sentence as input, print all the unique combinations of two words in lexicographical order.Input


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


The output should be multiple lines, each line containing the unique combination of two words in lexicographical order.Explanation


For example, if the given sentence is "raju plays cricket", the possible unique combination of two are (cricket, plays), (cricket, raju), (plays, raju). So the output should be

cricket plays
cricket raju
plays raju

Sample Input 1

raju plays cricket

Sample Output 1

cricket plays

cricket raju

plays raju

Sample Input 2

python is a programming language

Sample Output 2

a is

a language

a programming

a python

is language

is programming

is python

language programming

language python

programming python





Explain the type of inheritance with code.


Create two classes named Mammals and MarineAnimals. Create another class named BlueWhale 

which inherits both the above classes. Now, create a function in each of these classes which prints 

"I am mammal", "I am a marine animal" and "I belong to both the categories: Mammals as well as 

Marine Animals" respectively. Now, create an object for each of the above class and try calling

 function of Mammals by the object of Mammal

 function of BlueWhale by the object of BlueWhale

 function of each of its parent by the object of BlueWhale

 function of MarineAnimal by the object of MarineAnimal


Develop a C++ program to Subtract two complex number by overloading - operator using Friend function.


Create a class named 'Member' having the following members

1 data member

2 name

3 age

4 phone number

5 address

6 salary

It also has method named 'print salary' of the members. Two classes'employes ' & ' manager' inherits the 'member' classes . The 'employee' & 'manger' speclization and ' department ' respectively . Now, assign name , age , phone number, address & salary to an employer & a manger by making an object of both of these classes and print.


Write a program which has a class template for determining the largest and the smallest number

from a list of numbers. Use a constructor for input and appropriate data members and member

functions in support of your answer. [


Write a program which has an abstract class called Number having an integer data member.

The class contains a pure virtual function called operation. A class called Armstrong is derived from

class called Number. Another class called Palindrome is derived from class Number. Use

appropriate constructors and redefine the function called operation to display if the number is

Armstrong number as well as Palindrome in case it falls in this category. You may make use of

other data members and member functions if needed


Write a program which has a class called binary which has a character array to store a binary

string. The class decimal derives from class binary and contains an integer data member. Another

class called hexadecimal also derives from binary. Each class should contain constructors and

appropriate data members to input and display the elements. The display function of binary class

displays the binary equivalent, hexadecimal class’s display function displays hexadecimal

equivalent whereas decimal class’s display function displays the decimal equivalent.


LATEST TUTORIALS
APPROVED BY CLIENTS