Initial commit
This commit is contained in:
39
Program.cs
Normal file
39
Program.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
|
||||
namespace Activities
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
static void Main()
|
||||
{
|
||||
Console.WriteLine("Creating a new invitation. Please enter your details.");
|
||||
string organisorName = Invitation.GetValue("Your name: ");
|
||||
string organisorEmail = Invitation.GetValue("Your email: ");
|
||||
Person organisor = new(organisorName, organisorEmail);
|
||||
Console.Clear();
|
||||
Console.WriteLine("Enter activity details.");
|
||||
string activityTitle = Invitation.GetValue("Activity title: ");
|
||||
DateOnly activityDate = Invitation.GetDate("Activity date (DD/MM/YYYY): ");
|
||||
string activityDescription = Invitation.GetValue("Activity description: ");
|
||||
Activity activity = new(activityTitle, activityDate, activityDescription);
|
||||
Console.Clear();
|
||||
List<Person> invitees = [];
|
||||
bool addInvitee = true;
|
||||
while (addInvitee)
|
||||
{
|
||||
Console.WriteLine("Enter invitee details.");
|
||||
string inviteeName = Invitation.GetValue("Invitee name: ");
|
||||
string inviteeEmail = Invitation.GetValue("Invitee email: ");
|
||||
Person invitee = new(inviteeName, inviteeEmail);
|
||||
invitees.Add(invitee);
|
||||
addInvitee = Invitation.GetResponse("Do you wish to add another invitee? (Y/N): ");
|
||||
}
|
||||
Console.Clear();
|
||||
foreach (Person invitee in invitees)
|
||||
{
|
||||
Console.WriteLine($"Dear {invitee.GetName()}, you have been invited for \"{activity.GetTitle()}\" on {activity.GetDate()}. Description: {activity.GetDescription()}\n\nKind regards,\n{organisor.GetName()}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user