Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a menu - based program in C + + that manages attendance and absence for a class of 6 4 students. For this purpose,

Develop a menu-based program in C++ that manages attendance and absence for a class of 64 students. For this purpose, use a 64-bit mask instead of an array or other complex data structure!
Add an option for inputting attendance.
Add an option for inputting absence (deleting attendance).
Add an option for displaying the numbers of students who are absent.
Add an option for displaying the numbers of students who are present.
Add an option for changing the status of a student - if present, mark as absent, or if absent, mark as present.
Validate the data - invalid option, invalid student number...
For solving the problem, you may (but it's not mandatory) use the following structure:int main(void)
{
uint64_t attendance =0;
int option;
while (1)
{
std::cout <<"1. Set attendance" << std::endl;
std::cout <<"2. Clear attendance
")<< std::endl;
std::cout <<"3. Attendance info
")<< std::endl;
std::cout <<"4. Change attendance
")<< std::endl;
std::cout <<"5. Exit" << std::endl;
Std::cin >> option;
if (option ==1)
{
// to do
}
else if (option ==2)
{
// to do
}
else if (option ==3)
{
// to do
}
// to do
}
return 0;
} USE bitmask also you can use setBit,clearBit,flipBit,readBit functions do not use arrays if it is not necessary

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

2-11. Why do governments intervene in free-market systems?

Answered: 1 week ago

Question

4. Identify the stage of the road of trials in The Wizard of Oz.

Answered: 1 week ago