Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // classesSoftwareEngi.swift
- // Created by Bartlomiej Tyrpien on 4/26/17.
- //Classes for Authentication
- protocol Authentication {
- private var lockedUsers: [String] { get }
- func confirmPasswordAndUsername()
- func allowAccessToMenu()
- func adminUnlockLockedUser(_: lockedUsers)
- func viewReport()
- func viewStatistics()
- }
- protocol Login: Authentication {
- private var userName: String { get set }
- private var password: String { get set }
- func setUserName(_: userName)
- func setPassword(_: password)
- }
- protocol AdminMenu: Authentication {
- func generateReport()
- func administrativeMenu()
- }
- protocol FacMenu: AdminMenu {
- func facultyMenu()
- }
- //Protocols for viewReport
- protocol Menu {
- private var title: String
- func selection()
- func goToOverviewStatistics()
- func openReport()
- }
- protocol Display {
- private var title: String
- var firstName: String
- var lastName: String
- func getStudentInfo(_: fistName, _: lastName)
- }
- protocol Aid: Display {
- private var tuitionBalance: Double
- private var hold: Bool
- private var aidAward: Double
- func setContent(_: tuitionBalance, _: hold, _: aidAward)
- }
- protocol College: Display {
- private var department: String
- private var college: String
- private var major: String
- private var classes: [String]
- private var grades: [String]
- func getTranscript()
- func setCollege(_: college)
- }
- protocol Contact: Display {
- private var location: String
- private var contact: String
- private var streetAddress: String
- private var cityAdress: String
- private var phoneNumber: administrativeMenu
- func setContact(_: contact)
- }
- //Generate Report ****
- protocol StatDisplay {
- private var totalEnrollment: Int { get set }
- private var genderRatio: Int { get set }
- private var residentTotal: Int { get set }
- private var nonResidential: Int { get set }
- private var foreignTotal: Int { get set }
- private var countryTotal: Int { get set }
- private var stateTotal: Int { get set }
- private var collegeTotal: Int { get set }
- private var fmRes: Int { get set }
- private var fmNonRes: Int { get set }
- private var fmForeign: Int { get set }
- private var fmCountry: Int { get set }
- private var fmState: Int { get set }
- private var fmCollege: Int { get set }
- private var gpaRes: Double { get set }
- private var gpaNonRes: Double { get set }
- private var gpaForeign: Double { get set }
- private var gpaCountry: Double { get set }
- private var gpaState: Double { get set }
- private var gpaCollege: Double { get set }
- //ENUM for above to make it easier to get/set
- enum content{
- case totalEnrollment
- case genderRatio
- case residentTotal
- case nonResidential
- case foreignTotal
- case countryTotal
- case stateTotal
- case collegeTotal
- case fmRes
- case fmNonRes
- case fmForeign
- case fmCountry
- case fmState
- case fmCollege
- case gpaRes
- case gpaNonRes
- case gpaForeign
- case gpaCountry
- case gpaState
- case gpaCollege
- }
- func getContent() -> content
- func setContent(_: content)
- func setRatio(_: genderRatio)
- func displayPreview()
- }
- protocol CreateStat: statDisplay {
- private var title: String
- private var stat: String
- func generateReport(_: title, _: content ) -> String
- }
- //VIEW STATISTICS ****
- protocol viewStatistics: statDisplay {
- private var title: String
- private var university: String
- func retrieveReport()
- func displayReport()
- }
- //INTERFACE
- protocol Interface {
- private var choice: Bool
- func getChoice()
- func setChoice()
- func unlock()
- func menu()
- }
- protocol FinantialAid: Interface, Display {
- func browseFinatialAid()
- func changeFinatialAidInfo()
- func getTuitionBalance() -> Double
- func setTuitionBalance(_: tuitionBalance)
- func getAidAward() -> Bool
- func setAidAward(_: aidAward)
- func holdCalculation() -> Bool
- }
- protocol Registration: Display, Interface{
- private var socialSecurityNumber: Int
- func getSocialSecurityNumber() -> Int
- func getFirstName() -> String
- func getLastName() -> String
- func getGender() -> String
- func setGender() -> String
- func getDob() -> Int
- func getMajor() -> String
- func getCityAddress() -> String
- }
- protocol Transcript: Interface {
- func extractGrades()
- func calculateGPA()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement