Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Consider the following declarations:
public class XClass
{
private int u;
private double w;
public XClass()
{
}
public XClass(int a, double b)
{
}
public void func()
{
}
public void print()
{
}
}
XClass x = new XClass(10, 20.75);
Write a Java statement that creates the XClass object t and initializes
the instance variables of t to 20 and 35.0, respectively.
Write the definition of a class that has the following properties:
a. The name of the class is Stock.
b. The class Stock has four instance variables: name of type String,
previousPrice and closingPrice of type double, and
numberOfShares of type int.
Consider the following declarations:
public class XClass
{
private int u;
private double w;
public XClass()
{
}
public XClass(int a, double b)
{
}
public void func()
{
}
public void print()
{
}
}
XClass x = new XClass(10, 20.75);
a. How many members does class XClass have?
b. How many private members does class XClass have?

Ahmad sent 16 December at 09:43
c. How many constructors does class XClass have?
d. Write the definition of the member func so that u is set to 10 and w is
set to 15.3.
e. Write the definition of the member print that prints the contents of u
and w.
f. Write the definition of the default constructor of the class XClass so
that the instance variables are initialized to 0.
g. Write the definition of the constructor with parameters of the class
XClass so that the instance variable u is initialized to the value of a and
the instance variable w is initialized to the value of b.
h. Write a Java statement that prints the values of the instance variables of x.
Consider the definition of the following class:
class CC
{
private int u;
private int v;
private double w;
public CC() //Line 1
{
}
public CC(int a) //Line 2
{
}
Ahmad sent 16 December at 09:42
public CC(int a, int b) //Line 3
{
}
public CC(int a, int b, double d) //Line 4
{
}
}
. Find the syntax errors in the definition of the following class:
public class BB
{
private int one;
private int two;
public boolean equal()
{
return (one == two);
}
public print()
{
System.out.println(one + " " + two);
}
public BB(int a, int b)
{
one = a;
two = b;
}
}
. Find the syntax errors in the definition of the following class:
public class BB
{
private int one;
private int two;
public boolean equal()
{
return (one == two);
}
public print()
{
System.out.println(one + " " + two);
}
public BB(int a, int b)
{
one = a;
two = b;
}
}
Perform the subnetting on the below IP Address and find out the number of networks, network of, first host, last host, and broadcast id of each network.
IP Address:120.0.0.0/20
During program compilation, which of the following data structures is used to hold

return addresses when a procedure is called?

A. Stack,

B. Array.

C. Queue.

D. Record.
Verification and validation consist Of a variety of which kind of activities?

A. Design.

B. Analysis.

C. Maintenance.

D. Software quality assurance.
Which of the following is a required condition for binary search algorithms?

A. the list must be sorted.

B. there should be the direct access to the middle element in any sub list.

C. The number of elements in the list should be finite

D. An item round can always be obtained as a middle element.
LATEST TUTORIALS
APPROVED BY CLIENTS