You are required to implement design patterns using an IDE such as Eclipse. Tasks are following:
• Setup of a project with version control. develop a small application that implements a few examples of
creational, structural and behavioral design patterns.
• Evaluate the use of design patterns for the given purpose specified. Discuss trade-offs/consequences by
applying design patterns.
Note: You must submit a report and full examples code.
extension Expression {
func parenthesize(_ s: String) -> String
var isOperatorCall: Bool { get }
func asRuby(depth: Int = 0) -> String {
switch kind {
case .bare: { }
case .call:
if isOperatorCall { }
else { }
case .functionDefinition: { }
case .empty: { }
case .variableDeclaration: { }
case .conditional:
guard c.count == 3 else { }
let c = chd[0]
let pos = chd[1]
let neg = chd[2]
{ }
}
}
}
Comments
Leave a comment