Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Give concise answers to the following questions / 1 0 a ) What is the importance of using properties in a C# program?
Give concise answers to the following questions
a What is the importance of using properties in a C# program?
b When do local objects occupy memory Compiletime or run time Explain.
Design a class representing a superstore item. You dont need to write implementations for any member functions, just list any public or private field, property, or method declarations you think; may be needed.
Assignment : Bookstore
Overview
Write a program that manages a simple Book Store by utilizing the ObjectOriented Programming Architecture.
Directions
A bookstore wants to develop a system to addremove readers, addremove books, track books rented and returned from registered readers, and show bookstore information. To endure books rented and returned, your program will need to track books and readers. A reader can rent a maximum of two books, and heshe can rent a book if it is available at the store and not rented by other readers. The store can remove any book if the book is not already rented to someone. The store can also remove a reader, however, to remove a reader, all books rented by himher must be returned otherwise, the system will generate an error message.
Your program must track each book and every reader. The implementation of your bookstore program can be done by the following steps:
Create a Book class Fully implemented in the starter code.
a Add fields for the books name, serial, and status. Assume the bookstore has the same book of multiple copies. ie book names can be the same, however, will always differ by the serial number. ie together book name and serial will be unique!
b Add a constructor that initializes every books field with given values.
c Add a function to check the availability of a book.
d Add a function to rent a book.
e Add a function to return a book.
f Finally, add a function to show book information.
Create a Reader class Some methods are implemented in the starter code.
a Add fields for the readers name and a list of books. Assume each readers name is unique. ie there are no two readers in the bookstore with the same name.
b Add a constructor that initializes the readers name and creates an empty list of books.
c Add a function to rent a book and add the book to the readers list.
d Add a function to return a book and remove the book from the list.
e Finally, add a function to show the reader information.
Create a Bookstore class. Some methods are implemented in the starter code.
a Add fields in order to store the list of books and the list of readers for the bookstore.
b Add a constructor to initialize all lists to an empty list.
c Add a method for adding a reader to the store.
d Add a method for removing a reader from the store. To remove a reader, all books rented by himher must be returned first!
e Add a method for adding a book to the store.
f Add a method to remove a book from the store. To remove a book, it should be available in the store, otherwise, the program should issue an error message!
g Add a method to rent a book for a reader.
h Add a method to return a book from a reader.
i Add a method to show bookstores all books information
j Finally, add a method to show bookstores all readers information.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started