Page 1/2The Java version of the placement exam covers the following topics:Control structures: if statements, switch statement, for , while and do...while loops.Simple and multi-dimensional...

1 answer below »


Course taught in JAVA (Course ID; NYU CSCI-UA 101).








This placement exam is 55~75 minutes (online) and the assignment slot will open on my school account once I send the email saying I'm ready to take the exam.













Please communicate with me personally so we can discuss the details and login info.












This exam will have MCQ and write your own short program questions.




Page 1/2 The Java version of the placement exam covers the following topics: Control structures: if statements, switch statement, for , while and do...while loops. Simple and multi-dimensional array Object oriented design class design and use encapsulation reference and object manipulation static vs. instance data fields and methods arrays of objects inheritance and polymorphism abstract classes Exception handling File I/O Interfaces Students should also be familiar with the basic Java classes like String , Scanner , ArrayList , File , wrapper classes ( Integer , Float , Character ) and the Comparable interface. Reference: any book on Java programming and object oriented design. Sample Questions for the Java Placement Exam 1. Show the output of the following code: publicclassTest{ publicstaticvoidmain(String[]args){ int[]a={1,2}; swap(a[0],a[1]); System.out.println(a[0]+""+a[1]); } publicstaticvoidswap(intn1,intn2){ inttemp=n1; n1=n2; n2=temp; } } 2. What is the output of running the class C. publicclassC{ publicstaticvoidmain(String[]args){ Objecto1=newA(); Objecto2=newB(); System.out.print(o1); System.out.print(o2); } } classAextendsB{ publicStringtoString(){ return"A"; } } Sample Placement Exams for Placement out of CSCI-UA.101: Topics Covered by the Java Placement Exam Page 2/2 classB{ publicStringtoString(){ return"B"; } } 3. Write a Java class Point that represents (x,y) point in a plane. The class should implement Comparable interface. The points should be compared based on their distance from the origin (point (0,0)). The distance from the origin can be computed using distance= $$\sqrt{x^{2}+y^{2}}$$. Your class should implement all methods needed for the following code to compile and run successfully: Randomr=newRandom; Point[]myPoints=newPoint[10]; for(inti=0;i< mypoints.length;="" i++)="" mypoints[i]="new" point(r.nextdouble(),="" r.nextdouble()="" );="" arrays.sort(mypoints);="" you="" do="" not="" need="" to="" provide="" any="" additional="" methods.="" 4.="" write="" a="" method="" that,="" given="" an="" array="" of="" circle="" objects,="" sorts="" the="" circles="" from="" smallest="" to="" largest.="" assume="" that="" the="" circle="" class="" is="" defined="" as="" follows:="" public="" class="" circle="" {="" private="" float="" radius;="" public="" circle="" (="" float="" r="" )="" {="" if="" (r="">=0)radius=r; elseradius=1; } publicfloatgetRadius(){ returnradius; } publicintcompareTo(Circlec){ if(radius==c.radius)return0; elseif(radius
Answered 2 days AfterNov 09, 2022

Answer To: Page 1/2The Java version of the placement exam covers the following topics:Control structures:...

Vikas answered on Nov 12 2022
51 Votes
The online Quiz is done.
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here