ITI 1121 Final: ITI 1121 University of Ottawa 2018 Final Exam-en

67 views17 pages

Document Summary

Ecole de science informatique et de g enie electrique. Total pages together: write comments and assumptions to get partial marks, beware, poor hand-writing can affect grades, wait for the start of the examination. No part of this document may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without prior written permission from the instructors. Consider the java program below. public class boing { private void boom() { if (true) { throw new runtimeexception("aouch! System. out. println("saved! public void bam() { try { boom(); Finished: the code will not compile, other, explain your answer in the box below. Consider the java code below and answer the questions. public class alpha { public string tostring() { return "alpha"; public class beta extends alpha implements gamma { public void gamma() { System. out. println("gamma"); public string tostring() { return "beta"; public interface gamma { void gamma();