Write a program to simulate a part of the control logic for a departmental photocopier. There can be multiple (n) users of the system and only one administrator. Your program should present a menu:
C)reat new user
A)administrator
U)ser
Q)uit
On creation, each user is assigned an account type and an id, a number within range from 0-n. Only Administrator can assign account type. Each user is linked to a copy account, either the master account or one of ten project accounts. That linkage is maintained by the administrator, and it can change as users work on different projects. For user, display the menu:
R)equest photocopies
A)ssociations
M)ain menu
In case of request photocopies, prompt for the number of copies and increment the appropriate account. For associations display project ids to which user is linked to. In both cases user should return to the main menu. For an administrator, show this menu: B)alance
M)aster
P)roject
S)tatistics
M)ain menu
Write the recursive functions for following
1. find sum of an array
2. Find largest number in array
3. Given an array, check whether the array is in sorted order with recursion.
4. Write a recursive bubble sort algorithm
5. Write a recursive selection sort algorithm
6. Recursion to find palindrome
7. prints the numbers between 1 to n in a reverse order.
8. Suppose that intArray is an array of integers, and length specifies the number of elements in intArray. Also, suppose that low and high are two integers such that 0 <= low < length, 0 <= high < length, and low < high. That is, low and high are two indices in intArray. Write a recursive definition that reverses the elements in intArray between low and high.
composite class and sequence of constructors use in composite class?
Write a program to implement exception handling in constructors and destructors. Also use multiple c
Pointer code example
Write a program that prompts the user to input a sequence of characters and outputs the number of vowels and the number of consonants.
Write a Menu Driven C++ program that creates a character array/string by taking input from user and perform following tasks by displaying menu to user, the menu operations are implemented using functions: a) Length of string.
b) Character, consonants and vowels count in a string
c) Palindrome check
d) Character search within the string. If found display its starting position.
e) covert to either case (i.e., if string is in lower case then convert it to upper case and vice versa.)
Write a program that reads lines of text and appends them to a char buffer[1000]. Stop after reading 1,000 characters. As you read in the text, replace all newline characters '\n' with '\0' terminators. Establish an array char* lines[100], so that the pointers in that array point to the beginnings of the lines in the text. Consider only 100 input lines if the input has more lines. Then display the lines in reverse order, starting with the last input line.
Write a program to merge three sorted(ascending) arrays, A1, A2 and A3 and store results back in these arrays. You are required to place results (after sorting) in A3, A2 and A1 in ascending order, i.e., A3 contains smallest set of numbers then A2 and then A3. Take user input for each array of size 5.
Data collected by sensor devices may contain noise and need smoothing. One simple approach to smooth out data is to replace each value with the average of the value and its two neighboring values (or one neighboring value if it is at either end of the array). Write a program that inputs 4*3 array of integers and smooth out the values. You should not create another array in your solution. Also, you will use all neighbors to for smoothing. For example, for smoothing Red cell, you will use values of all orange cells. You will use updated value of cells for smoothing.