Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The library at the University stores different items that can be borrowed, inclu

ID: 3636814 • Letter: T

Question

The library at the University stores different items that can be borrowed, including books and journals.

The library offers this service to all university members who include: students, staff and faculty

members, but only faculty members can borrow journals.

Students

can borrow up to a maximum of 5

books and staff can borrow up to a maximum of 7 books, and faculty member can borrow up to a

maximum of 10 books and 3 journals. When a user borrows a book, they provide their Id, if this is valid

their loan details are checked to ensure that they have not already borrowed above the maximum

permitted number of books.

to develop the system above that provides the following functionalities:

1- Add a new item to the library (journal or book).

2- Add a new member to the system (student, staff and faculty).

3- Borrow an item with above mentioned restriction (only faculty can borrow journal, any member

cannot borrow more than the maximum based on member type).

4- When an item is borrowed, system should decrease number of available copies.

5- Return an item. When an item is returned, number of available copies should be increased.

6- Inquiry about specific item, it should print: item title, number of available copies.

7- Inquiry about all borrowed items (titles and their due dates).

8- Inquiry about all items currently borrowed by a member.

Your system should have GUI to interact with system user and should use files to save data

permanently.

Explanation / Answer

The prgm below discusses the disk usage and login names of different users: printf("total disk space of the partition: %ld MB ",((stat.f_bsize)*(stat.f_blocks))/(1024*1024)); printf("total free disk space of the partition: %ld MB ",((stat.f_bsize)*(stat.f_bfree))/(1024*1024)); printf("total used disk space of the partition: %ld MB ",((stat.f_bsize)*(stat.f_blocks-stat.f_bfree))/(1024*1024)); break; case 5: fp=fopen("/etc/passwd","r"); printf("the login names of the connected users: "); do { p=fgetpwent(fp); if(p!=NULL) { printf("%s ",p->pw_name); count++; } else; }while(p!=NULL); printf("the number of connected users: %d ",count); break;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote