QuestionQuestion

Project Description

1. Create a new Windows Form Application project in Microsoft C# Express.

2. Add the following methods in the Library class. You will use these methods to display the
public string[] GetCustomerList(): this method should create and return an array of strings, each element of which should hold the output of the ToString() method when called on each customer item in the customerArray of library.
public string[] GetBooksList():this method should create and return an array of strings, each element of which should hold the output of the ToString() method when called on each book item in the bookArray of library.

3. When the application is started, the interface should be shown.
Note that the Customer radio button is selected and the textboxes next to Author and Edition are disabled. The boxes under the headings “Customers” and “Books” are of type ListBox.

4. When the options “General Book” or “Text Book” are selected, the label next to the first textbox should change to “Title”. Also, when “Text Book” is selected, all the three textboxes should be enabled; when “General Book” is selected, all but the textbox next to “Edition” should be enabled.

5. When the user clicks the button labeled ‘Add ’,
a. the application should check if all the information needed to add a Customer/GeneralBook/Textbook (depending on the radioButon being checked) has been provided or not. If the information provided is incomplete, the application should show a Message saying so.
b. If the information is complete,
i. appropriate library class method should be called to add the customer/Book to the library
ii. and the information about the Customer/Book just added to the library should be appended to the appropriate listBox.

6. When the user clicks the button labeled ‘Issue Book’,
a. the application should check if a customer and a book has been selected in the listboxes, if not, the application should show a MessageBox saying so.
b. Otherwise, appropriate library class method should be called to issue the selected book to the selected customer. If this method is successful in carrying the operation, the contents of the listBox listing the books should be updated appropriately; otherwise, a MessageBox should be displayed saying that it failed.

7. When the user clicks the button labeled ‘Return Book’ or the “Renew Book”,
a. the application should check if a book has been selected in the appropriate listbox, if not, the application should show a MessageBox saying so.
b. Otherwise, appropriate library class method should be called to return/renew the selected. If this method is successful in carrying the operation, the contents of the listBox listing the books should be updated appropriately; otherwise, a MessageBox should be displayed saying that it failed.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace A5
{
    abstract class Book
    {
       private int catalogNumber;
       private string title;
       private string authors;
       protected Customer c;
       protected DateTime dueDate;

       public Book(string title, string authors, int catalogNumber)
       {
            this.title = title;
            this.authors = authors;
            this.catalogNumber = catalogNumber;
            c = null;
       }

       public Customer getCustomer()
       {
            return c;
       }

       public int getCatalogNumber()
       {
            return catalogNumber;
       }...
$40.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats