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

Write a c++ program to define a class for calculater with data members 1&member2(both as double) and methods as add() ,sub() ,mil(), div() create a array of 5 objects of calculater use paramaterized constructor to intialize the value.display output of all four arthmetic operator.


1.    Create a class: “Prime” with private data members: upper_limit (int), lower_limit (int) and parameterized constructor, which initializes the values of both data members. Apart from initialization, this constructor also displays the count of prime numbers from upper_limit to lower_limit. [Example: upper_limit:15, lower_limit:10, count of prime numbers is:2 (11 and 13), also make sure the value of upper_limit should be greater than lower_limit].



Write a program to work like a calculator that perform the addition, subtraction, multiplication and division operation. Your program should use the function call method to call four sub functions to do the arithmetic operations. Example of output:


cout << sum(6,2) << end1 //will print 8

cout << subtract(6,2) << end1 //will print 4

cout << multiply(6,2) << end1 //will print 12

cout << divide(6,2) << end1 //will print 3


Write a program using function call to compare two integers and return the larger integer to the main program.



Utilize an array structure in conjunction to simulate our card deck. 

Use the following array structures to assist in representing a card: 

string face [13] = { "Ace ", "Deuce", "Three", "Four", "Five", "Six", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};

string suit[4] = {"Hearts", "Diamonds", "Clubs", "Spade"};


Write a program that utilizes random number generation, just as you have in the past, to

generate a random face and random suit. This, of course, will be a “card”.

Use a loop to generate and print five cards.

Example Output:

Card 1: Five of Spades

Card 2: Queen of Hearts

Card 3: Seven of Spades

Card 4: Two of Clubs

Card 5: Ace of Diamonds


Accept two numbers and find their sum and difference. If the sum is more than the difference, display the sum otherwise display the difference


Explain default constructor and parameterized constructor with the help of program.


Explain with an example how one user defined data type can be converted to a predefined data type.


Write a program to perform binary operator overloading for a class named "data". The details of operators to be overloaded are:


+ will subtract the numbers


- will divide the numbers


*will add the numbers


/ will multiply the numbers.


Write a program to permanently store the data entered by the user. When user is done with Input, then print the confirmation message as "Content saved successfully" along with the number of character stored.


LATEST TUTORIALS
APPROVED BY CLIENTS