[solved] – Question 91189
Given a list of strings, return the count of the number of
strings where the string length is 2 or more and the first
and last chars of the string are the same.
Word1= [‘aba’, ‘xyz’, ‘aa’, ‘x’, ‘bbb’]
Word2 = [”, ‘x’, ‘xy’, ‘xyx’, ‘xx’]
Word3 = [‘aaa’, ‘be’, ‘abc’, ‘hello’]
Expert Answer
[solved] – Question 91198
Given the line coordinates (1, 2), (2, 3). Do the following operations on the given coordinates, entailing what occurs in the output.
Rotation of the line by 45 degrees about its center (5, 3)
Translate the line by (7, 2 )
Scale the line by 3 in x and 2 in
Expert Answer
[solved] – Question 91199
Sutherland – Hodgman polygon clipping algorithm is a clipping technique that provides efficiency in polygon clipping. Explain how this algorithm is implemented in computer graphics, in addition also state its pseudo-code.
Expert Answer
[solved] – Question 9120
I want some expert who colud tout me how to use classregtree in correct way
Thank you
Expert Answer
[solved] – Question 91203
design a balancedstring class having 2 members string str and a counter.the default constructor of balancedstring initializes str to the empty and resets counter to zero.the class’s one-argument constructor passes a strings to str and resets counter to zero.the balancedstring class also provide a boolean method boolean balanced() that returs true if a stringcontains a blanced set of parentheses.
for example:
the string “((hello)(goodbye))” has balanced parentheses , but “((a)(b)(0)” does not. A string with no parentheses is balanced.
To check whether or not a string contains a balanced set of parentheses
scan the string, left or right
if a character is left parentheses ,increment the counter and
if a character is right parentheses, decrement the counter
A string is balanced if the final counter value equals(),and while scanning the string, the value of the counter is never negative.
please send the answer quicklz
Expert Answer
[solved] – Question 91214
Kesa has changed RS as per unit consumption is one month as per the following condition-
1) unit>=200-> 0.50 paise/unit
2) unit>100 and unit <200->0.60 per/unit
3) unit> 50 and unit<100->0.70 per/unit
4) otherwise 0.8 per/unit
Note- 50 RS meter changes will also add.
Expert Answer
[solved] – Question 91253
Write a class studentInfo that represents a student
record. It must have variables to store the student ID,
student’s name and student’s CGPA. It also must have a
function to print all the values. You will also need to
overload a few operators.
• Create a list of objects of class studentInfo.
• Insert 5 student records 15234 Jon 2.6
13732 Tyrion 3.9
13569 Sandor 1.2
15467 Ramsey 2 3.1
16285 Arya 3.1
• Delete the record with ID 15467
• Retrieve the record with ID 13569 and print whether
found or not along with the entire record
Item is found
13569, Sandor, 1.2
• Print the list 15234, Jon, 2..6
13732, Tyrion, 3.9
13569, Sandor, 1.2
16285, Arya, 3.1
Expert Answer
[solved] – Question 91254
Write a function named “shift_right” that takes as its arguments the following:
(1) an array of floating point values;
(2) an integer, call it “left”, that tells the leftmost cell of the part of the array to be shifted;
(3) an integer, call it “right”, that tells the rightmost cell of the part of the array to be shifted;
(4) a positive integer, call it “distance” that tells how many cells to shift by.
The function should make sure that left is less than or equal to right, and that distance is greater
than zero. If either of these conditions fails, the function should return the value 1 to indicate an error.
Otherwise it should shift by distance cells the contents of the array cells with subscripts running from
left to right . Thus, for example, if the array passed to the function looks like this:
Expert Answer
[solved] – Question 91255
Write a function named “g_c_d” that takes two positive integer arguments and returns as its value the
greatest common divisor of those two integers. If the function is passed an argument that is not positive (i.e.,
greater than zero), then the function should return the value 0 as a sentinel value to indicate that an error
occurred. Thus, for example,
cout << g_c_d(40,50) << endl; // will print 10
cout << g_c_d(256,625) << endl; // will print 1
cout << g_c_d(42,6) << endl; // will print 6
12
cout << g_c_d(0,32) << endl; // will print 0 (even though 32 is the g.c.d.)
cout << g_c_d(10,-6) << endl; // will print 0 (even though 2 is the g.c.d.)
Expert Answer

