Write a C++ program using a Class function that enables the storing of the following elements in an array as shown: (4 Marks)
-name
- houseno
- street
- city
How to fix this error?
void reflexive(int a[], int sizeOfA, int b[], int sizeOfB){
int i, j;
bool test;
bool hold = true;
for(i = 0; i < sizeOfA; i++)
{
if(hold == true)
{
for(j = 0; j < sizeOfB;)
{
if(b[j]==a[i] && b[j+1]==a[i])
{
hold = true;
break;
}
else
{
hold = false;
j++;
}
}
}
}
if(hold == true)
{
test = true;
cout << "Reflextive - Yes" << endl;
}
else
{
test = false;
cout << "Reflextive - No" << endl;
}
}
Write a program to calculate students' average test scores and their grades. You may assume the following input data:
Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 81 11 90 73
Gupta 92 83 96 38 59
Blair 23 45 96 38 59
Clark 60 85 45 39 67
Kennedy 77 31 52 74 83
Bronson 93 94 89 77 97
Sunny 79 85 28 93 82
Smith 85 72 49 75 63
Use four arrays: a one-dimensional array to store the students' names, a (parallel) two-dimensional array to store the
Cafeteria system is an important part of any institute. The university wants to automate the
cafeteria system you can help by identifying different classes along with their relationships.
University café has different customers (Employees, Students) that visit it for buying different
kinds of food. We want to make the system online so when a customer wants something he should
order it through a server. Whenever a customer comes to café he/she orders the food from specific
category. When a user wants to order something menu is displayed showing different food corners
(FastFood, ProperMeal, Beverages). After the order is placed generate bill for the user according
to the order he has placed. Identify the classes their relationship and function prototype of each
class
Create a program that will overload a function sum, which takes two
parameters of numeric data type and prints their sum function for
integers and floats.
Write a program which will do the following:
Create a class called
Triangle
. The three sides of the triangle
are private
members of the class. The
class should contain a member f
unction to determine whether a
triangle is equilateral, isosceles or
scalene.
The class
should
also
include member functions which will give area and perimeter of the
triangle. The side
s of the triangle should be taken as input from the user in the main function.
Create a program like simsimi program with at least 10-20 questions, the program would interact with the user some important details about the user.
Suppose you get appointed in a company under HR department. You have assigned a file “Employee.dat” which contains information of all employees joined in year 2000 in binary format. Your manager assigned you two tasks. A) Search a specific employee information with respect to its sequence number in file. B) Add more employee’s data in the same file at the end(as many as the manager would want to) write the code to complete both tasks in your main() function. You don't need to create the Employee structure, suppose the structure employee is already created with data members and set get functions.
write code in c++
Create a function Swap using templates, your function should have the following prototype
void swap (t x, t y)
This function should display the swapped values out of the two values being passed, in your main function create variables of different types, integer and character and check what your function returns for each different variable type.
Create a function Maximum using templates, your function should have the following prototype
t Maximum (t x, t y)
This function should return the maximum values out of the two values being passed, in your main function create variables of different types, integer, character and double and check what your function returns for each different variable type.