Question
7. A company wishes to develop a Java program, call it footest that is input an arbitrary Java program 1 and outputs as its first
7. A company wishes to develop a Java program, call it footest that is input an arbitrary Java program 1 and outputs as its first output whether the input programs first line of output is foo called. Thus, footest analyzes its input program and determines whether that program outputs whether it prints out foo called in its first line of output or not. If it does it prints out on (1Assume there is no input to this program) its first output line Yes and if it does not it prints out No on its first output line. Now footest is slightly modified to print foo callednstead of No. Prove that such a program cannot exist by looking at what this tester program would do on itself. Assume as mode of operation that footester reads its entire program input by storing it in an arraythe tester then does its work, but then on the stored program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started