Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace RileyConsoleApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- var defaultUser = new User()
- {
- Username = "rileyhempel",
- Password = "abc123",
- EmailAddress = "rileyhempel@outlook.com",
- Pet = new Pet()
- {
- Name = "Doggo",
- Type = "Cat"
- }
- };
- Console.WriteLine("Enter your username:");
- var username = Console.ReadLine();
- if (username != defaultUser.Username)
- {
- Console.WriteLine("Sorry, this user does not exist.");
- Console.ReadLine();
- return;
- }
- Console.WriteLine("Enter your password:");
- var password = Console.ReadLine();
- if (password != defaultUser.Password)
- {
- Console.WriteLine("Sorry, that password is incorrect.");
- Console.ReadLine();
- return;
- }
- Console.WriteLine("You have successfully logged in.");
- Console.WriteLine($"Your pet's name is {defaultUser.Pet.Name} and it is a {defaultUser.Pet.Type}");
- Console.ReadLine();
- }
- }
- public class Car
- {
- public string Body { get; set; }
- public string Trail { get; set; }
- }
- public class User
- {
- public string Username { get; set; }
- public string Password { get; set; }
- public string EmailAddress { get; set; }
- public Pet Pet { get; set; }
- }
- public class Pet
- {
- public string Name { get; set; }
- public string Type { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement