Advertisement
Guest User

Untitled

a guest
May 8th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 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. private var tuitionBalance: Double
  59. private var hold: Bool
  60. private var aidAward: Double
  61.  
  62. func setContent(_: tuitionBalance, _: hold, _: aidAward)
  63.  
  64. }
  65.  
  66. protocol College: Display {
  67. private var department: String
  68. private var college: String
  69. private var major: String
  70. private var classes: [String]
  71. private var grades: [String]
  72.  
  73. func getTranscript()
  74. func setCollege(_: college)
  75.  
  76. }
  77.  
  78. protocol Contact: Display {
  79. private var location: String
  80. private var contact: String
  81. private var streetAddress: String
  82. private var cityAdress: String
  83. private var phoneNumber: administrativeMenu
  84.  
  85. func setContact(_: contact)
  86.  
  87. }
  88.  
  89. //Generate Report ****
  90.  
  91.  
  92. protocol StatDisplay {
  93.  
  94. private var totalEnrollment: Int { get set }
  95. private var genderRatio: Int { get set }
  96. private var residentTotal: Int { get set }
  97. private var nonResidential: Int { get set }
  98. private var foreignTotal: Int { get set }
  99. private var countryTotal: Int { get set }
  100. private var stateTotal: Int { get set }
  101. private var collegeTotal: Int { get set }
  102. private var fmRes: Int { get set }
  103. private var fmNonRes: Int { get set }
  104. private var fmForeign: Int { get set }
  105. private var fmCountry: Int { get set }
  106. private var fmState: Int { get set }
  107. private var fmCollege: Int { get set }
  108.  
  109. private var gpaRes: Double { get set }
  110. private var gpaNonRes: Double { get set }
  111. private var gpaForeign: Double { get set }
  112. private var gpaCountry: Double { get set }
  113. private var gpaState: Double { get set }
  114. private 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. private var title: String
  158. private var stat: String
  159.  
  160. func generateReport(_: title, _: content ) -> String
  161.  
  162. }
  163.  
  164.  
  165. //VIEW STATISTICS ****
  166.  
  167. protocol viewStatistics: statDisplay {
  168. private var title: String
  169. private var university: String
  170.  
  171. func retrieveReport()
  172. func displayReport()
  173.  
  174. }
  175.  
  176.  
  177. //INTERFACE
  178.  
  179. protocol Interface {
  180. private 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