Die Suche ergab 448 Treffer

von eichberg
13. Nov 2017 10:01
Forum: Software Engineering - Design and Construction
Thema: Ex02 - Generic return type
Antworten: 4
Zugriffe: 326

Re: Ex02 - Generic return type

In the original implementation you cannot really store primitive values in the map, they will always be wrapped in Integer objects. In Scala, if you want to constrain the return type of a function to reference types only (see my other post in this forum for further information regarding Scala's type...
von eichberg
13. Nov 2017 09:57
Forum: Software Engineering - Design and Construction
Thema: Exercise 2 Task 2.1
Antworten: 6
Zugriffe: 739

Re: Exercise 2 Task 2.1

Clearly a case of lost documentation on our side. The interdependencies between Context and ReferenceType should have been documented more clearly. In the following you'll see an updated variant of ReferenceType. /** * Representation of a ReferenceType; for example: "java.lang.String". */ public fin...
von eichberg
13. Nov 2017 09:50
Forum: Software Engineering - Design and Construction
Thema: Ex02 Task2.1 Type mismatch error
Antworten: 1
Zugriffe: 307

Re: Ex02 Task2.1 Type mismatch error

There is no cast necessary.All reference types are a subtype of Object and functions are generally co-variant in their return types and contra-variant in their parameter types. BTW 1 - In Java Generics only abstract over reference types and Object is the top-most reference type. BTW 2 -In Scala we h...
von eichberg
11. Nov 2017 07:48
Forum: Software Engineering - Design and Construction
Thema: Questions regarding sbt, ClassNotFoundExceptions and Eclipse
Antworten: 2
Zugriffe: 276

Re: Questions regarding sbt, ClassNotFoundExceptions and Eclipse

HI, as already stated - it is highly recommended and generally also not required to make changes to build.sbt. Things that may help are: - close eclipse (to be precise: close Scala IDE - I highly recommend that you use the preconfigured Scala IDE and do not install the plugins on top of a regular Ec...
von eichberg
10. Nov 2017 12:48
Forum: Software Engineering - Design and Construction
Thema: Still possible to join?
Antworten: 2
Zugriffe: 307

Re: Still possible to join?

You can always join the course; you will just not be able to get the full 100% bonus
von eichberg
9. Nov 2017 09:15
Forum: Software Engineering - Design and Construction
Thema: Ex02 Task 2.1: idsAreUnique
Antworten: 4
Zugriffe: 745

Re: Ex02 Task 2.1: idsAreUnique

This test was originally intended to test that - if we have concurrent access to the „id generator“ - no id is returned twice due to a concurrency bug. However, we explicility dropped the requirement that you should think about concurrency. Therefore „just“ test for the case that there is some (exte...
von eichberg
8. Nov 2017 15:17
Forum: Software Engineering - Design and Construction
Thema: Exercise 2 Task 2.1
Antworten: 6
Zugriffe: 739

Re: Exercise 2 Task 2.1

You should write black-box and not white-box tests :-). In that case you simple don't know how a method such as get is implemented and it would be very well possible (due to an implementation error) that <supplier>get is always evaluated, but we still always get the right (cached!) object. Illegal v...
von eichberg
8. Nov 2017 15:13
Forum: Software Engineering - Design and Construction
Thema: Exercise 2 Task 2.1 - Refactoring
Antworten: 1
Zugriffe: 246

Re: Exercise 2 Task 2.1 - Refactoring

You should write the tests for the existing class then refactor to Scala and then write tests for the Scala version. The problem with the ordering is a typical problem when testing class which have a dependency on a global state. For the first task, you should find a solution for the given code at h...
von eichberg
29. Okt 2017 17:34
Forum: Software Engineering - Design and Construction
Thema: Submission date
Antworten: 1
Zugriffe: 187

Re: Submission date

On Thursday November 2nd, we will have a lecture.

(This has, however, nothing to do with the submission date.)
von eichberg
25. Okt 2017 09:57
Forum: Archiv
Thema: Exam - Change of Time
Antworten: 0
Zugriffe: 629

Exam - Change of Time

The time of the exam has changed:

The final exam will be on Tuesday, Feb. 13., 2018; 16:00-18:00 in S206/030
von eichberg
23. Okt 2017 11:24
Forum: Software Engineering - Design and Construction
Thema: 0-TestYourJava - Cast without exception
Antworten: 1
Zugriffe: 420

Re: 0-TestYourJava - Cast without exception

Well, if you change the declared type of the variable o, the example is surely no longer the same. But – more important - the method cast is not the one that is throwing the class cast exception in your example. If you change the method as follows: private static <T> T cast(Object i) { System.out.pr...
von eichberg
19. Okt 2017 13:41
Forum: Software Engineering - Design and Construction
Thema: Exercises and TUCan registration
Antworten: 2
Zugriffe: 308

Re: Exercises and TUCan registration

Exercise registration and TuCan registration are completely independent of each other; you can sign-up for the exercises without registering for the course in TUCAN
von eichberg
17. Aug 2017 09:43
Forum: Archiv
Thema: Exam Review SS17
Antworten: 5
Zugriffe: 1472

Re: Exam Review SS17

All corrections will become visible only after the second review.
von eichberg
10. Jul 2017 14:46
Forum: Archiv
Thema: Self-Types
Antworten: 2
Zugriffe: 482

Re: Self-Types

Sie können auf der "container" nicht Layout aufrufen, da Container "LayoutEngine" nicht implementiert.... In Ihrem Beispiel haben Sie jedoch bereits "Add" eingemixt - auf der resultierenden Klasse "SomeCalculation with Add" können Sie natürlich alle Methoden aufrufen. Am Einfachsten ist es zu sehen,...

Zur erweiterten Suche