Write a menu driven program that achieves the following, console should be like this https://drive.google.com/file/d/1tTw5hjzEXrkz115AFV0AetqxPXSO9Tvb/view?usp=sharing
a. Takes student’s information from the user and adds such a student into "Mark_Sheet.txt" file...like this https://drive.google.com/file/d/1HcVlzVMb94ZDWUhHGlPhYzMvNbNOhnSm/view?usp=sharing
b. Takes a student number from the user and update such a student’s information.
c. Takes a student number from the user and delete such a student from Mark Sheet.txt file.
d. Generate or re-generate individual student report files. on .txt file, like this https://drive.google.com/file/d/16eDFLeOPHTmsWYT7pLskUZjHkSPC9t1E/view?usp=sharing
●Student with the attributes(Student_Id, student full name, average mark and course_id)
●Course with the attributes(Course_id, Course designation, number of years to complete and fee)
●School with the attributes(School code and highest qualification offered)
●Award with the attributes(Award code, description and amount)
Write the following functions for above data and incorporate them into one app:
● Four functions each responsible for capturing data about one of the data items above. Each stored in their respective array.
● A function that is responsible for capturing marks for each student.
● A function that searches for a maximum mark of a certain student; identified by their student id.
● A function that checks if a certain award is offered. The award must be searched by both their code and description.
● A function that allows replacement of the highest qualification offered by a school.
● Overload a function called DisplayDetails that displays all records for all the four data items.
please find question on below link:
https://drive.google.com/file/d/1FlvSizti3pcej5AnQ48at3hEP0fGh2iF/view?usp=sharing
Registration System
1. Press 1 to login
2. Press 2 to register students
3. Press 3 to see the list of fee defaulters
4. Press 4 to see the CGPA of student
5. Press 5 to see the pre requisite of a course.
6. Press 6 to exit the system
Registration Window
Enter student ID
The student should not be a fee defaulter if yes then do not register student
The pre requisite of course should be passed. if fail do not register for the course
If the students CGPA is a above 3.0 register all courses.
If the CGPA is above 2.0 register 3 courses.
If CGPA less than 2.0 then register 2 courses with a warning.
Student information Window
The data should be saved in a file.
The student record may be deleted.
The student record may be searched based on the ID provided.
The student record may be updated in case if its phone no or house address changes.
When will the ‘while’ loop be preferred over the for loop? Mention the scenario and write the
programme to demonstrate this.
Write a do while loop to require the user to enter two integers; the second integer must be equal to, or larger than, the first integer. Both integers must be at least 1 and not larger than 20. If they do not enter correct integers, give them error messages and make them do it again until they are correct.
After the acceptable integers have been entered, use a for loop to print a table of integers and their square roots for all integers from the first integer specified by the user to the last integer specified by the user, inclusive. Align the table and print 4 decimal positions
A sample table follows, for integers 7 to 9:
INTEGER SQUARE ROOT
7 2.6458
8 2.8284
9 3.0000
Test the program twice:
First test, first enter: first integer = 2, second integer = 0
and after that is rejected: first integer = 2, second integer = 4
Second test, first enter: first integer = 21, second integer = 5
and after that is rejected: first integer = 5, second integer = 5
When will the ‘break’ and ‘continue’ statements be used in programme? Mention the scenario and write the programme to demonstrate this.
Input numbers from the user and find the sum of all those input numbers until the user inputs zero. In other means, the loop should end when the user enters 0. Finally, display the sum of all those numbers entered by the user.
Description:
A palindrome is a string, which when read in both forward and backward ways is the same.
Example: lol, pop, radar, madam, etc.
To check if a string is a palindrome or not, a string needs to be compared with the reverse of
itself.
Demonstrate these two functions in a program that performs the following steps:
1. The user is asked to enter a string.
2. The program displays the following menu:
A) Display the reverse of the string
B) Check the string is palindrome or not
C) Exit the program
3. The program performs the operation selected by the user and repeats until the user
selects E to exit the program.
Output:
Enter a string : madam
Please enter a choice according to menu:
A) Display the reverse of the string
B) Check the string is palindrome or not
C) Exit the program
Please enter choice: A
The reverse of the string is : madam
Please enter choice: B
Madam is palindrome
Please enter choice: E
Terminate the program
How to execute this using vector?
#include <iomanip>
#include <iostream>
using namespace std;
int main() {
const int MAXCNT = 10; // Constant
float arr[MAXCNT], x; // Array, temp. variable
float array2[MAXCNT];
int i, cnt; // Index, quantity
cout << "Enter up to 10 numbers \n"
<< "(Quit with a letter):" << endl;
for (i = 0; i < MAXCNT && cin >> x; ++i)
arr[i] = x;
cnt = i;
// copying elements of an array to another
// array2 = arr
for (int index = 0; index < cnt; index++)
array2[index] = arr[index];
cout << "The given numbers:\n" << endl;
for (i = 0; i < cnt; ++i)
cout << setw(10) << arr[i];
cout << endl;
return 0;
}