Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _1202W16Assign1_SyLucero_Phung
- {
- //Assignment #1 - Super Power Savings Bank Account
- //Member 1
- //Name: Jullian Anthony Sy-Lucero
- //Student ID: 100998164
- //ASsignment Focus: Account Class (Jullian_Jacky_Account.cs)
- //Member 2
- //Name: Jacky Phung
- //Student ID: 100801047
- //Assignment Focus: Main Program Class (Jullian_Jacky_Bank.cs)
- public class Jullian_Jacky_Bank
- {
- public static void Main(string[] args)
- {
- //Declaring variables needed for any inputs. (Each input has a default value)
- string firstName = string.Empty,
- lastName = string.Empty,
- socialInsuranceNumber = string.Empty,
- homeAddress = string.Empty,
- phoneNumber = string.Empty,
- monthOfReport = string.Empty,
- yearOfReport = string.Empty;
- double openingBalance = 0.00,
- deposit = 0.00,
- withdrawal = 0.00;
- int monthlyDebitTransactionsCount = 0;
- //Declaring client 1
- Jullian_Jacky_Account client1 = new Jullian_Jacky_Account(); //This account is entirely new with no information during its creation.
- DisplayLogo();
- Console.WriteLine("Here we will need you enter the information of three clients.\n");
- //Giving prompt to use to continue to a new screen.
- Console.WriteLine("Press any key to continue...");
- Console.ReadKey();
- Console.Clear();
- DisplayLogo();
- Console.WriteLine(" Here, please start to input for client number one.");
- //Placing information for client1 starting here.
- //Inputting client's first then last name.
- Console.Write(" Enter client number one's first name: ");
- client1.FirstName = Console.ReadLine();
- Console.Write(" Enter client number one's last name: ");
- client1.LastName = Console.ReadLine();
- //Inputting client's social insurance number.
- Console.Write(" Enter client number one's Social Insurance Number: ");
- client1.SocialInsuranceNumber = Console.ReadLine();
- //Inputting client's home address.
- Console.Write(" Enter client number one's home address: ");
- client1.HomeAddress = Console.ReadLine();
- //Inputting client's phone number.
- Console.Write(" Enter client number one's phone number: ");
- client1.PhoneNumber = Console.ReadLine();
- //Inputting current month of report that is being created.
- Console.Write(" Enter current month of this report\n"
- + " (Format input as JAN, FEB, MAR, etc.): ");
- client1.MonthOfReport = Console.ReadLine();
- //Inputting current year of report that is being created.
- Console.Write(" Enter current year of this report: ");
- client1.YearOfReport = Console.ReadLine();
- //Inputting client's opening balance/balance which was already in their account.
- Console.Write("Enter client number one's opening balance of this report\n"
- + " (Type 0 if there was no balance in the opening): $");
- client1.OpeningBalance = double.Parse(Console.ReadLine());
- //Inputting client's total monthly deposits. (Its just one whole number. //can have decimals)
- Console.Write(" Enter client number one's deposits\n"
- + " (Type 0 if no deposits were made): $");
- client1.Deposit = double.Parse(Console.ReadLine());
- //Inputting client's total monthly withdrawals.
- Console.Write(" Enter client number one's withdrawals\n"
- + " (Type 0 if no withdrawals were made): $");
- client1.Withdraw = double.Parse(Console.ReadLine());
- //Inputting client's total amount debit transactions for the month.
- Console.Write(" Enter client number one's number\n"
- + " of transactions during the month: ");
- client1.MonthlyDebitTransactionsCount = int.Parse(Console.ReadLine());
- Console.Clear();
- DisplayLogo();
- Console.WriteLine("All needed information has been input thanks!");
- Console.WriteLine("Program will now move on to remaining clients.");
- //Giving prompt to user to continue to a new screen.
- Console.WriteLine("\n\nPress any key to continue...");
- Console.ReadKey();
- Console.Clear();
- DisplayLogo();
- Console.WriteLine(" Here, please start to input for client number two.");
- Console.WriteLine(" This client is a transfer to our bank, however"
- + "\n we will only need you to input personal information."
- + "\n We are still receiving paper work on their balances.\n\n");
- //Placing information for client2 starting here.
- //Inputting client's first then last name.
- Console.Write(" Enter client number two's first name: ");
- firstName = Console.ReadLine();
- Console.Write(" Enter client number two's last name: ");
- lastName = Console.ReadLine();
- //Inputting client's social insurance number.
- Console.Write(" Enter client number two's Social Insurance Number: ");
- socialInsuranceNumber = Console.ReadLine();
- //Inputting client's home address.
- Console.Write(" Enter client number two's home address: ");
- homeAddress = Console.ReadLine();
- //Declaring client 2
- Jullian_Jacky_Account client2 = new Jullian_Jacky_Account(firstName, lastName, socialInsuranceNumber, homeAddress); //This account is a transfered client with personal information information still in need during creation.
- Console.Clear();
- DisplayLogo();
- Console.WriteLine("All needed information has been input thanks!");
- Console.WriteLine("Program will now move on to remaining clients.");
- //Giving prompt to user to continue to a new screen.
- Console.WriteLine("\nPress any key to continue...");
- Console.ReadKey();
- Console.Clear();
- DisplayLogo();
- Console.WriteLine(" Here, please start to input for client number three.");
- //Placing information for client3 starting here.
- //Inputting client's first then last name.
- Console.Write(" Enter client number three's first name: ");
- firstName = Console.ReadLine();
- Console.Write(" Enter client number three's last name: ");
- lastName = Console.ReadLine();
- //Inputting client's social insurance number.
- Console.Write(" Enter client number three's social insurance number: ");
- socialInsuranceNumber = Console.ReadLine();
- //Inputting client's home address.
- Console.Write(" Enter client number three's home address: ");
- homeAddress = Console.ReadLine();
- //Inputting client's phone number
- Console.Write(" Enter client number three's phone number: ");
- phoneNumber = Console.ReadLine();
- //Inputting current month of report that is being created.
- Console.Write(" Enter current month of this report\n"
- + " (Format input as JAN, FEB, MAR, etc.): ");
- monthOfReport = Console.ReadLine();
- //Inputting current year of report that is being created.
- Console.Write(" Enter current year of this report: ");
- yearOfReport = Console.ReadLine();
- //Inputting client's opening balance/balance which was already in their account.
- Console.Write("Enter client number three's opening balance of this report\n"
- + " (Type 0 if there was no balance in the opening): $");
- openingBalance = double.Parse(Console.ReadLine());
- //Inputting client's total monthly deposits. (Its just one whole number. //can have decimals)
- Console.Write(" Enter client number three's deposits\n"
- + " (Type 0 if no deposits were made): $");
- deposit = double.Parse(Console.ReadLine());
- //Inputting client's total monthly withdrawals.
- Console.Write(" Enter client number three's withdrawals\n"
- + " (Type 0 if no withdrawals were made): $");
- withdrawal = double.Parse(Console.ReadLine());
- //Inputting client's total amount debit transactions for the month.
- Console.Write(" Enter client number three's number\n"
- + " of transactions during the month: ");
- monthlyDebitTransactionsCount = int.Parse(Console.ReadLine());
- //Declaring client 3
- Jullian_Jacky_Account client3 = new Jullian_Jacky_Account(firstName, lastName, socialInsuranceNumber, homeAddress,
- phoneNumber, monthOfReport, yearOfReport, openingBalance, deposit, withdrawal,
- monthlyDebitTransactionsCount); //This account is an existing account where all information is already input on creation.
- Console.Clear();
- DisplayLogo();
- Console.WriteLine("All needed information has been input thanks!");
- Console.WriteLine("This is the last client needed for input. Good job.");
- //Giving prompt to user to continue to new screen.
- Console.WriteLine("\nPress any key to continue...");
- Console.ReadKey();
- Console.Clear();
- //Displaying all client info prompt.
- DisplayLogo();
- Console.WriteLine("Now going to display all client info.");
- Console.WriteLine("\nPress any key to continue...");
- Console.ReadKey();
- Console.Clear();
- DisplayLogo();
- //Displaying client informations below.
- Console.WriteLine("Displaying client information below.");
- DisplayClientInfo(client1);
- DisplayClientInfo(client2);
- DisplayClientInfo(client3);
- Console.ReadKey();
- }
- public static void DisplayLogo() //Method created for easy display of logo repeatedly;
- {
- Console.WriteLine(" ╒═══════════════════════════════¤═════════════════════════════════╕\n"
- + " ||||||| »The Bank Of« |||||||\n"
- + " ||||||| »Jullian Sy-Lucero & Jacky Phung« |||||||\n"
- + " ╘═══════════════════════════════¤═════════════════════════════════╛\n");
- }
- public static void DisplayClientInfo(Jullian_Jacky_Account currentClient) //Method created for easy display of client info
- {
- Console.WriteLine("╒══════════════════¤Information for Client #1¤════════════════════╕\n{0}\n"
- + "╘═════════════════════════¤End of Info¤═══════════════════════════╛", currentClient);
- }
- }
- }
Add Comment
Please, Sign In to add comment