Problem 1. Create three structures called “Date”, “ID”, and “BookLogs” Create a
ID: 3713426 • Letter: P
Question
Problem 1. Create three structures called “Date”, “ID”, and “BookLogs”
Create a structure called “Date“ that has three variables for month day and time.
Create a structure called “ID” with a string variable for the student ID, a integer for the amount of books borrowed and a long integer pointer for the list of ISBNs
Create a structure called “BookLogs”, with string variables for the full name of the author, the full name of the book, and student ID, and a long int for the ISBN of the book, and a structure named “borrowed of type Date.
Explanation / Answer
// structure called "Date" that has three variables for month day and time
struct Date
{
string month; // for jan, feb etc
string day; // monday, tuesday etc
string time; // type hr:min:sec
};
// structure called "ID" with a string variable for the student ID, a integer for the amount of books borrowed and a long integer pointer for the list of ISBNs
struct ID
{
string studentID;
int books;
long long int *ISBN;
};
// structure called "BookLogs", with string variables for the full name of the author, the full name of the book, and student ID, and a long int for the ISBN of the book, and a structure named "borrowed of type Date.
struct BookLogs
{
string authorname;
string bookname;
string studentID;
long long int ISBN;
Date borrowed;
};
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.