Advertisement
Sephinroth

prac 18 x2

Feb 19th, 2020
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.95 KB | None | 0 0
  1. using System;
  2.                    
  3. abstract public class Edition
  4. {
  5.     abstract public void Show();
  6.     public bool IsDesired(string a)
  7.     {
  8.         if (author_surname == a) return true; else return false;
  9.     }
  10.     protected string name;
  11.     protected string author_surname;
  12.     protected int year;
  13. }
  14.  
  15. public class Book: Edition
  16. {
  17.     protected string editor;
  18.     public Book()
  19.     {
  20.     }
  21.     public Book (string name, string author_surname, int year, string editor)
  22.     {
  23.         this.name = name;
  24.         this.author_surname = author_surname;
  25.         this.year = year;
  26.         this.editor = editor;
  27.     }
  28.     public override void Show()
  29.     {
  30.         Console.WriteLine("{0}, {1}, {2}, {3}.", name, author_surname, year, editor);
  31.     }
  32.    
  33. }
  34.  
  35. public class Article: Edition
  36. {
  37.     protected string mag_name;
  38.     protected int num_mag;
  39.    
  40.    
  41. }
  42.  
  43. public class EResource: Edition
  44. {
  45.     protected string link;
  46.     protected strinh annotation;
  47. }
  48.  
  49. public class Program
  50. {
  51.     public static void Main()
  52.     {
  53.         Console.WriteLine("Hello World");
  54.     }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement