WEEK 6
Due Monday 4th November
Section 1
Time: 8:00 AM
Monday 4th November
Discuss the impact of programming style on the performance of Scheme
Find information on G++ Malloc by Doug Lea. Explain how it handles issues like memory management, speed, locality, fragmentation, etc.
Section 2
Time: 9:05 AM
Monday 4th November
Compare the overloaded and polymorphism method in C/C++ and Java.
If necessary, ask the instructor for advice on this topic.
allocated variables. Some languages, like Fortran, do not
allow dynamic allocation.
Discuss how this restriction affects writability, program
flexibility, and other issues
important to a programmer.
Section 3
Time: 10:10 AM
Monday 4th November
Devise a test to show the efficiency increase of using CASE/SWITCH statements as compared to using normal if-then-else statements. Provide these results, along with an explanation of the experiment, for discussion. Various ways can be used to show the disparity better, while some ways would actually exaggerate or minimize the findings. Be prepared to discuss your methodology as well.
Discuss BNF and EBNF and their differences. How can we translate an EBNF into a BNF?
Section 4
Time: 11:15 AM
Monday 4th November
Discuss overloading and polymorphism in Java. Be sure to
talk about how the <extends> and <implements> are used within
these. If necessary, see the instructor for advice on this topic.
Read section 7.7.3 of the textbook. Discuss garbage collection , reference counts and mark-and-sweep collection as presented there.
Sourbeer Jason S
Find a BNF description of Java’s syntax. Show that the Java syntax for the if-statement eliminates any ambiguity. That is, draw the parse tree of the following program skeleton (but now using Java’s correct syntax).
if (C1) if (C2) S1; else S2;
And argue that no other parse tree can be found using the Java BNF rules. Compare this syntax approach to C and Ada.