-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdultUser.cs
39 lines (33 loc) · 946 Bytes
/
AdultUser.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Libary_Management
{
public class AdultUser : ILibraryUser
{
public void registerAccount(int Age)
{
if (Age > 12)
{
Console.WriteLine("You have successfully registered under an Adult Account");
}
else
{
Console.WriteLine("Sorry, Age must be greater than 12 to register as an adult");
}
}
public void requestBook(string bookType)
{
if (bookType == "Fiction")
{
Console.WriteLine("Book Issued successfully, please return the book within 7 days");
}
else
{
Console.WriteLine("Oops, you are allowed to take only adult Fiction books");
}
}
}
}