Wednesday, March 11, 2020

WEEK 6 ASSIGNMENT SOLUTION

QUESTION 1: // Write the appropriate code to extend the Thread class to complete the class Question61. public class Question61 extends Thread{ public void run() {   System.out.print("Thread is Running."); } QUESTION 2: // Create main class Question62 with main() method and appropriate statements in it public class Question62{   public static void main(String[] args){     ThreadRun...

Saturday, March 7, 2020

WEEK 6 ASSIGNMENT SOLUTION

QUESTION 1:virtual void compute(){ n = n*n; }           // LINE-1       virtual void show(){ cout << n << endl; } // LINE-2};QUESTION 2:Base::f();          // LINE-1 Call proper function        cout << name << endl;    }    void g() {       ...

Wednesday, March 4, 2020

WEEK 5 ASSIGNMENT SOLUTION

QUESTION 1 : //Create a class A which implements the interface Number. class A implements Number {   public int findSqr(int i)   {     return i*i;   } } QUESTION 2:   //Create a class B, which implements the interface GCD. class B implements GCD {   public int findGCD(int a, int b)   {     if(b==0)       return a;    ...

Monday, February 24, 2020

WEEK 4 ASSIGNMENT

QUESTION 1: import java.io.*; import java.util.*; import static java.lang.System.*; QUESTION 2: // Create an object of Calendar class.  java.util.Calendar current ; // Use getInstance() method to initialize the Calendar object. current = java.util.Calendar.getInstance(); // Initialize the int variable year with the current year year = current.get(current.YEAR); QUESTION 3: interface...

Saturday, February 15, 2020

WEEK 3 ASSIGNMENT SOLUTION

HEY! GUYS HERE IS THE CODE OF ALL THE QUESTIONS: QUESTION 1: if (n<=1)              return (1-n);          return fib(n - 1) + fib(n - 2);  QUESTION 2: class Point{   double x,y;     public double distance(Point p1, Point p2)                 {  ...

Tuesday, February 11, 2020

PROGRAMMING IN C++ WEEK 3

HELLO!! FRIENDS HERE I HAVE PASTED ONLY THE SOLUTION AND NOT THE COMPLETE PROGRAM SO PASTE IT CAREFULLY IN YOUR SOLUTION.QUESTION 1:mutable int bill;                  // LINE-1public:    Customer(int _cust_id, string _name, int _bill)        : cust_id(_cust_id), name(_name), bill(_bill) {}    void changeBill(int s)const...

Sunday, February 2, 2020

PROGRAMMING IN JAVA WEEK 1 ASSIGNMENT SOLUTION

Here I have pasted only the answer and not the complete program so please paste the stuff carefully, I have tried to copy the whole program but it is not selecting the whole program at once. QUESTION 1 : //Calculate the perimeter  perimeter=2*Math.PI*radius; //Calculate the area area=Math.PI*radius*radius; if(area>0&&perimeter>0)         {    ...