Skip to content

Commit

Permalink
Some bootcamp general swift files
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolozCh committed Jun 15, 2022
1 parent 9a9fa14 commit 8e5e0f4
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 0 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Foundation

let playerOne = Player(name: "Messi", salary: 20_000)

print(playerOne)

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Foundation

public class Player {
let name: String?
var salary: Int
private(set) var clubName: String
let yellowCardsCount = 0

public init(name: String, salary: Int) {
self.name = name
self.salary = salary
}
}

class Club {
let players = [Player]()

func showSalaryOfFirstPlayer() {
print(players.first!.salary)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Foundation


Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ struct Player {
let footballPlayer = Player(name: "gela", surname: "namoradze")
print(footballPlayer.toString())


2 changes: 2 additions & 0 deletions Swift Basics.playground/contents.xcplayground
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
<pages>
<page name='Computed Properties'/>
<page name='Property Wrapper'/>
<page name='Access Control'/>
<page name='Extensions'/>
</pages>
</playground>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Swift Basics (Playground).xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

0 comments on commit 8e5e0f4

Please sign in to comment.