A certain company wants to give their employees an increase based on their years’ of
experience and position
Years experience Position Increase
< 10 M 7.5%
< 10 S 5.5%
< 10 P 4.5%
>= 10 < 15 M 12.5%
>= 10 < 15 S 9.25%
>= 10 < 15 P 7.75%
>=15 M 15%
>=15 S 11.25%
>=15 P 9.75%
Do all the necessary planning to solve this problem:
4.1 Plan all the variables needed (description, input, output)
4.2 Draw the IPO-chart
4.3 Write the algorithm using a nested-if statement.
4.4 Write a corresponding C++ code (See Figure 4.1 and Figure 4.2).
Write a C++ program to create user_defined datatype as Fruits having attributes as Name, color and price
Minimum of N numbers
Consider a hash table of size 10, and the following items are to be stored. Item
are in the (key, value) format. Map the key values to the indexes of an array.
• (1,20)
• (2,70)
• (42,80)
• (4,25)
• (12,44)
• (14,32)
• (17,11)
• (13,78)
• (37,98)
What is a Priority Queue? How is it Different from an ordinary Queue? Is Heap a Priority Queue? Explain your answers in own words.
Mr. Akbar is senior software developer working on an ecommerce website he wants to add the following products on his website with following keys
Mouse 4614
Keyboard 5882
Cable 6713
Webcam 4409
Monitor 1825
To make searching better he asked his junior to find the 2 digit hash address of products by following techniques and share results with him
a) Division method with m=97
b) Mid square method
c) Folding method without reversing
d) Folding method with reversing
Convert the H array into a Binary Max-Heap. Provide simulations for each step.
H: {15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}
alice and bob were buying chocolates.It was Alice turn today to buy Bob chocolates.Bob gives list A of N chocolates where A[i] denotes price of ith chocolate.Alice being on a tight budget asks Bob if he can remove a few chocolates.Bob allows him to remove some chocolate whose price is X(which Alice can decide).Please find the minimum amount alice has to pay today
Make a general store receipt of the customer who has bought several items. The Output should contain regular price of an item, the department code, and calculated the discount price. The receipt should be proper formatted using Escape sequence