Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you explain how to this hw question 1. (10 pts) When the ea? function in Scheme is used for comparing symbols it must return

image text in transcribedcan you explain how to this hw question

1. (10 pts) When the ea? function in Scheme is used for comparing symbols it must return # t if and only if the the two symbols have the same name (where uppercase and lowercase characters are not distin- guished). E.g. (eg? (eg? (eg? ,x , x) returns#t ,x , X) returns#t ,x ,y) returns#f With our current implementation, the parser constructs a new Ident object for every occurrence of a symbol. For comparing symbols, it is, therefore, necessary to use string comparison for comparing the names stored in these Ident objects. Explain, how you would modify your processing of symbols (data structure, lexical analysis, and parsing), so that eq? could be implemented using simple pointer comparison, i.e., using-in C#, C++, or Java. 2. (10 pts) Suppose, we need to debug somebody else's program. We suspect that there is a problem with the method wizbang ) in class Widget or with how that method is called. We cannot modify class Widget, nor can we modify the client code that contains the calls to Widget.wizbang (), since we don't have those sources. However, we can modify the code where Widget objects are created and we can create new classes In order to better understand what this method does, we would like to print the values of the parameters and the return value into a log file every time Widget.wizbang) is called. Explain, how you would produce this log file given the constraints that neither class Widget nor the client can be modified

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions