Using visual studio (C#) to create a program, name it PRGYOURNAMEFA1, that implements a search and replace function recursively. Your program should allow a user to enter a string , a substring to be replaced in the entered string and a character/s to replace the found substring
Program Structure
1. A main class that implements the logic of the program – name this class TestSearchReplace
2. Add a class named SearchReplace to the main class with two methods, including:
a. SearchSubstring()- return method
b. ReplaceSubString() - void method
The two method should be called using an object in the main class. DONT CREATE THE TWO METHODS IN THE MAIN CLASS
Sample Output
Create a program using C# that implements the stream ciphers Cryptographic method . A stream cipher method inputs digits, bits, or characters and encrypts the stream of data. The onetime pad is an example of a stream cipher.
In this formative you have been requested to create an application that will work as the One-time pad (OTP), also called Vernam-cipher or the perfect cipher. This is a crypto algorithm where plaintext is combined with a random key and generate a ciphertext.
Marks allocation
1. The programme should received a string " How are you Isaac " - 10
2. The programme should generate an OTP of the length of the string entered "How are you Isaac "- 10
3. The program should Generate a Ciphertext based on the above example- 30
The first function must be responsible for inputting the data, the second for computation of squares and the third, for Displaying the result.
Modify the program from number 1 by adding a class and apply the "outside of a class function". 20 points
Riya took part in a maths quiz competition. To win the prize money she has to solve a tricky question at the end.For a given list of integers, write a program where all the integers in a given index range to be added.
She will be given M multiple ranges, where she should print the sum of numbers for each corresponding range.
Note: The limits in the range are both inclusive.
Input
The first line f input is space-separated integers.
The second line of input is a positive integer M denoting the number of index ranges.
The next M lines contain two space-separated integers of the range.
Output
The output should be M lines.
Each line contains an integer that represents the sum for the corresponding ranges.
Sample Input1
1 3 4 5 6
5
3 5
Sample Output1
12
[Please test the sample test cases and send the screenshots].Class Distance with private attributes Feet (int) and Inches (float). Also, define public member functions:
Set_distance( )
Display_distance( ) – to display the values of class attributes
Include a main ( ) program that creates an instance (object) of type Distance. Ask the user to enter the value of Distance variables and call the appropriate functions to set the object value and then display the object value.
Define the class member functions outside the class using scope resolution operator (::).
Task 7-01
Define a constructor for the class Distance, that should initialize the Distance attributes (feet, inches) to 0.
define an overloaded constructor that initializes the object to certain values.
e.g, Distance d1, d2(10,2) initialize d1 to 0 and values of d2 to 10, 2
Task 7-02
Make changes to the Set_distance( ) function and class constructor so that the values of inches never exceed 11. e.g
obj.Set_distance (10,12) - the value of obj members will be feet: 11, inches: 0
Consider a toll plaza on a bridge. Cars passing through the toll plaza must pay a toll of Rs.30/-. Most of the time, they do, but every now and then, a car drives by without paying. The toll plaza records the number of cars that have passed through as well as the total amount of money collected. Model this toll-plaza with the help of the toll-plaza class. The classs two data items are to hold the total number of cars and to hold the total amount of money collected. For the c++ class, implement:
A constructor that initializes both data items to 0.
A member function called payingCar() increments the car total and adds 30 to the cash total.
Another function, called nopayCar() that increments the car total but adds nothing to the
cash total.
Finally, a member function called display() should display the total cars and the total cash collected.
Write a C++ class to represent an Employee. Each employee is given a name, an age, a NIC number, an address, and a salary. Furthermore:
The Employee class should keep track of how many employees (objects) have been created in the system.
Your Employee class should initialize all of its fields via a constructor.
Create function prototypes to set and get an employees zip code.
Declare a print_employee() function that prints all of an employee object's details.
(Whenever possible, use constant functions.)
Create a structure course with some attributes i.e course_ID, course_title, credit_hrs etc.. Then Implement following 5 functions (Known as CRUDS operations which means CREATE, READ, UPDATE, DELETE, SEARCH operations):
1. addAStudent
2. updateAStudent
3. deleteAStudent
4. searchAndDisplayAStudent
5. displayAllstudents
After that, create an array of 5 courses in main function. Create a menu in main function to enable user to select and perform the operations we created above. Program must not exit until and unless user wants to do so.
Write a program to find the product of 2 power numbers if the base and the exponent of these numbers are
provided in the main function, also check that the base of both the power number are the same, as the
product of 2 power numbers can only be calculated if their base is the same. Use pass by reference
mechanism to compute the product of these power numbers then display the result in main function.
Note: Your function should not return a value.