Guest User

Untitled

a guest
Mar 1st, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _1202W16Assign1_SyLucero_Phung
  8. {
  9. //Assignment #1 - Super Power Savings Bank Account
  10.  
  11. //Member 1
  12. //Name: Jullian Anthony Sy-Lucero
  13. //Student ID: 100998164
  14. //ASsignment Focus: Account Class (Jullian_Jacky_Account.cs)
  15.  
  16. //Member 2
  17. //Name: Jacky Phung
  18. //Student ID: 100801047
  19. //Assignment Focus: Main Program Class (Jullian_Jacky_Bank.cs)
  20. public class Jullian_Jacky_Bank
  21. {
  22. public static void Main(string[] args)
  23. {
  24. //Declaring variables needed for any inputs. (Each input has a default value)
  25. string firstName = string.Empty,
  26. lastName = string.Empty,
  27. socialInsuranceNumber = string.Empty,
  28. homeAddress = string.Empty,
  29. phoneNumber = string.Empty,
  30. monthOfReport = string.Empty,
  31. yearOfReport = string.Empty;
  32. double openingBalance = 0.00,
  33. deposit = 0.00,
  34. withdrawal = 0.00;
  35. int monthlyDebitTransactionsCount = 0;
  36.  
  37. //Declaring client 1
  38. Jullian_Jacky_Account client1 = new Jullian_Jacky_Account(); //This account is entirely new with no information during its creation.
  39. DisplayLogo();
  40. Console.WriteLine("Here we will need you enter the information of three clients.\n");
  41. //Giving prompt to use to continue to a new screen.
  42. Console.WriteLine("Press any key to continue...");
  43. Console.ReadKey();
  44. Console.Clear();
  45. DisplayLogo();
  46. Console.WriteLine(" Here, please start to input for client number one.");
  47. //Placing information for client1 starting here.
  48. //Inputting client's first then last name.
  49. Console.Write(" Enter client number one's first name: ");
  50. client1.FirstName = Console.ReadLine();
  51. Console.Write(" Enter client number one's last name: ");
  52. client1.LastName = Console.ReadLine();
  53. //Inputting client's social insurance number.
  54. Console.Write(" Enter client number one's Social Insurance Number: ");
  55. client1.SocialInsuranceNumber = Console.ReadLine();
  56. //Inputting client's home address.
  57. Console.Write(" Enter client number one's home address: ");
  58. client1.HomeAddress = Console.ReadLine();
  59. //Inputting client's phone number.
  60. Console.Write(" Enter client number one's phone number: ");
  61. client1.PhoneNumber = Console.ReadLine();
  62. //Inputting current month of report that is being created.
  63. Console.Write(" Enter current month of this report\n"
  64. + " (Format input as JAN, FEB, MAR, etc.): ");
  65. client1.MonthOfReport = Console.ReadLine();
  66. //Inputting current year of report that is being created.
  67. Console.Write(" Enter current year of this report: ");
  68. client1.YearOfReport = Console.ReadLine();
  69. //Inputting client's opening balance/balance which was already in their account.
  70. Console.Write("Enter client number one's opening balance of this report\n"
  71. + " (Type 0 if there was no balance in the opening): $");
  72. client1.OpeningBalance = double.Parse(Console.ReadLine());
  73. //Inputting client's total monthly deposits. (Its just one whole number. //can have decimals)
  74. Console.Write(" Enter client number one's deposits\n"
  75. + " (Type 0 if no deposits were made): $");
  76. client1.Deposit = double.Parse(Console.ReadLine());
  77. //Inputting client's total monthly withdrawals.
  78. Console.Write(" Enter client number one's withdrawals\n"
  79. + " (Type 0 if no withdrawals were made): $");
  80. client1.Withdraw = double.Parse(Console.ReadLine());
  81. //Inputting client's total amount debit transactions for the month.
  82. Console.Write(" Enter client number one's number\n"
  83. + " of transactions during the month: ");
  84. client1.MonthlyDebitTransactionsCount = int.Parse(Console.ReadLine());
  85.  
  86. Console.Clear();
  87. DisplayLogo();
  88. Console.WriteLine("All needed information has been input thanks!");
  89. Console.WriteLine("Program will now move on to remaining clients.");
  90.  
  91. //Giving prompt to user to continue to a new screen.
  92. Console.WriteLine("\n\nPress any key to continue...");
  93. Console.ReadKey();
  94. Console.Clear();
  95.  
  96. DisplayLogo();
  97. Console.WriteLine(" Here, please start to input for client number two.");
  98. Console.WriteLine(" This client is a transfer to our bank, however"
  99. + "\n we will only need you to input personal information."
  100. + "\n We are still receiving paper work on their balances.\n\n");
  101. //Placing information for client2 starting here.
  102. //Inputting client's first then last name.
  103. Console.Write(" Enter client number two's first name: ");
  104. firstName = Console.ReadLine();
  105. Console.Write(" Enter client number two's last name: ");
  106. lastName = Console.ReadLine();
  107. //Inputting client's social insurance number.
  108. Console.Write(" Enter client number two's Social Insurance Number: ");
  109. socialInsuranceNumber = Console.ReadLine();
  110. //Inputting client's home address.
  111. Console.Write(" Enter client number two's home address: ");
  112. homeAddress = Console.ReadLine();
  113.  
  114. //Declaring client 2
  115. 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.
  116.  
  117. Console.Clear();
  118. DisplayLogo();
  119. Console.WriteLine("All needed information has been input thanks!");
  120. Console.WriteLine("Program will now move on to remaining clients.");
  121.  
  122. //Giving prompt to user to continue to a new screen.
  123. Console.WriteLine("\nPress any key to continue...");
  124. Console.ReadKey();
  125. Console.Clear();
  126.  
  127. DisplayLogo();
  128. Console.WriteLine(" Here, please start to input for client number three.");
  129. //Placing information for client3 starting here.
  130. //Inputting client's first then last name.
  131. Console.Write(" Enter client number three's first name: ");
  132. firstName = Console.ReadLine();
  133. Console.Write(" Enter client number three's last name: ");
  134. lastName = Console.ReadLine();
  135. //Inputting client's social insurance number.
  136. Console.Write(" Enter client number three's social insurance number: ");
  137. socialInsuranceNumber = Console.ReadLine();
  138. //Inputting client's home address.
  139. Console.Write(" Enter client number three's home address: ");
  140. homeAddress = Console.ReadLine();
  141. //Inputting client's phone number
  142. Console.Write(" Enter client number three's phone number: ");
  143. phoneNumber = Console.ReadLine();
  144. //Inputting current month of report that is being created.
  145. Console.Write(" Enter current month of this report\n"
  146. + " (Format input as JAN, FEB, MAR, etc.): ");
  147. monthOfReport = Console.ReadLine();
  148. //Inputting current year of report that is being created.
  149. Console.Write(" Enter current year of this report: ");
  150. yearOfReport = Console.ReadLine();
  151. //Inputting client's opening balance/balance which was already in their account.
  152. Console.Write("Enter client number three's opening balance of this report\n"
  153. + " (Type 0 if there was no balance in the opening): $");
  154. openingBalance = double.Parse(Console.ReadLine());
  155. //Inputting client's total monthly deposits. (Its just one whole number. //can have decimals)
  156. Console.Write(" Enter client number three's deposits\n"
  157. + " (Type 0 if no deposits were made): $");
  158. deposit = double.Parse(Console.ReadLine());
  159. //Inputting client's total monthly withdrawals.
  160. Console.Write(" Enter client number three's withdrawals\n"
  161. + " (Type 0 if no withdrawals were made): $");
  162. withdrawal = double.Parse(Console.ReadLine());
  163. //Inputting client's total amount debit transactions for the month.
  164. Console.Write(" Enter client number three's number\n"
  165. + " of transactions during the month: ");
  166. monthlyDebitTransactionsCount = int.Parse(Console.ReadLine());
  167.  
  168. //Declaring client 3
  169. Jullian_Jacky_Account client3 = new Jullian_Jacky_Account(firstName, lastName, socialInsuranceNumber, homeAddress,
  170. phoneNumber, monthOfReport, yearOfReport, openingBalance, deposit, withdrawal,
  171. monthlyDebitTransactionsCount); //This account is an existing account where all information is already input on creation.
  172. Console.Clear();
  173. DisplayLogo();
  174. Console.WriteLine("All needed information has been input thanks!");
  175. Console.WriteLine("This is the last client needed for input. Good job.");
  176.  
  177. //Giving prompt to user to continue to new screen.
  178. Console.WriteLine("\nPress any key to continue...");
  179. Console.ReadKey();
  180. Console.Clear();
  181.  
  182. //Displaying all client info prompt.
  183. DisplayLogo();
  184. Console.WriteLine("Now going to display all client info.");
  185. Console.WriteLine("\nPress any key to continue...");
  186. Console.ReadKey();
  187. Console.Clear();
  188.  
  189. DisplayLogo();
  190. //Displaying client informations below.
  191. Console.WriteLine("Displaying client information below.");
  192. DisplayClientInfo(client1);
  193. DisplayClientInfo(client2);
  194. DisplayClientInfo(client3);
  195. Console.ReadKey();
  196. }
  197. public static void DisplayLogo() //Method created for easy display of logo repeatedly;
  198. {
  199. Console.WriteLine(" ╒═══════════════════════════════¤═════════════════════════════════╕\n"
  200. + " ||||||| »The Bank Of« |||||||\n"
  201. + " ||||||| »Jullian Sy-Lucero & Jacky Phung« |||||||\n"
  202. + " ╘═══════════════════════════════¤═════════════════════════════════╛\n");
  203. }
  204. public static void DisplayClientInfo(Jullian_Jacky_Account currentClient) //Method created for easy display of client info
  205. {
  206. Console.WriteLine("╒══════════════════¤Information for Client #1¤════════════════════╕\n{0}\n"
  207. + "╘═════════════════════════¤End of Info¤═══════════════════════════╛", currentClient);
  208. }
  209. }
  210. }
Add Comment
Please, Sign In to add comment