Die Suche ergab 61 Treffer

von imaier
1. Feb 2014 06:44
Forum: Archiv
Thema: Ex09: Splitting the visitor?
Antworten: 4
Zugriffe: 851

Re: Ex09: Splitting the visitor?

That depends on where you decide to put the traversal code. The solution on the sheet is merely a hint what you could do (when you put it into the accept methods exclusively). You are open to do it differently, as long as it sticks to one of the common visitor variations. Michael posted a link to th...
von imaier
31. Jan 2014 15:03
Forum: Archiv
Thema: ex09 billprinter questions
Antworten: 1
Zugriffe: 286

Re: ex09 billprinter questions

The total price is enough. There is no answer for the calories modifier, since it is left open in the task (it's very much a question of how much of a topping you'll get get when you order a family pizza). Leave a comment what you chose or what's possible in your implementation.

Cheers,
Ingo
von imaier
29. Jan 2014 13:59
Forum: Archiv
Thema: Ex08 - "object internedSymbols" in "Symbol.scala"
Antworten: 1
Zugriffe: 381

Re: Ex08 - "object internedSymbols" in "Symbol.scala"

Okay, that gets too complicated. To make it more explicit, do NOT look at classes/objects/traits that inherit from things in scala.collection.jcl. Moreover: only look at PUBLIC classes/objects/traits. Both of these requirements will exclude internedSymbols, which is package private (private[scala])....
von imaier
28. Jan 2014 17:54
Forum: Archiv
Thema: Ex08 - Question to "All classes and traits"
Antworten: 2
Zugriffe: 454

Re: Ex08 - Question to "All classes and traits"

We are not talking about class *files* but classes. Please notice the difference. So your point 2 does not apply. Look at inner classes and classes in objects only if they are part of the Iterable hierarchy or otherwise play part in a pattern that involves a (immediate or transitive) subclass of Ite...
von imaier
23. Jan 2014 17:39
Forum: Archiv
Thema: Exercise 8 -- Do not commit source code
Antworten: 0
Zugriffe: 244

Exercise 8 -- Do not commit source code

Please do not commit the source code of the Scala 2.7 library to the SVN. A single PDF with your answers is enough.

Thank you,
Ingo
von imaier
17. Dez 2013 15:47
Forum: Archiv
Thema: Question on snapshot and toggle methods in dependecy graphs
Antworten: 1
Zugriffe: 528

Re: Question on snapshot and toggle methods in dependecy gra

As discussed elsewhere on this forum, there are actually four kinds of dependencies: a dependency that is active either temporarily or permanently. Each of these dependencies can be either -- well, let's call them -- reactive as sig in Signal { sig() } or only a value dependency as sig in Signal { s...
von imaier
17. Dez 2013 10:39
Forum: Archiv
Thema: Question on MouseReleasedE
Antworten: 5
Zugriffe: 683

Re: Question on MouseReleasedE

Yes, there is a count method. I did not say that you should not use it. I was concerned about the terminology that was used earlier in this thread. I was afraid that there was a rather severe misunderstanding of what signals and events are. To be clear: an event does not *have* a count signal, but y...
von imaier
16. Dez 2013 22:28
Forum: Archiv
Thema: Question on MouseReleasedE
Antworten: 5
Zugriffe: 683

Re: Question on MouseReleasedE

I don't understand your question. Mouse.mouseReleasedE is an event, not a signal. It also does not "have a count Signal", so how could it change it? The values of the event are moreover of type Point, so there is no place to put an event count. That being said, if you want to count event occurrences...
von imaier
16. Dez 2013 22:22
Forum: Archiv
Thema: Short question on collision detection for paddles
Antworten: 2
Zugriffe: 407

Re: Short question on collision detection for paddles

I don't really care, but I think the easiest solution actually does bounce in both directions. -- Ingo
von imaier
13. Dez 2013 18:16
Forum: Archiv
Thema: Dependency Graphs
Antworten: 1
Zugriffe: 469

Re: Dependency Graphs

For getVal dependencies, please use a different edge style than for other dependencies or put a getVal next to the edge. For your second example, I don't see the problem: y depends on x, and you have one y and one x per instance of SignalDependent. That should make clear how your dependency graph wi...
von imaier
13. Dez 2013 12:29
Forum: Archiv
Thema: Ex 07: later & trueOrFalse
Antworten: 2
Zugriffe: 589

Re: Ex 07: later & trueOrFalse

Please read the exercise description again. They are not for your stopwatch implementation, but for the last exercise.

Cheers,
Ingo
von imaier
3. Dez 2013 18:32
Forum: Archiv
Thema: Ex05 - Unavoidable redundancy at a certain point?
Antworten: 3
Zugriffe: 1100

Re: Ex05 - Unavoidable redundancy at a certain point?

If it's only a constructor without much logic, that's totally fine. On a related note, notice that the following is legal as I explained during the exercise session: trait A { type T <: TT trait TT } trait B extends A{ class T extends super.TT { // my impl... } } Once you make T concrete, you can di...
von imaier
2. Dez 2013 22:10
Forum: Archiv
Thema: Ex05 - Unavoidable redundancy at a certain point?
Antworten: 3
Zugriffe: 1100

Re: Ex05 - Unavoidable redundancy at a certain point?

I am not sure I understand what you mean by redundancy here. Do you maybe mean code duplication or verbosity? There is a certain amount of verbosity when using the cake pattern as in the home automation example, but you should not need to duplicate method implementations, for example. Sometimes you ...
von imaier
2. Dez 2013 21:45
Forum: Archiv
Thema: Ex 05 - The Card Layer
Antworten: 1
Zugriffe: 500

Re: Ex 05 - The Card Layer

Of course you are allowed to create additional traits, but keep in mind that your design should be simple. In many card games, cards are ordered. I am not sure you need an ordering for the common rules of Mau Mau, but you could use it for one of your custom instances.

Cheers,
Ingo

Zur erweiterten Suche