-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
179 lines (134 loc) · 4.99 KB
/
Copy pathProgram.cs
File metadata and controls
179 lines (134 loc) · 4.99 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
using InquiryForm;
using System.Data.Common;
using System.Numerics;
using System.Runtime.ExceptionServices;
using System.Security.Cryptography.X509Certificates;
using System.Transactions;
using System.Xml.Linq;
const int MAX_ATTEMPTS = 2;
var attempts = 0;
while(attempts < MAX_ATTEMPTS)
{
Console.WriteLine("Hey There!\n");
Console.WriteLine("Welcome to Pawsitivty Dog Training!\n");
Console.WriteLine("Let's get started with some basic information!\n\n");
Customer myCustomer = GetCustomer();
FurBaby furBaby = GetFurBaby();
myCustomer.FurBaby = furBaby;
TrainingProgram trainingProgram = GetTrainingProgram();
furBaby.TrainingProgram = trainingProgram;
InfoConfirmation infoConfirmation = GetInfoConfirmation();
Console.WriteLine();
myCustomer.InfoConfirmation = infoConfirmation;
if (myCustomer.InfoConfirmation.Answer)
{
Output(myCustomer);
break;
}
else
{
Console.WriteLine("press 0 to exit OR ANY KEY TO CONTINUE");
var input = Console.ReadLine();
if (input == "0")
{
return;
}
Console.WriteLine("Please review and make changes.");
}
attempts++;
if(attempts == MAX_ATTEMPTS)
{
Console.WriteLine("NOPE. YOU'RE DONE. GET OUT!");
}
}
static Customer GetCustomer()
{
Customer customer = new Customer();
Console.WriteLine("Please enter your name:");
customer.Name = Console.ReadLine();
Console.WriteLine("\nEnter email:");
customer.Email = Console.ReadLine();
Console.WriteLine("\nEnter phone: e.g 5025551234");
customer.Phone = Console.ReadLine();
return customer;
}
static FurBaby GetFurBaby()
{
FurBaby furBaby = new FurBaby();
Console.WriteLine("\n\nPlease provide some information about your furbaby.\n");
Console.WriteLine("What is your furbaby's name?");
furBaby.Name = Console.ReadLine();
Console.WriteLine("How old is your furbaby?");
furBaby.Age = Convert.ToInt32(Console.ReadLine());
return furBaby;
}
static TrainingProgram GetTrainingProgram()
{
TrainingProgram trainingProgram = new TrainingProgram();
Console.WriteLine("\n\nNow, let's find the right training for your pup!\n");
Console.WriteLine("What kind of training services are you interested in? \n\n");
Console.WriteLine("Service 1 -Basic Cues and Enrichment");
Console.WriteLine("Service 2 -Learn Tricks");
Console.WriteLine("Service 3 -Service Dog");
Console.WriteLine("Service 4 -Behavior Moification\n\n");
Console.WriteLine("For service type, please enter the corresponding number above.");
Console.WriteLine("e.g. For Service Dog, enter 3.\n");
string myoptions;
myoptions = Console.ReadLine();
switch (myoptions)
{
case "1":
Console.WriteLine("\nService 1 - Basic Cues and Enrichment");
trainingProgram.Service = 1;
break;
case "2":
Console.WriteLine("Service 2 -Learn Tricks");
trainingProgram.Service = 2;
break;
case "3":
Console.WriteLine("Service 3 -Service Dog");
trainingProgram.Service = 3;
break;
case "4":
Console.WriteLine("Service 4 -Behavior Modification");
trainingProgram.Service = 4;
break;
}
Console.WriteLine("\n\nWhat kind of training environment would you prefer? " +
"Private or Group");
string myarea;
myarea = Console.ReadLine();
switch (myarea.ToLower())
{
case "group":
Console.WriteLine();
trainingProgram.Environment = "Group";
break;
case "private":
Console.WriteLine();
trainingProgram.Environment = "Private";
break;
}
return trainingProgram;
}
static InfoConfirmation GetInfoConfirmation()
{
InfoConfirmation infoConfirmation = new InfoConfirmation();
Console.WriteLine("\n\nPlease Confirm your information entered above by typing Y or N");
infoConfirmation.Answer = Console.ReadLine().ToUpper() == "Y";
return infoConfirmation;
}
static void Output(Customer myCustomer)
{
Console.WriteLine("\n\n\n\n ****Information Confirmed****");
Console.WriteLine($"\n\n\nCustomer Name: {myCustomer.Name}");
Console.WriteLine($"Email: {myCustomer.Email}");
Console.WriteLine($"Phone: {myCustomer.Phone}");
Console.WriteLine($"Furbaby's Age: {myCustomer.FurBaby.Age}");
Console.WriteLine($"Furbaby's Name: {myCustomer.FurBaby.Name}");
Console.WriteLine($"Training Service: {myCustomer.FurBaby.TrainingProgram.Service}");
Console.WriteLine($"Training Environment: {myCustomer.FurBaby.TrainingProgram.Environment}\n");
Console.WriteLine("\n\nThank you for providing your information.");
Console.WriteLine("\nWe will be in contact within the next 24 hours to schedule your furbaby's training.");
Console.WriteLine("\nWe look forward to meeting you both!\n\n\n\n");
}