Questions: 9 913

Answers by our Experts: 9 913

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 & Filtering

Write a program in C++ that defines a class named StringOps. Declare data members of

this class as described below:


 variable str of data type string.

 variable size of data type integer which represents the length of the string str.


Write a program in C++ that defines a class named Student that represents a student. This




class declares three variables – name, stipend and course of suitable data types. It also has




a variable intern_status that is set to 1 if the student is interning in some organization and





0 otherwise. This variable is initialized appropriately in the constructors of the class. The





member functions of this class should be defined as given below:





 Parameterized constructor that initializes the values of all the members.





 An overloaded constructor that sets the stipend to zero for a non-interning student.





 Copy constructor for the class Student.





 Overload Operator << as a friend function in the class Student for displaying the





details of the student.





 Destructor for the class Student.




In the main() function, create two objects of this class; one for a ststuden



to create a new object and display it using << operator.

Write a program in C++ that reads text from the keyboard and stores it in a file named


“File1.txt”.


Also, for each of the specified prototypes given below, write the function definitions.


 void copyselc(ifstream& fp, ofstream& fp1):This function reads the


contents of the file “File1.txt” and copies those lines from the file that begin with


the character „#‟ to the file named “File2.txt”.


 void checksize(ifstream& fp1,ifstream& fp2):This function reads


two files “File1.txt” and “File2.txt” and counts the number of characters in


both the files. If the count of characters in both the files is same, then the function should


print the message “Both Files are of the same size” else it should display


“Size of the files is not same”.


 void dispNumNames(ifstream& fp):Assuming that the file “File2.txt”


may also contain numbers (1 to 5), this function will read the contents from the file and


display the number names for any numbers encountered.

Problem:





Create a Fraction class with two private positive integer member variables numerator and denominator, one





constructor with two integer parameters num and den with default values 0 and 1, one display function that





print out a fraction in the format numerator/denominator in the proper form such as 2/3 or ½ . Note: 2/4





should be displayed as ½.

You've learned in the past lessons on how to use square root functions, right? Then let's take your knowledge to the test. Print out the square root of a given integer with only two decimal places.





Ready, solve, and go!





Input





A line containing an integer.





4





Output





A line containing a decimal with two decimal places.





2.00




write an application to print out the numbers 10 through 49 in the following manner

10 11 12 13 14 15 16 17 18 19

20 21 22 23 24 25 26 27 28 29

30 31 32 33 34 35 36 37 38 39

40 41 42 43 44 45 46 47 48 49


1 .write c++ program using menu drive using switch to manipulate



case 1 for any user defined function, case 2 for passing argument by reference and value,



case 3 for passing argument by default, case 4 overloading function, case 5 recursive function, case 6 for built function.





2 .write c++ program to play game for dice by guessing the input random by using rand() function using loop.

Write a c++ program code that enters a number and prints wether or not it is prime number?

How to give values to the character array using maps

Develop a stopwatch with lap counter and total time calculator. The


program will create two processes and they will start calculating time.


One process will be used to calculate total time and the other will calculate


lap time. The total time calculator process will keep on calculating time.


In the lap time, calculator process when it reaches lap time limit, the


process will display lap number and set its counter to zero and start


calculating again. Take input of lap time and number of laps from the user


and start the program. At the end, display total time from total time


calculator process.

LATEST TUTORIALS
APPROVED BY CLIENTS