Advertisement
Guest User

Untitled

a guest
May 8th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1. //
  2. // classesSoftwareEngi.swift
  3. // Created by Bartlomiej Tyrpien on 4/26/17.
  4.  
  5.  
  6.  
  7. //Classes for Authentication
  8.  
  9. protocol Authentication {
  10. private var lockedUsers: [String] { get }
  11.  
  12. func confirmPasswordAndUsername()
  13. func allowAccessToMenu()
  14. func adminUnlockLockedUser(_: lockedUsers)
  15. func viewReport()
  16. func viewStatistics()
  17. }
  18.  
  19.  
  20. protocol Login: Authentication {
  21. private var userName: String { get set }
  22. private var password: String { get set }
  23.  
  24. func setUserName(_: userName)
  25. func setPassword(_: password)
  26.  
  27. }
  28.  
  29. protocol AdminMenu: Authentication {
  30. func generateReport()
  31. func administrativeMenu()
  32. }
  33.  
  34. protocol FacMenu: AdminMenu {
  35. func facultyMenu()
  36. }
  37.  
  38. //Protocols for viewReport
  39.  
  40. protocol Menu {
  41. private var title: String
  42.  
  43. func selection()
  44. func goToOverviewStatistics()
  45. func openReport()
  46. }
  47.  
  48. protocol Display {
  49. private var title: String
  50. var firstName: String
  51. var lastName: String
  52.  
  53.  
  54. func getStudentInfo(_: fistName, _: lastName)
  55. }
  56.  
  57. protocol Aid: Display {
  58. var tuitionBalance: Double
  59. var hold: Bool
  60. var aidAward: Double
  61.  
  62. func setContent(_: tuitionBalance, _: hold, _: aidAward)
  63.  
  64. }
  65.  
  66. protocol College: Display {
  67. var department: String
  68. var college: String
  69. var major: String
  70. var classes: [String]
  71. var grades: [String]
  72.  
  73. func getTranscript()
  74. func setCollege(_: college)
  75.  
  76. }
  77.  
  78. protocol Contact: Display {
  79. var location: String
  80. var contact: String
  81. var streetAddress: String
  82. var cityAdress: String
  83. var phoneNumber: administrativeMenu
  84.  
  85. func setContact(_: contact)
  86.  
  87. }
  88.  
  89. //Generate Report ****
  90.  
  91.  
  92. protocol StatDisplay {
  93.  
  94. var totalEnrollment: Int { get set }
  95. var genderRatio: Int { get set }
  96. var residentTotal: Int { get set }
  97. var nonResidential: Int { get set }
  98. var foreignTotal: Int { get set }
  99. var countryTotal: Int { get set }
  100. var stateTotal: Int { get set }
  101. var collegeTotal: Int { get set }
  102. var fmRes: Int { get set }
  103. var fmNonRes: Int { get set }
  104. var fmForeign: Int { get set }
  105. var fmCountry: Int { get set }
  106. var fmState: Int { get set }
  107. var fmCollege: Int { get set }
  108.  
  109. var gpaRes: Double { get set }
  110. var gpaNonRes: Double { get set }
  111. var gpaForeign: Double { get set }
  112. var gpaCountry: Double { get set }
  113. var gpaState: Double { get set }
  114. var gpaCollege: Double { get set }
  115.  
  116. //ENUM for above to make it easier to get/set
  117.  
  118. enum content{
  119. case totalEnrollment
  120. case genderRatio
  121. case residentTotal
  122. case nonResidential
  123. case foreignTotal
  124. case countryTotal
  125. case stateTotal
  126. case collegeTotal
  127. case fmRes
  128. case fmNonRes
  129. case fmForeign
  130. case fmCountry
  131. case fmState
  132. case fmCollege
  133.  
  134. case gpaRes
  135. case gpaNonRes
  136. case gpaForeign
  137. case gpaCountry
  138. case gpaState
  139. case gpaCollege
  140.  
  141. }
  142.  
  143.  
  144.  
  145. func getContent() -> content
  146. func setContent(_: content)
  147.  
  148. func setRatio(_: genderRatio)
  149. func displayPreview()
  150.  
  151.  
  152.  
  153.  
  154. }
  155.  
  156. protocol CreateStat: statDisplay {
  157. var title: String
  158. var stat: String
  159.  
  160. func generateReport(_: title, _: content ) -> String
  161.  
  162. }
  163.  
  164.  
  165. //VIEW STATISTICS ****
  166.  
  167. protocol viewStatistics: statDisplay {
  168. var title: String
  169. var university: String
  170.  
  171. func retrieveReport()
  172. func displayReport()
  173.  
  174. }
  175.  
  176.  
  177. //INTERFACE
  178.  
  179. protocol Interface {
  180. var choice: Bool
  181.  
  182. func getChoice()
  183. func setChoice()
  184. func unlock()
  185. func menu()
  186. }
  187.  
  188.  
  189. protocol FinantialAid: Interface, Display {
  190.  
  191. func browseFinatialAid()
  192. func changeFinatialAidInfo()
  193. func getTuitionBalance() -> Double
  194. func setTuitionBalance(_: tuitionBalance)
  195. func getAidAward() -> Bool
  196. func setAidAward(_: aidAward)
  197. func holdCalculation() -> Bool
  198. }
  199.  
  200.  
  201. protocol Registration: Display, Interface{
  202.  
  203. private var socialSecurityNumber: Int
  204.  
  205.  
  206.  
  207. func getSocialSecurityNumber() -> Int
  208. func getFirstName() -> String
  209. func getLastName() -> String
  210. func getGender() -> String
  211. func setGender() -> String
  212. func getDob() -> Int
  213. func getMajor() -> String
  214. func getCityAddress() -> String
  215.  
  216. }
  217.  
  218. protocol Transcript: Interface {
  219. func extractGrades()
  220. func calculateGPA()
  221. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement