Archive

Category Archives for "Code"
3

Vector of Characters (Id-1498)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018] Design a class charVector that has a character vector as datamember. Provide member functions in the class to createVector, duplicateVector, duplicateRevVector and print. Functions shall be defined as follows: initializeVector – read a string and create a vector of characters duplicateVector – Add the content of the vector […]

Continue
5

Chess, Carrom and Scrabble Players (Id-1145)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018] Each student in a class of ‘n’ plays at least one indoor game chess, carrom and scrabble. Given three list of names of students who play chess, scrabble and carrom, develop an algorithm and write a C++ code to find the students who can (i) Play chess and […]

Continue
1

Sort Data in File (Id-1532)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018] Given a file with a set of numbers in a file, write a C++ program to sort the numbers and print them. Please Comment Working if the code worked to you If you have other working codes please comment the codes enclosing with <pre> and </pre> 🙂 Example: <pre> Your […]

Continue
1

Count Words in Tweets (Id-1531)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018] Given a word ‘w’and a set of tweets in a file named as tweets.txt, write a C++ program to count the number of words in the file. Assume that the program need not bother about case of the words as the input takes care of the same. Input […]

Continue
1

Customer discount (Id-)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018] Design an OOP model and implement it using C++ program. Refer the declaration of classes and application program to do the design. The program must get the details, compute bill amount and print details both for ordinary and preferred customers. For example, if a preferred customer makes three […]

Continue
5

Generic Double Ended Queue (Id-)

Bonus Practice Sheet Winter 2018 [17-Mar-2018 to 7-Apr-2018] Design a generic class queue to maintain a list of elements. Queue is a linear data structure that follow FIFO ordering of elements. It is a special kind of list where elements can be inserted at one end and deleted at the end. There are two end points […]

Continue
1 2 3 19