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 an int array called gamesWon[] of capacity 100, that stores the number of games won in different chess tournaments in the last two years. and fill n elements of this array by prompting a player to enter data and ask to end the data by entering Q. You use a while loop to read the user entered data and assign to the elements of the array. So it is important to use a new variable and initialize it to 0 and use as the index of the array as well. The value of this variable when the sentinel value is read is the actual size of the array. Now you have a partially filled array. Print the array you created using the variable you used as index variable as the size of the array.

1. Compute and print the average number of games won by the player by find the sum of all numbers and dividing by the actual size of the array. The actual size is the actual number of elements filled. We work with that size in a partially filled data.


A book shop maintains the inventory of books at the shop. The list includes details such as author, title, price, publisher and stock position. When a customer wants a book, the person inputs the title and author and the system searches the list and displays weather it available or not. If it is not, an appropriate message is displayed. If it is, the system displays the book details and request for the number of copies required. If the requested copies are available, the total cost of requested copies is displayed; else the message “no stock: is displayed. using a class called books with suitable member functions and constructors. Use new operator in constructors to allocate memory space if required.


1. The price of the books should be updated as and when required. Use a private member function to implement this.


2. The stock value of each book should be updated after transaction .


3. The number of successful and unsuccessful transactions should be recorded for the purpose of statistical analysis.


Non-Adjacent Combinations of Two Words

Given a sentence as input, find all the unique combinations of two words and print the word combinations that are not adjacent in the original sentence in lexicographical order.

Input


The input will be a single line containing a sentence.

Output


The output should be multiple lines, each line containing a valid unique combination of two words. The words in each line should be lexicographical order and the lines as well should be in lexicographical order. A valid combination will not contain the words that appear adjacent in the given sentence. Print "No Combinations" if there are no valid combinations.

Explanation

Sample Input 1

raju always plays cricket

Sample Output 1

always cricket

cricket raju

plays raju

Sample Input 2

python is a programming language

Sample Output 2

a language

a python

is language

is programming

language python

programming python

Sample Input 3

to be or not to be

Sample Output 3

be be

be not

or to

to to


Consider a class Computer having . Two fields ( i.e. companyName , price ) and A single function named show ( ) A class named Desktop inherits Computer class and adds fields representing color , monitor size , and processor type and Override function named show ( ) to display values of its all attributes . A class named Laptop inherits Computer class and adds fields representing color , size , weight , and processor type and Override function named show ( ) to display values of its all attributes . Write a main ( ) function that instantiates objects of derived classes to access respective show ( ) function using dynamic binding .

Consider a class Computer having . Two fields ( i.e. companyName , price ) and A single function named show ( ) A class named Desktop inherits Computer class and adds fields representing color , monitor size , and processor type and Override function named show ( ) to display values of its all attributes . A class named Laptop inherits Computer class and adds fields representing color , size , weight , and processor type and Override function named show ( ) to display values of its all attributes . Write a main ( ) function that instantiates objects of derived classes to access respective show ( ) function using dynamic binding .


nAssume that k is declared as an Integer. The loop should iterate until -1 is input.

 Do While k <> -1

 InputBox(“Enter a number -1 to quit:”, VB6)

 Loop


Write an interactive program that is a dialogue between two people. The dialogue should include strings, integers, and double numbers. Make the program more useful by implementing some math calculation. Also, include two types of comments at the proper places


Assume that z has been initialized to 50. The values from 0 to 50 should be totaled.

 While (z>=0)

 sum = sum + z


Identify and correct the error(s) in the following (you may simply need to add code):

Assume that y and total are declared as Integers

total = 0

Do Until y = -1

Print y

y = InputBox(“Enter a value, value input”)

total = total + y

Loop


3.Write an Employee class that keeps data attributes for the following pieces of information:

a. Employee name

b. Employee number Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information:

c. Shift number (an integer, such as1 for morning shift, 2 for evening shift)

d. Hourly pay rate Write the appropriate accessor and mutator methods for each class.


LATEST TUTORIALS
APPROVED BY CLIENTS