-
Notifications
You must be signed in to change notification settings - Fork 0
/
Customer.cs
80 lines (74 loc) · 2.16 KB
/
Customer.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tourism_System__Sda_Project_
{
internal class Customer
{
private string C_username = null;
private string C_password = null;
private string gender = null;
private string name = null;
private int balance = 40000;
public Customer() { }
public string GetName()
{
return name;
}
public void CreateAccount(string tempname, string tempgender, string tempusername, string temppass)
{
name = tempname;
gender = tempgender;
C_username = tempusername;
C_password = temppass;
}
public int getBalance()
{
return balance;
}
public bool Transaction(int tempmoney)
{
if (balance >= tempmoney)
{
balance -= tempmoney;
return true;
}
else
{
return false;
}
}
public bool CheckCredentials(string tempuname, string tempupass)
{
if (tempuname==C_username && tempupass==C_password)
{
return true;
}
else
{
return false;
}
}
public void DisplayPackageList(GoldenPackage tempPackage_1, PlatinumPackage tempPackage_2, HoneymoonPackage tempPackage_3, string tempLoc)
{
// Dependency Injection Implementation
TourManager manager;
manager = new TourManager(tempPackage_1);
manager.PrintaPackinfo();
Console.WriteLine();
manager = new TourManager(tempPackage_2);
manager.PrintaPackinfo();
Console.WriteLine();
manager = new TourManager(tempPackage_3);
manager.PrintaPackinfo();
Console.WriteLine();
}
public void DisplayPurchasedPackage(TourManager manager)
{
manager.PrintaPackinfo();
Console.WriteLine();
}
}
}