Spread Knowledge

Virtual University of Pakistan Video Lectures, Handouts, PPT, Quizzes, Assignments & Papers

CS605 - Software Engineering II - Lecture Handout 43

User Rating:  / 1

Related Content: CS605 - VU Lectures, Handouts, PPT Slides, Assignments, Quizzes, Papers & Books of Software Engineering II

Moving the amount calculation

As I look at amountOf, I can see that it uses information from the rental, but does not use information from the customer. This method is thus on the wrong object, it should be moved to the rental. To move a method you first copy the code over to rental, adjust it to fit in its new home and compile.

Read more: CS605 - Software Engineering II - Lecture Handout 43

CS606 - Compiler Construction - Lecture Handout 40

User Rating:  / 0

Related Content: CS606 - VU Lectures, Handouts, PPT Slides, Assignments, Quizzes, Papers & Books of Compiler Construction

Example: consider, the boolean expression

a < b or c < d and e < f

Recall the syntax directed translation for the production

E → id1 relop id2
{
E.truelist = makelist(nextquad());
E.falselist = makelist(nextquad()+1);
emit(‘if’ id1 relop id2 ‘goto _’) ;
emit(‘goto _’ );

Read more: CS606 - Compiler Construction - Lecture Handout 40