Die Suche ergab 9 Treffer

von emod02
14. Jul 2018 14:35
Forum: Software Engineering - Design and Construction
Thema: Exam Question: Visitor vs. Pattern Matching
Antworten: 1
Zugriffe: 345

Re: Exam Question: Visitor vs. Pattern Matching

Actually I don't know what's your problem, but down here is my solution to this task: Code for the "visitor" object MatchVisitor { def eval(expr: Expr, env: Map[String, Int]): Int = { expr match { case e: Constant => return e.value case e: Var => return env(e.name) case e: Add => return eval(e.left,...
von emod02
9. Jul 2018 09:25
Forum: Software Engineering - Design and Construction
Thema: exam ws16-17 topic 3a
Antworten: 3
Zugriffe: 359

Re: exam ws16-17 topic 3a

Hi,

I have the same result for this task.

Greets
von emod02
8. Jul 2018 17:43
Forum: Software Engineering - Design and Construction
Thema: Lower Type Bound
Antworten: 2
Zugriffe: 243

Lower Type Bound

Hi, I've a question regarding the lower type bound. Given the example of the Scala documentation ( https://docs.scala-lang.org/tour/lower-type-bounds.html ): trait Node[+B] { def prepend[U >: B](elem: U): Node[U] } case class ListNode[+B](h: B, t: Node[B]) extends Node[B] { def prepend[U >: B](elem:...
von emod02
5. Jul 2018 14:15
Forum: Software Engineering - Design and Construction
Thema: Exam open book
Antworten: 1
Zugriffe: 257

Exam open book

Hi,

just to be clear: Open book Exam means here I can bring whatever I want to the Exam, as long as it's on a paper? (obviously no electronic decive etc.)
so e.g. a self created summary would be ok?

Thanks
Dominik
von emod02
3. Jul 2018 15:38
Forum: Software Engineering - Design and Construction
Thema: Exercise 08
Antworten: 4
Zugriffe: 395

Re: Exercise 08

Hello,

Regarding task 2.3: we should implement the "getElementsSorted" method in the "SubGraph", right?

Greets
von emod02
21. Jun 2018 18:13
Forum: Software Engineering - Design and Construction
Thema: Ex 07, short questions
Antworten: 9
Zugriffe: 1028

Re: Ex 07, short questions

Hi, Okay. And we should not mix it up in TComplexUniversity, as I understood it rigth? Then I'm totally lost. :( I have no clue, how I should create an instance of the mixed up traits of the super classes TComplexUniversity and TSimpleUniversity in the ComplexUniversity class. Maybe someone can give...
von emod02
21. Jun 2018 16:46
Forum: Software Engineering - Design and Construction
Thema: Ex 07, short questions
Antworten: 9
Zugriffe: 1028

Re: Ex 07, short questions

Another question regarding task 1.2 with the ComplexUniversity Class. Should the types for Student, CourseOfStudies, Room and Course mix up the methods of both, TComplexUniversity and TSimpleUniversity? So that this code will be possible?: val cUni = new ComplexUniversity val r1 = cUni.Room("Room1",...
von emod02
13. Jun 2018 00:46
Forum: Software Engineering - Design and Construction
Thema: EX06 - Scenario 3
Antworten: 3
Zugriffe: 312

EX06 - Scenario 3

Hi, the method we should annotate as fragile with a violated design principle using the FragileChange Annotion should only be the addAll Method? If so, how should the method definition look like in the @FragileChange annotaion? I mean the name and the return type of @MethodDef are pretty clear. But ...
von emod02
12. Jun 2018 20:28
Forum: Software Engineering - Design and Construction
Thema: "with" operator in SmartHomeExample
Antworten: 1
Zugriffe: 202

"with" operator in SmartHomeExample

Hello, on slide 9 of 5.3 Smart Home Example there is the example where the trait LightsAndShutters are extend Lights with Shutters: trait LightsAndShutters extends Lights with Shutters As far as I understad the with operator right, this create some kind of Mixin relation between LightsAndShutters an...

Zur erweiterten Suche