NPTEL Programming In Java ASSIGNMENT 4 Answers 2022

NPTEL Programming In Java ASSIGNMENT 4

Are you looking for the Answers to NPTEL Programming In Java ASSIGNMENT 4? This article will help you with the answer to the National Programme on Technology Enhanced Learning (NPTEL) Course NPTEL Programming In Java Assignment 4

What is Programming In Java?

With the growth of Information and Communication Technology, there is a need to develop large and complex software. Further, those software should be platform independent, Internet enabled, easy to modify, secure, and robust. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment. Now, Java programming language is being used for mobile programming, Internet programming, and many other applications compatible to distributed systems. This course aims to cover the essential topics of Java programming so that the participants can improve their skills to cope with the current demand of IT industries and solve many problems in their own filed of studies.

CRITERIA TO GET A CERTIFICATE

Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

Below you can find the answers for NPTEL Programming In Java ASSIGNMENT 4

Assignment No.Answers
Programming In Java Assignment 1 Click Here
Programming In Java Assignment 2 Click Here
Programming In Java Assignment 3 Click Here
Programming In Java Assignment 4 Click Here
Programming In Java Assignment 5 Click Here
Programming In Java Assignment 6 Click Here
Programming In Java Assignment 7 Click Here
Programming In Java Assignment 8 Click Here

NPTEL Programming In Java ASSIGNMENT 4 Answers:-

Q1. Complete the code segment to execute the following program successfully. You should import the correct package(s) and/or class(s) to complete the code.

MCQ ASSIGNMENT WEEK4 ANSWERS:- CLICK HERE

Week 5 Answers:- Click Here

// Import the required package(s) and/or class(es)// Import the required package(s) and/or class(es)
import java.io.*;
import java.util.*;
import static java.lang.System.*;

Q2. Complete the code segment to print the current year. Your code should compile successfully.

// 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);

???? Next Week Answers: Assignment 05 ????

quizxp telegram

Q3. The program in this assignment is attempted to print the following output:

interface ExtraLarge{
 String extra = "This is extra-large";
 void display();
}

class Large {
    public void Print() {
        System.out.println("This is large");
    }
}

class Medium extends Large {
    public void Print() {
       super.Print();  
        System.out.println("This is medium");
    }
}
class Small extends Medium {
    public void Print() {
        super.Print();  
        System.out.println("This is small");
    }
  }


class Question43 implements ExtraLarge{
    public static void main(String[] args) {
        Small s = new Small();
        s.Print();
   Question43 q = new Question43();
   q.display();
    }
  public void display(){
    System.out.println(extra);
  }
}

Salesforce off campus Drive 2022 | Intern | Any Graduate | Bangalore/Hyderabad

Q4. Complete the code segment to call the default method in the interface First and Second.

// Call show() of First interface.
First.super.show();
// Call show() of Second interface.
Second.super.show();

Q5. Modify the code segment to print the following output.

// Interface ShapeX is created
interface ShapeX {
 public String base = "This is Shape1";
 public void display1();
}

// Interface ShapeY is created which extends ShapeX
interface ShapeY extends ShapeX {
 public String base = "This is Shape2";
 public void display2();
}

// Class ShapeG is created which implements ShapeY
class ShapeG implements ShapeY {
 public String base = "This is Shape3";
 //Overriding method in ShapeX interface
 public void display1() {
  System.out.println("Circle: " + ShapeX.base);
 }
 // Override method in ShapeY interface
  public void display2(){
  System.out.println("Circle: " + ShapeY.base);}
}

For other courses answers:- Visit

For Internship and job updates:- Visit

Disclaimer: We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.

if you have any suggestions then comment below or contact us at [email protected]

If you found this article Interesting and helpful, don’t forget to share it with your friends to get this information.