This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.rmi.NotBoundException; | |
import java.rmi.Remote; | |
import java.rmi.RemoteException; | |
import java.util.Scanner; | |
public class ChatClient { | |
private static Scanner in = new Scanner(System.in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class Node { | |
var data: Int | |
var next: Node? | |
init(data: Int) { | |
self.data = data | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
protocol AdvancedArithmetic { | |
func divisorSum(_ n: Int) -> Int | |
} | |
class Calculator: AdvancedArithmetic { | |
func divisorSum(_ n: Int) -> Int { | |
var result = n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class Player: Comparable { | |
var name: String | |
var score: Int | |
init(name: String, score: Int) { | |
self.name = name | |
self.score = score |