Questions: 11 448

Answers by our Experts: 10 707

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

Create a class Students

•Data Members

•Students Name

•Student ID

•CGPA

•Department

•Member Functions


•Constructors / Destructors

•storeData // Reading from file

•fetchData // Writing into a file

•Driver


•Write 10 records in a file

•Read file contents from one file and store in another file

•Display file contents on screen


First make a Animal class as parent class it contain

-name and gender as data members

-eating as member function

Make 5 classes of Animal type and inherit from Animal class

A. Sheep

B. Goat

C. Cow

D. Buffalo

E. Zebra

-This class can override its parent class method and implements on its own way

-call its eating method in the base of polymorphism


Write a C++ program to accept a 5 digit integer and to validate the input based on the following rules.


Rules 


1) The input number is divisible by 2. 2) The sum of the first two digits is less than last two digits. if the input number satisfies all the rules, the system prints valid and invalid, otherwise, 


Example 1: 


Enter a value: 11222 


Output: Input number is valid 


Example 2: 


Enter a value: 1234 


Output: Input number is invalid


C++ programming

Correct the following invalid identifiers

a) num +3

b)Avg num

c)1st value2s

d)character




 In <b><i>English</i></b>, there are three articles 'a', 'an' and 'the', each article has some weightage which is given in the file 'articles.txt'. Prepositions are words that give additional meaning to the English Language There are around 80 to 100 prepositions in English. Some of the preposition and a weightage for each of them are given in a file named as 'prepositions.txt. Given a word- matrix of articles and prepositions in a file, design an algorithm and write a C++ code to determine the weight-matrix of the word- matrix given in a file. If a word in the input file is not a word in the given list of articles and preposition then assign its weight to 0. The input is such that at least one entry in the outer rows and columns is 0. If the element at index (0,0) in the …


Identity and correct the errors in each of the following statements

1)answer = 2Y + 4(z*)2;


2)if(x=1);

printf("Equal to 1");

printf("End of if");

else

printf("Not Equal to 1");

printf("End of else");


3)x =1;

while (x<=5)

total =total + x;

x++;


Write the final value of k in the following statments.

Int k =7, i =6, j = 25,m;

m= i++*100+j*10;

k = m/100+i;

k =m%k;



Write an algorithm for finding the average of five numbers


Write a C++ program which perform the following:

1. Create a class

2. Create two objects and assign the values

3. Now compare the object values by using the Operator

Overloading on the following operator: a. Operator Overloading (>)

4. And print if the value of which object is greater.


Identify and correct the errors in each of the following statements.

1) firstnumber =+ total

2) answer = X *(5Y)2;

3) if (x = 1);

cout << "Equal to 1"

else

cout <<"Not Equal to 1;

4)int n=1;

while (n>10);

cout << "HELLO \n"

n++;


LATEST TUTORIALS
APPROVED BY CLIENTS