NEW: Join my free 100 Days of SwiftUI challenge today! >>

Rearrange the Lines

1/10: This code should create two classes, then print a message when composing an opera.

Make sure you place the subclass after its parent.

class OperaComposer: Composer {
class Composer {
let verdi = OperaComposer()
	override func composeMusic() {
		print("Here's some music I wrote.")
	func composeMusic() {
		print("Here's an opera I wrote.")

Click here to start again

Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code