:: 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                      
Categories >> Software >> Scripts >> JavaScript


 PHP interview questions  PHP Interview Questions (658)
 ASP interview questions  ASP Interview Questions (251)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (174)
 VB Script interview questions  VB Script Interview Questions (338)
 JSP interview questions  JSP Interview Questions (99)
 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
	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
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
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

No Answer is Posted For this Question

Be the First to Post Answer

Other JavaScript Interview Questions
  Question Asked @ Answers
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
i want to display time using hidden variable in a page,but when i click button that page that hidden variable loosing its value.i m sending the code also. <script type="text/javascript" language="javascript"> var tick=0; window.onload = function() { //debugger if(document.getElementById("hdnTicker").value != "") tick = parseInt(document.getElementById("hdnTicker").value); setInterval("Timer()",1000); } function Timer() { //debugger document.getElementById("hdnTicker").value = tick++; //alert(document.getElementById("hdnTicker").value); document.getElementById("lblTimeSpent").innerHTML = "0." + tick; if(tick == 30) { //message or redirect to result window alert('time is out'); //clearTimeout(); } } </script> <form id="form1" runat="server"> <div> <table> <tr> <td> <asp:Label ID="lblTimeSpent" runat="server" Visible="true" ForeColor="Blue" ></asp:Label> </td> <td> <%-- <asp:textbox EnableViewState="true" id="hdnTicker" runat="Server" style="visibility:hidden"></asp:textbox>--%> </td> </tr> <tr> <td> <asp:Button ID="btn" runat="server" Text="hi" OnClick="btn_Click" Height="30px" Width="60px" /> </td> </tr> </table> <%--<asp:HiddenField ID="txt" runat="server" Visible="true" />--%> </div> </form> <input type="hidden" id="hdnTicker" name="hdnTicker" enableviewstate="true" runat="server" />   1
What is object cloning   3
What are the different ways in which we can use the link tag ? Illustrate with an example. Is it possible to link a file with another file on a different file server ? If yes, how ?   1
what is difference between client side scripting and server side scripting? NIIT 6
What is the Difference between HTML and DHTML TCS 15
Explain about session? Where it runs & what are different types of session handling?   1
why java is called platform independent?   1
How to include the HTML tag inside the javascript tags? TCS 4
if the two text boxes are there i want assign the vales like 2&3 and if i select button means i want find the sum.this is client side scripting in javascript Infosys 7
Difference between scripting language and programming language??   1
what is runnable interface   1
For more JavaScript Interview Questions Click Here 

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