CUM Books need a program to calculate a customer’s total book price and the discount given to the customer Accept the customer’s name, type of customer and the discount given. Calculate the total book price bought by the customer based on the customer’s relationship with CUM Books. Assume that the price of one book is R5500 User-interface specifications: Input Specifications: • Accept the customer’s relationship with CUM Books using three radio buttons. The type of customer can be: Regular, Non-regular or Passers-by (Store “R”, “N” or “P” respectively for the type of customer). • Use appropriate controls for the other input value(s). • Provide a button that the user must click to process the data and display the output
consider two classes , hours and minutes . write a program to convert the hours to minutes using class to class type using both constructor and conversion function method
Rearrange Numbers in String
Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.
The input will be a single line containing a string.
The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.
For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".
Sample Input
I am 5 years and 11 months old
Sample Output
I am 11 years and 5 months old
Note: There will not be any negative numbers or numbers with decimal part.
What are Red Black Trees? Explain Insertion in a Red Black Tree with a suitable example.
Write a program that's define two binary trees to be identical if either both are empty, or their roots are
equal, their left subtrees are identical, and their right subtrees are identical.
Write the algorithm and pseudocode for finding the average of five(5) numbers.
Create a program for a library whose Main() method asks the user to input the number of books checked out and the number of days they are overdue. Pass those values to a method that calculates and displays the library fine, which is 20 cents per book per day for the first seven days a book is overdue, then 50 cents per book per day for each additional day.
The organisation you work for has asked you to create an interactive application that will assist with the allocation of employees to a cell phone network provider and phone number generation. You are required to prompt a user for three employee names which will randomly assign the employee to either the Vodacom, MTN or Cell C network. The employees also require a randomly generated phone number. The start of each phone number will begin with the following, depending on the network provider:
ORACLE transaction is a logical unit of work which contains one or more than one SQL commands. It is an atomic unit which means that all SQL commands in the transaction can be either committed (Done) or rolled back (Undone).
Accounts:
Ac_Ttile Ac_Number Ac_Type Balance
You are required to write PL/SQL code for an ORACLE transaction on Accounts table (given above) containing the following SQL commands.