11.07.2015 Views

Sample Exam Paper Answers (pdf format)

Sample Exam Paper Answers (pdf format)

Sample Exam Paper Answers (pdf format)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CS2200 Software Development<strong>Sample</strong> Solutions to <strong>Sample</strong> <strong>Exam</strong> Questions2008Q1.(i) 2(ii)(iii)(iv)(v)(vi)(vii)(viii)(ix)(x)(xi)OnePrints EqualThe class keyword is missingApplets run in Web browsers and don’t have access to system resources such as thefile system unlike Applications.interface Bankable{public deposit(Object o);public Object withdraw();}NoEncapsulation or In<strong>format</strong>ion Hiding: process of hiding all the details of an objectthat do not contribute to its essential characteristics. Java has a very generalencapsulation/protection mechanism with public, private and protected membersunkowngetAddress should have a return type of String.super(make) should be first line in Car constructor(xii) page.fillOval(15, 25, 35, 45);(xiii)(xiv)(xv)JOptionPane.showMessageDialog(null, null, "Finished", "In<strong>format</strong>ion",JOptionPane.PLAIN_MESSAGE);1) WindowListener; 2)windowClosingFlow Layout


Q2(i).Enter Painting Info:Get info from Dealer or Collector.Connect to DatabaseThe following in<strong>format</strong>ion is stored about a painting: title, artist, date painted,date purchased, classification (masterpiece, masterwork, other), medium (oil,tempura, watercolour, other).Q2.(ii)Candidate List of Objects: Osbert, Art Dealer, Art Collector, Painting, Artist, Estimate,Database, QueryMerge Dealer and CollectorEliminate Artist – store as attribute of PaintingEliminate Database – implicit in design


foto's; steunkleur).AuteursJ. Aarts en H. RijksenUitgeverDamonPostbus 2235680 AE BestTelefoon 04998 - 95534HANDEL-WIJSInhoud en uitvoeringDe methode Handelwijs (bedoeld voor de sector economie) kent de volgende module-opbouw:Module 1 Wat is een levensbeschouwing? (basismodule)Module 2 Wat is ethiek? (basismodule)Module 3 Bedrijfsethiek (inleiding)Module 4 Bedrijfsethiek in de praktijkModule 5 Thema 'Natuur en milieu'Module 6 Thema 'Derde Wereld'Modulen 3 en 4 vormen samen met basismodule 2 over ethiek het hart van een leerroutebedrijfsethiek. Modulen 5 en 6 zijn thematische modulen met een levensbeschouwelijk enethisch perspectief; ze veronderstellen de beide basismodulen.De leerroute bestaat uit een docentenboek en leerlingenboek.AuteurJ. de LeeuwUitgeverDamonPostbus 2235680 AE BestTelefoon 04998 - 95534ETHIEK EN LEVENSBESCHOUWING VOOR MBO (AGRARISCH)Inhoud en uitvoeringDeze methode is ontwikkeld voor het middelbaar agrarisch onderwijs, en kent de volgendemodulenstructuur:Module 1 Wat is een levensbeschouwing? (basismodule)Module 2 Wat is ethiek? (basismodule)Module 3 Beroeps- en bedrijfsethiek: theorie en praktijkModule 4 Thema 'Bedrijf en milieu'Module 5 Thema 'Genetische manipulatie'Module 6 Thema 'Derde Wereld'De methode bestaat uit een leerlingenboek en een docentenboek.AuteurJ. de LeeuwDamon UitgeverPostbus 223


Q5.(i)Spiral Model is a risk-oriented software life cycle. Each spiral addresses major risksthat have been identified.Advantages over Waterfall: Allows iterative develioment Produces prototype that the customer can see early in lifecycle Includes risk assessment5.(ii)Advantage of library code reuse: Reuse saves time Library code is probably well-tested Leads to conformity – makes code easier to read5.(iii)The Java Virtual Machine or JVM is a virtual machine that runs Java byte code.Programs intended to run on a JVM must be compiled into a standardized portablebinary <strong>format</strong> called bytecode which typically comes in the form of .class files. Thisbinary is then executed by the JVM runtime by interpreting it.5.(iv)Interfaces are group of related methods with empty bodies.


5.(v)Exception Handling is a general mechanism for handling or ignoring errors andexceptions in a programming language. Exceptions can be thrown and then caughtsomewhere else.try {zone = code.charAt(9); // can throw an exception}catch (StringIndexOutOfBoundsException exception) {System.out.println ("Improper code length: " + code);}5.(vi)A package groups related classes, interfaces and sub-packages. Every class is part ofsome package. <strong>Exam</strong>ple: java.math contains useful mathematical routines.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!