ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Scripts >> JavaScript
 
 


 

 
 PHP interview questions  PHP Interview Questions (659)
 ASP interview questions  ASP Interview Questions (251)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (175)
 VB Script interview questions  VB Script Interview Questions (343)
 JSP interview questions  JSP Interview Questions (100)
 Shell Script interview questions  Shell Script Interview Questions (158)
 Python interview questions  Python Interview Questions (5)
 Tcl interview questions  Tcl Interview Questions (19)
 Awk interview questions  Awk Interview Questions (6)
 AJAX interview questions  AJAX Interview Questions (24)
 Ruby on Rails interview questions  Ruby on Rails Interview Questions (21)
 Scripts AllOther interview questions  Scripts AllOther Interview Questions (48)
Define an interface MilitaryPower that has the following
properties:
	The interface has two public static final variables which
are the finite x and y coordinate (i.e. the distance of the
objects should not exceed these values. These values set to 100.
	The interface has a method move that moves the military
power objects to the target value. The method will be
implemented by the other classes. The return type should be
void.
B) Define an enum class Direction which contains the
directions (EAST, WEST, SOUTH, NORTH).
C) Define a concrete class Tank that implements
MilitaryPower, has the following properties:
	XCoordinate (Integer), YCoordinate (Integer) are the
instance variables for this class.
	All instance variables should be private.
	Write a parametered constructor that takes two parameters
assigning with the instance variables.
	Write a set and get method each of the instance variables.
	Write a method move that takes two parameters. One of them
is distance which type is integer. Another is direction
which type Direction. The method should to the following:
o	If the direction is EAST, set the x-coordinate with adding
distance.
o	If the direction is WEST, set the x-coordinate and
subtract distance from x-coordinate.
o	If the direction is SOUTH, set the y-coordinate with
adding distance.
o	If the direction is NORTH, set the y-coordinate and
subtract distance from x-coordinate.
	Write a method toString to display the tank coordinates.

D) Define an array holding 10 MilitaryPower objects, all of
them being a Tank. Then display each of the object
information on the screen. (display its movements  and
coordinates). 


No Answer is Posted For this Question

Be the First to Post Answer

 
 
 
Other JavaScript Interview Questions
 
  Question Asked @ Answers
 
WHAT IS .NET?   1
How do you send a message to the browser in JavaScript? Four-soft 3
why array is called the collection of similar datatypes?   1
how to disable source option at view menu in browser like internet explorer...mozilla...etc..pls help me...   2
What is negative infinity? Satyam 2
1) How can we use java script in testing the application? 2) What all the things(Software application - like browser, notepad) we need to learn Jscript?   1
what is runnable interface   1
what is difference between client side scripting and server side scripting? NIIT 6
I have a report which has id as hyperlink.when i click the id it should move to next report which displays the corresponding details.tell me how to get the value of hyperlink(which id is clicked) dynamically using javascript? so that i can make condition on my second report?   2
What is the difference between programing language and scripting language.? Reliance 3
Write the code to maximize an image using javaScript? Infosys 2
how to run java script program   1
 
For more JavaScript Interview Questions Click Here 
         


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com