Advertisement
Sephinroth

prac 18

Feb 19th, 2020
229
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.     abstract public bool IsDesired();
  7.     protected string name;
  8.     protected string author_surname;
  9.     protected int year;
  10. }
  11.  
  12. public class Book: Edition
  13. {
  14.     protected string editor;
  15.     public Book()
  16.     {
  17.     }
  18.     public Book (string name, string author_surname, int year, string editor)
  19.     {
  20.         this.name = name;
  21.         this.author_surname = author_surname;
  22.         this.year = year;
  23.         this.editor = editor;
  24.     }
  25.     public override void Show()
  26.     {
  27.         Console.WriteLine("{0}, {1}, {2}, {3}.", name, author_surname, year, editor);
  28.     }
  29.     public override bool IsDesired();
  30.     {
  31.         //what is that
  32.     }
  33.    
  34. }
  35.  
  36. public class Article: Edition
  37. {
  38.     protected string mag_name;
  39.     protected int num_mag;
  40.    
  41.    
  42. }
  43.  
  44. public class EResource: Edition
  45. {
  46.     protected string link;
  47.     protected strinh annotation;
  48. }
  49.  
  50. public class Program
  51. {
  52.     public static void Main()
  53.     {
  54.         Console.WriteLine("Hello World");
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement