jagomart
digital resources
picture1_Xmut 2016 T1


 138x       Filetype PDF       File size 0.08 MB       Source: ecs.wgtn.ac.nz


File: Xmut 2016 T1
familyname othernames studentid signature intro to computerprogramming finalexam 09january 2017 instructions timeallowed 2hours answerallthequestions thereare 70marks in total write youranswersintheboxesin thistestpaperandhandinallsheets if you think some question is unclear ask for ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
           FamilyName:..............................     OtherNames: .............................
           StudentID:................................    Signature..................................
                     Intro to ComputerProgramming: FinalExam
                                             09January, 2017
             Instructions
                • Timeallowed: 2Hours
                • Answerallthequestions. Thereare 70marks in total.
                • Write youranswersintheboxesin thistestpaperandhandinallsheets.
                • If you think some question is unclear, ask for clarification.
                • Brief Java documentation is provided with the test
                • This test contributes 15% of your final grade
                  (But your mark will be boosted up to your exam mark if that is higher.)
                • Youmayusepapertranslationdictionaries,andcalculatorswithoutafullsetofalpha-
                  bet keys.
                • Youmaywritenotesandworkingonthispaper,butmakesureyouranswersareclear.
             Questions                                                        Marks
             1.  UnderstandingJava                                              [25]
             2.  Files and Arraylists of objects                                [15]
             3.  Writing methodsthat use objects                                [10]
             4.  Arrays and2Darrays                                             [20]
                                                                              TOTAL:
                                                          StudentID: .......................
                                 SPAREPAGEFOREXTRAANSWERS
           Crossoutroughworkingthatyoudonotwantmarked.
           Specify the question number for work that you do want marked.
            Intro to ComputerProgramming(FinalExam)             Page2of15
                                                                                StudentID: .......................
                Question1. UnderstandingJava                                                                [25 marks]
                (a)  [5 marks] Understandingparameterpassingandmethodscalling sequence
                WhatwillbeprintedoutifthemainmethodofthefollowingThingclassiscalled?
                    public class Thing {
                         public Thing() {
                              UI. println ("Initialsing.......");
                         }
                         public void incrementThenAdd(int x) {
                              x++;
                              UI. println ("Value = " + x);
                         }
                         public static void main(String[ ] args) {
                              Thing obj = new Thing();
                              int y = 10;
                              obj.incrementThenAdd(y);
                              UI. println ("Value = " + y);
                         }
                    }
                                                                               (Question1 continuedonnextpage)
                Intro to ComputerProgramming(FinalExam)                                 Page3of15
                                                                            StudentID: .......................
               (Question 1 continued)
               (b)  [5 marks] Understandingloops
               WhatwillbeprintedifthefollowingdoSomethingmethodiscalled?
                   public void doSomething() {
                        for(int i = 0; i< 5; i++) {
                            for(int j = 0; j< 5−i; j++) {
                                 UI.print("X");
                            }
                            UI.print("\n");
                        }
                        UI. println ("done");
                   }
                Intro to ComputerProgramming(FinalExam)                             Page4of15
The words contained in this file might help you see if this file matches what you are looking for:

...Familyname othernames studentid signature intro to computerprogramming finalexam january instructions timeallowed hours answerallthequestions thereare marks in total write youranswersintheboxesin thistestpaperandhandinallsheets if you think some question is unclear ask for clarication brief java documentation provided with the test this contributes of your nal grade but mark will be boosted up exam that higher youmayusepapertranslationdictionaries andcalculatorswithoutafullsetofalpha bet keys youmaywritenotesandworkingonthispaper butmakesureyouranswersareclear questions understandingjava files and arraylists objects writing methodsthat use arrays anddarrays sparepageforextraanswers crossoutroughworkingthatyoudonotwantmarked specify number work do want marked pageof a understandingparameterpassingandmethodscalling sequence whatwillbeprintedoutifthemainmethodofthefollowingthingclassiscalled public class thing ui println initialsing void incrementthenadd int x value static main string arg...

no reviews yet
Please Login to review.