Advertisement
Guest User

Class BookShop

a guest
Nov 26th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Zad4
  8. {
  9.     class BookShop
  10.     {
  11.         public BookShop (string bookTitle, string bookAuthor, int bookPublishDate, double bookPrice)
  12.         {
  13.             _bookTitle = bookTitle;
  14.             _bookAuthor = bookAuthor;
  15.             _bookPublishDate = bookPublishDate;
  16.             _bookPrice = bookPrice;
  17.         }
  18.  
  19.         public string bookTitle { get { return _bookTitle; } }
  20.         private readonly string _bookTitle;
  21.         public string bookAuthor { get { return _bookAuthor; } }
  22.         private readonly string _bookAuthor;
  23.         public int bookPublishDate { get { return _bookPublishDate; } }
  24.         private readonly int _bookPublishDate;
  25.         public double bookPrice { get { return _bookPrice; } }
  26.         private readonly double _bookPrice;
  27.  
  28.         public bool ReleaseBookDateBefore2010()
  29.         {
  30.             return bookPublishDate < 2011;
  31.         }
  32.         public bool LemsBook()
  33.         {
  34.             return bookAuthor == "Lem";
  35.         }
  36.  
  37.        
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement