100% found this document useful (1 vote)
792 views2 pages

Direct Entry Sample Exam

This document provides a sample exam for direct entry into the Master of Science in Computer Science program at Maharishi University of Management. The exam contains 5 questions testing Java programming skills, data structures, recursion, and limiting object creation.

Uploaded by

abebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
792 views2 pages

Direct Entry Sample Exam

This document provides a sample exam for direct entry into the Master of Science in Computer Science program at Maharishi University of Management. The exam contains 5 questions testing Java programming skills, data structures, recursion, and limiting object creation.

Uploaded by

abebe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

10/13/2016

DirectEntrysampleexam

Computer Professionals Program


MASTER OF SCIENCE IN COMPUTER SCIENCE
M A H A R I S H I
HOME

U N I V E R S I T Y

PROGRAMSTRUCTURE

ProgramStructure
Overview
Programoptions
Entrytracks

O F

M A N A G E M E N T ,

FINANCIALAID

DONATE

CONTACT

U S A

REQUIREMENTS

VIDEOS

NEWSLETTER

SEARCH

FACULTY

CAMPUSLIFE

SampleQualifyingExamforDirectEntry
Track

APPLYONLINE

ThisexamispostedforprospectivestudentsoftheMasterofScienceinComputerScience
ProgramatMaharishiUniversityofManagement(ComputerProfessionalsProgram).Inorderto

PreparatoryTracksample

qualifyfortheDIRECTENTRYtrack,incomingstudentsmustpassanexamsimilartotheone

exam

givenbelowuponarrivalattheUniversity.Ifstudentsarenotabletopassthisexam,theymay

DirectEntrysampleexam

enterthePREPARATORYTRACKonlyiftheypassthePREPARATORYTRACKEXAM.Actualexam

Onecoursepermonth

questionswilldifferfromthosebelow.Thesampleexamsarepostedhereinordertohelp
prospectivestudentsassesstheirreadinessforstudyintheprogram.

Coursesoffered
PaidtrainingataU.S.company
Companiesthathavehiredstudents
Preparingforapracticaltrainingjob
Careercounseling
FAQ

1.[TestsproblemsolvingandalittlebitofJavalanguage]WriteaJavamethod
removeDuplicatesthatremovesallduplicatesinagivenlist.Assumethefollowing:
a.ThemethodacceptsanobjectoftypeList
b.Thereturntypeofthemethodisvoid
c.Duplicatesaredeterminedusingtheequals()method(ratherthanby
the==operator)

Testimonials

YourimplementationofremoveDuplicatesshouldhandle,inanappropriateway,the

CombinedB.S.andM.S.program

caseinwhichanullListispassedintothemethod.

Outstandinggraduates

Testyourmethodbywritingcodeinamainmethod,whichdoesthefollowing:

Mission
Learningoutcomes

a.ItcreatesaninstanceofListandloadsitwiththefollowingString
values:{good,better,best,best,first,last,last,
last,good}
b.ItinvokestheremoveDuplicatesMethod,passinginthisinstanceof
List
c.Itoutputsthemodifiedlisttotheconsole
2.[TestsJavalanguageandprobsolving]WriteaJavamethodtestForSumwhich
determineswhetheragivenarrayofintegerscontainsthreeentrieswhosesumisequaltoagiven
integer.Assumethefollowing:
a.ThemethodacceptsanarrayintArrofintsandaninttestIntasitstwo
arguments
b.Thereturntypeofthemethodisboolean
c.Themethodreturnstrueifandonlyiftherearedistinctintegersi,j,ksuchthat
intArr[i]+intArr[j]+intArr[k]equalstestInt.
Testyourmethodinamainmethod,whichpassesthefollowinginputvalues
{5,1,23,21,17,2,3,9,12},22
intothemethodtestForSum,andwhichoutputsthereturnvaluetotheconsole.
3.[Testsknowledgeofdatastructures]Createyourownlinkedlist(donotuseanyofthe
classesprovidedintheCollectionsAPI).Implementthefollowingtwooperations:
Ifyouareusingjdk1.4orbefore:
voidadd(Objectob)
booleanfind(Objectob)

http://mscs.mum.edu/programstructure/entrytracks/directentrysampleexam.html

WeareofflineSendusanemail

1/2

10/13/2016

DirectEntrysampleexam
StringtoString()
Ifyouareusingj2se5.0andyouknowgenericprogramming:
voidadd(Tob)
booleanfind(Tob)
StringtoString()
ThetoStringmethodshouldarrangetheelementsofthelistinacommaseparated
sequence,inthefollowingformat:
[elem0,elem1,elem2,,elemN]
Testyourlinkedlistinamainmethodwhichdoesthefollowing:
a.CreatesaninstanceofyourlistandaddsthefollowingStringstoit:
Straight,Bent,Equals,Well,Storm
b.UsesyourfindfunctiontosearchforthekeysWellandStrength
c.Outputsboththeinputlistandthesearchresultstotheconsoleand
outputtheresultstotheconsolebyrepeatedlyusingyouraddfunction
topopulateanewinstanceofyourlinkedlistwithStrings,andthen
outputtingtoconsolethebooleanresultofsearchingforsomeStringin
thislist.
4.[Testsbasicknowledgeofrecursion]WritearecursivestaticJavamethodthatacceptsan
arrayarrofintegersargumentreturnsalistofallpermutationsoftheseintegers.
(Apermutationofasequenceofintegersisarearrangementoftheintegers.For
example,onepermutationof1,3,4,8,2is3,1,2,8,4.)Forthisproblem,you
mayassumethattheinputarraycontainsnoduplicateentries.Yourmethodshould
returnanArrayListofintarrays.
Next,testyourmethodusingamainmethodthemainmethodshouldpassinthe
followingarray:[1,5,4,2]then,itshouldprinttotheconsoletheresultinglistof
permutations.
5.[Testsknowledgeofconceptofstatic]CreateaJavaclassthatallowsatmost5instances
ofitselftobecreated.CallyourclassJustFive.Provideamainmethodinyourclassthatattempts
tocreate6instancesofyourclass.

BACKTOTOP

COPYRIGHTANDSERVICEMARKNOTICE
SiteMap

WeareofflineSendusanemail

http://mscs.mum.edu/programstructure/entrytracks/directentrysampleexam.html

2/2

You might also like