Skip to content

Conversation

@NorlanT
Copy link

@NorlanT NorlanT commented May 13, 2020

Copy link

@swift-student swift-student left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very solid work, Norlan! You showed good understanding of the concepts from the third module. You should have no problems on the sprint challenge this weekend!

}


} // END Class

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of a comment to mark the end of your class.

}


func passengerAlerts() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but this function has an extra level of indentation that isn't needed. The further you can keep stuff to the left, the less chance you have of line wrapping.

Comment on lines +153 to +167
for departure in departureBoard.departureFlights {

var time = ""
var terminal = ""

if let departureTime = departure.departureTime {

time = dateFormat.string(from: departureTime)
}

if let terminalNum = departure.terminal {
terminal = "\(terminalNum)"
}
print("\nDestination \(departure.airport.destination) \nAirline: \(departure.airline) Flight: \(departure.flightNumber) Departure Time: \(time) Terminal: \(terminal) Flight Status: \(departure.fightStatus)")
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of variables that are providing default values in case you can't unwrap the optionals. Very good approach.

Comment on lines +239 to +245
// Number Formatter stretch!
let usCurrencyFormatter = NumberFormatter()
usCurrencyFormatter.numberStyle = .currency
if let price = usCurrencyFormatter.string(from: NSNumber(floatLiteral: tripOne))
{
print(price)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work figuring out the number formatter!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants