write a program using pointer to strings that acceptd the name of an animal and a bird and returns the names in plural
This is the criteria:
The code that you use to produce that application must use a combination of at least two of:
Loops
Vectors or Arrays
Conditional execution
Optionally, your code might embed:
Functions.
Visualisation of data
Write a C++ program in which, read integers from file “data.txt” into an integer array. First element of integer arrayshows the number of records. After that number of recordthere is another integer which shows the other number of records.
Write a C++ program in which, read integers from file “data.txt” into an integer array. First element of integer array shows the number of records. After that number of record there is another integer which shows the other number of records.
Write C++ program, with multiple functions, that reads text, txt, from the file and accepts two patterns, pat and rpat, from the user. The program replace all occurrences of pat from the txt with rpat. The program output shall be as shown below in the example. without using string
Write a program to design a class complex to represent negative numbers. The negative class
should use an external function (use it as friend function) to add two negative numbers. The
function should return an object of type negative representing the sum of two negative
numbers.
Write a user defined method named getMark that can be used to get a valid mark from the user.
Your method must continuously ask the user for a mark, until a valid mark is entered (valid marks
are between 0 and 100). If a user enters an invalid mark, display an error message before asking
for a valid mark to be entered. The method must return the valid value to the calling program.
Write a user defined method named isPass that can be used to determine whether a mark is a
pass mark (greater or equal to 50). The method must take as input a mark, and return a boolean,
indicating whether the mark was a pass mark.
Write a program that reads in 5 marks by using the getMark method to ensure that valid marks are
processed. You need to calculate the sum and the average of the marks. Your program must also
use the isPass method to determine the number of pass marks entered. When the 5 marks have
been processed you need to display the sum, average and number of passes (from these marks).
1- Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:
Process burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
a. Draw a Gantt chart to show how these processes would be scheduled.
b. Give the turnaround time (total time from first arrival into ready state until CPU-burst
is completed) of each process.
c. Give the waiting time (total time spent in the Ready state) of each process.
d. Give the average waiting time of all the processes.
e. Create Program for SJF for above data.
2- Suppose the following three processes arrive for execution at the arrival times
indicated.
Process Arrival Time Burst Time
P1 0.0 8
P2 0.4 4
P3 1.0 1
a. Develop code for SJF scheduling using above given data.
Create a class Employee having basic its details like name, age, Salary etc. Let there be a function show details which will print all the values for the data members. Further, inherit the same class to create two different classes Developer and Manager.
Implement the concept of runtime polymorphism by invoking the show details function
Write an algorithm and implement a program in C to read the data from a
file (called “test.txt”), transform the data according to the discussion in
“Introductory”, and afterwards, save in another file (called “final.txt”).