DOC PREVIEW
UB CSE 115 - sample exam solved

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Unit%Exam%#1% CSE115%Introduction%to%Computer%Science %I% Spring%2016%%1%%!EXAMINATION%INSTRUCTIONS%%NAME:%___________________________%%PERSON%NUMBER:%___________________________%%SIGNATURE:%___________________________%%This%examination%has%6%pages.%Check%that%you%have%a%complete%paper.%Each%candidate%should%be%prepared%to%produce,%upon%request,%his%or%her%SUNY/UB%card.%This%examination%has%5%questions.%Answer%all%questions.%You$have$60$minutes$to$complete$this$examination.$$Use$your$time$accordingly.$%READ%AND%OBSERVE%THE%FOLLOWING%RULES:%%► Names%are%pre-printed%on%the%exam%booklets.%%Ensure%that%you%have%YOUR%exam.%► Sign,%using%your%usual%signature,%in%the%space%provided%on%the%back%cover.%► All%of%your%writing%must%be%handed%in.%This%booklet%must%not%be%torn%or%mutilated%in%any%way,%and%must%not%be%taken%from%the%examination%room.%► Show% all%of% your%work% in%arriving%at% an%answer,% unless%instructed%otherwise.% Partial% credit%will%be%awarded%as%appropriate.%► Candidates%are%not%permitted%to%ask%questions%of%the%invigilators,% ex cep t% in% ca ses % of% su pp os ed %errors%or%ambiguities%in%examination%questions.%► CAUTION% –% Candidates% guilty% of% any% of% the% following,% or% similar,% dishonest% practices% shall% be%imme d iat ely %d ismissed%from %th e%e x amination%and %s h all%b e %lia ble%to%disciplinary%action.%♦ Making% use% of% any% books,% papers% or% memoranda,% calculators% or% computers,% audio% or%visual% cassette% players,% or% other% memo ry% aid% d evices,% other% than% those% explicitly%authorised%by%the%examiners.%♦ Speaking%or%communicating%with%other%candidates.%♦ Purposely%exposing% w ritten%p apers% to%the%view%of%other% ca ndidates.%The%p lea% of%accident%or%forgetfulness%shall%not%be%received.%%---------------------------%DO%NOT%WRITE%BELOW%THIS%LINE!%---------------------------%%Q1%Q2%Q3%Q4%Q5%TOTAL%%$/10%/10%/10%/10%/10%/50%/100$%! !Unit%Exam%#1% CSE115%Introduction%to%Computer%Science %I% Spring%2016%%2%%Question!1![10!points,!2!points!each] The code given below is correct: it compiles without errors. Circle, and identify by number, one and only one example of each of the following items in the code below. If you believe no example exists, write “no example” next to that item in the list. To show you how I want the question answered, the first one is done for you. 1. access control modifier 2. expression 3. class body 4. fully qualified name 5. argument 6. assignment statement package part1; public class Farm { private example1.BarnYard _yard; public Farm() { _yard = new example1.BarnYard(); } public void addOneMovingChicken() { example1.Chicken c = new example1.Chicken(); _yard.addChicken(c); c.start(); } public void addOneMovingPig() { example1.Pig p = new example1.Pig(); _yard.addPig(p); p.start(); } public void addOneMovingButterfly() { example1.Butterfly b = new example1.Butterfly(); _yard.addButterfly(b); b.start(); } }!!1$Unit%Exam%#1% CSE115%Introduction%to%Computer%Science%I% Spring%2016%%3%%Question!1![10!points,!2!points!each] The code given below is correct: it compiles without errors. Circle, and identify by number, one and only one example of each of the following items in the code below. If you believe no example exists, write “no example” next to that item in the list. To show you how I want the question answered, the first one is done for you. 1. access control modifier 2. expression 3. class body 4. fully qualified name 5. argument 6. assignment statement package part1; public class Farm { private example1.BarnYard _yard; public Farm() { _yard = new example1.BarnYard(); } public void addOneMovingChicken() { example1.Chicken c = new example1.Chicken(); _yard.addChicken(c); c.start(); } public void addOneMovingPig() { example1.Pig p = new example1.Pig(); _yard.addPig(p); p.start(); } public void addOneMovingButterfly() { example1.Butterfly b = new example1.Butterfly(); _yard.addButterfly(b); b.start(); } }!!1$Unit%Exam%#1% CSE115%Introduction%to%Computer%Science%I% Spring%2016%%4%%Question!1![10!points,!2!points!each] The code given below is correct: it compiles without errors. Circle, and identify by number, one and only one example of each of the following items in the code below. If you believe no example exists, write “no example” next to that item in the list. To show you how I want the question answered, the first one is done for you. 1. access control modifier 2. expression 3. class body 4. fully qualified name 5. argument 6. assignment statement package part1; public class Farm { private example1.BarnYard _yard; public Farm() { _yard = new example1.BarnYard(); } public void addOneMovingChicken() { example1.Chicken c = new example1.Chicken(); _yard.addChicken(c); c.start(); } public void addOneMovingPig() { example1.Pig p = new example1.Pig(); _yard.addPig(p); p.start(); } public void addOneMovingButterfly() { example1.Butterfly b = new example1.Butterfly(); _yard.addButterfly(b); b.start(); } }!!1$Unit%Exam%#1% CSE115%Introduction%to%Computer%Science %I% Spring%2016%%5%%Question!1![10!points,!2!points!each] The code given below is correct: it compiles without errors. Circle, and identify by number, one and only one example of each of the following items in the code below. If you believe no example exists, write “no example” next to that item in the list. To show you how I want the question answered, the first one is done for you. 1. access control modifier 2. expression 3. class body 4. fully qualified name 5. argument 6. assignment statement package part1; public class Farm { private example1.BarnYard _yard; public Farm() { _yard = new example1.BarnYard(); } public void addOneMovingChicken() { example1.Chicken c = new example1.Chicken(); _yard.addChicken(c); c.start(); } public void addOneMovingPig() { example1.Pig p = new example1.Pig(); _yard.addPig(p); p.start(); } public void addOneMovingButterfly() { example1.Butterfly b = new example1.Butterfly(); _yard.addButterfly(b); b.start(); } }!!1$Unit%Exam%#1% CSE115%Introduction%to%Computer%Science%I% Spring%2016%%6%%Question!1![10!points,!2!points!each] The code given below is correct: it compiles without


View Full Document

UB CSE 115 - sample exam solved

Download sample exam solved
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view sample exam solved and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view sample exam solved 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?