VTU Updates

Programming in Java NPTEL Assignment Answers of Week 3 (2023)

In this article, you will get  NPTEL Assignment Answers  of  Week 3 (2023)  of the course  Programming in Java

1. Which of the following statement(s) is/are correct about the constructor? a. Constructors cannot be synchronized in Java. b. Java does not provide a default copy constructor. c. A constructor cannot be overloaded. d. “this” or “super” can be used in a constructor.

Answer: a, b, d

2. Which of the following statement(s) is/are true? a. You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it. b. You can write a new static method in the subclass with the same signature as the one in the superclass, thus hiding it. c. A subclass inherits all of its parent’s public and protected members, no matter what package the subclass is in. d. You cannot declare new methods in the subclass that are not in the superclass.

Answer: a, b, c

3. Consider the following piece of code.

Fill in the blank with the appropriate keyword(s) from the list given below so that the program compiles successfully. a. abstract b. final c. default d. public

Answer: b. final and d. public

4. How many instances of abstract class can be created? a. 0 b. 1 c. 2 d. Multiple

Answer: a. 0

5. Structuring a Java class such that only methods within the class can access its instance variables is referred to as ______. a. object orientation b. inheritance c. platform independence d. encapsulation

Answer: d. encapsulation

6. Which of the following statement(s) is/are true? a. A final method cannot be overridden in a subclass. b. The advantage of private static methods is that they can be reused later if you need to reinitialize the class variable. c. Class methods cannot use this keyword as there is no instance for this to refer to. d. A final method can be overridden in a subclass.

7. Consider the following piece of code.

Which of the following is the output of the above program? a. Java b. There will be a compile-time error. c. JavaJava. d. The program will give a runtime error.

Answer: b. There will be a compile-time error.

8. Consider the following program.

What is the output of the above program? a. java b. ring c. r min d. gram

Answer: b. ring

9. Which of the following statement(s) is/are False? a. Hiding internal data from the outside world and accessing it only through publicly exposed methods is known as data encapsulation. b. Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword. c. The term “class variable” is another name for a non-static field. d. A local variable stores a temporary state; it is declared inside a method.

Answer: c. The term “class variable” is another name for a non-static field.

10. Which of the following statement(s) is/are true? a. Static methods in interfaces are never inherited. b. You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass. c. You can prevent a class from being subclassed by using the final keyword in the class’s declaration. d. An abstract class can only be subclassed; it cannot be instantiated.

Answer: a, b, c, d

Programming Assignment Answers

Week 3 : programming assignment 1.

Define a class Point with two fields x and y each of type double. Also, define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double. Complete the code segment given below. Use Math.sqrt( ) to calculate the square root.

Week 3 : Programming Assignment 2

This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum( ) and multiply ( ). You have to call these methods to find the sum and product of two numbers. Complete the code segment as instructed. 

Week 3 : Programming Assignment 3

Complete the code segment to swap two numbers using call by object reference.

Week 3 : Programming Assignment 4

This program is related to the generation of Fibonacci numbers.>

For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8 th  Fibonacci number.

A partial code is given and you have to complete the code as per the instruction given .

Week 3 : Programming Assignment 5

A class Shape is defined with two overloading constructors in it. Another class Test1 is partially defined which inherits the class Shape. The class Test1 should include two overloading constructors as appropriate for some object instantiation shown in main() method. You should define the constructors using the super class constructors. Also, override the method calculate( ) in Test1 to calculate the volume of a Shape.

Related Posts

Explain network layer design issues..

  • April 4, 2024

AngularJS application that displays the date

  • March 12, 2024

AngularJS application to convert student details to Uppercase

Leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Add Comment  *

Save my name, email, and website in this browser for the next time I comment.

Post Comment

nptel java week 3 assignment answers 2023

BEU GURU

  • _Previous Year Question
  • Spoken Tutorial
  • _CCNAv7: Introduction to Networks
  • _Introduction to Cyber Security
  • _India_Internship_SIT_Introduction to Packet Tracer
  • Internship & Placement
  • _Internship

Programming in Java nptel quiz solutions 2023 week 3 solutions

nptel java week 3 assignment answers 2023

programming in java nptel answers week 3

In which of the following scenario(s), the static block is used in java.

a. To create static variables.

b. To initialize instance variables.

c. To initialize static variables.

d. To create new objects.

In Java, the static block is used in the following scenario:

Static blocks in Java are used to initialize static variables or perform other static initialization tasks for a class. They are executed when the class is loaded by the Java Virtual Machine (JVM) and are particularly useful when you need to set up values for static fields that cannot be initialized directly at the point of declaration.

The other options (a, b, and d) are not accurate descriptions of the primary purpose of static blocks:

a. Static variables are typically initialized directly at the point of declaration or within static blocks.

b. Instance variables are usually initialized within constructors or directly at the point of declaration, not in static blocks.

d. Creating new objects is done using constructors or factory methods, not through static blocks.

So, the correct answer is "c. To initialize static variables."

programming in java nptel quiz solutions 2023

Consider the following piece of code..

public class Question { private static int count = 0;

public static void main(String[] args) { incrementCount(); System.out.println("Count: + count);

incrementCount() {

Fill in the blank with the appropriate keyword(s) from the list given below so that the program compiles successfully.

a. public void

b. private void

C. public static void

d. private static void

The correct keyword to fill in the blank is:

So, the corrected code should look like:

public class Question {

    private static int count = 0;

    public static void main(String[] args) {

        incrementCount();

        System.out.println("Count: " + count); // Added the missing double quotes and the correct variable name

    }

    private static void incrementCount() { // Used the correct keyword for method declaration

        count++;

This code should now compile and execute successfully.

programming in java nptel assignment solutions week 3

public void display () { System.out.println("A's display method");

class B extends A {

public void display () { System.out.println("B's display method");

public class Main {

public static void main(String[] args) { A a = new B(); a.display();

((B) a).display();

What is the output of the above code?

a. A's display method

B's display method

b. A's display method A's display method

c. B's display method B's display method

d. B's display method A's display method

The correct output of the given code is:

Here's the explanation:

A a = new B(); - This creates an instance of class B and assigns it to a reference variable of type A. This is allowed due to polymorphism (subclass instance can be assigned to a superclass reference).

a.display(); - This calls the display() method of class B (since the object referred to is an instance of class B). So, "B's display method" is printed.

((B) a).display(); - Here, we cast the reference a back to type B before calling the display() method. This again calls the display() method of class B. So, "B's display method" is printed again.

Therefore, the correct output is "B's display method B's display method".

Which of the following statement(s) is/are false?

a. You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it.

b. You can write a new static method in the subclass with the same signature as the one in the superclass, thus hiding it.

c. A subclass inherits all of its parent's public and protected members, no matter what package the subclass is in.

d. You cannot declare new methods in the subclass that are not in the superclass.

The false statement is:

Explanation:

a. True. You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it. This is a fundamental concept of method overriding in object-oriented programming.

b. True. You can write a new static method in the subclass with the same signature as the one in the superclass, thus hiding it. This is known as method hiding for static methods.

c. True. A subclass inherits all of its parent's public and protected members, no matter what package the subclass is in. This is a key feature of inheritance in Java.

d. False. You can declare new methods in the subclass that are not in the superclass. Subclasses can have additional methods beyond those inherited from the superclass. This is one of the ways to extend and customize the behavior of a class in object-oriented programming.

So, the correct answer is d. You cannot declare new methods in the subclass that are not in the superclass.

Which of the following statement(s) is/are true?

a. You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass.

b. You can prevent a class from being subclassed by using the final keyword in the class's declaration.

c. An abstract class can be instantiated.

d. Common behaviour can be defined in a superclass and inherited into a subclass using the extends keyword.

The true statement(s) are:

d. Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.

a. False. Changing an instance method in the superclass to a static method in the subclass does not cause a compile-time error. It's allowed, but it's method hiding rather than method overriding. The subclass's static method will not override the superclass's instance method.

b. True. The final keyword in a class's declaration prevents the class from being subclassed. Once a class is marked as final, it cannot be extended by any other class.

c. True. An abstract class can be instantiated using anonymous inner classes or through concrete subclasses that provide implementations for the abstract methods. However, you cannot directly create an instance of an abstract class using the new keyword.

d. True. Common behavior can indeed be defined in a superclass, and subclasses can inherit this behavior using the extends keyword. This is a core principle of inheritance in object-oriented programming.

So, the correct answers are b, c, and d.

Consider the following program.

public class Question{

public static void main(String[] args) {

String str = " programming in java ";

System.out.println(str.substring (1,3) +str.substring (4,5)+

str.substring(6,8));

What is the output of the above program?

The correct answer is:

str.substring(1, 3) - This extracts the substring from index 1 (inclusive) to index 3 (exclusive), which gives "ro".

str.substring(4, 5) - This extracts the substring from index 4 (inclusive) to index 5 (exclusive), which gives "a".

str.substring(6, 8) - This extracts the substring from index 6 (inclusive) to index 8 (exclusive), which gives "mm".

Putting these substrings together, you get "ro" + "a" + "mm", which results in "roamm".

So, the correct output of the program is "program".

class Question {

static int a =10;

class Questionl extends Question{ static int a =20;

public class Quest extends Question1 { public static void main(String args[]) { a =100;

System.out.println (Question.a);

System.out.println (Questionl.a);

Which of the following is the output of the above program?

class Question defines a static variable a with a value of 10.

class Questionl extends Question and defines its own static variable a with a value of 20.

public class Quest extends Question1 should be corrected to public class Quest extends Questionl for the code to compile. Since there is a typo in the class name, the code would not compile. Assuming the typo is corrected, let's proceed with the explanation.

In the main method:

a = 100; assigns the value 100 to the a variable in the class Quest, which is inherited from Questionl.

System.out.println(Question.a); prints the value of the static variable a from the Question class, which is 10.

System.out.println(Questionl.a); prints the value of the static variable a from the Questionl class, which is 100 (since you modified it in the main method).

So, the correct output of the program is "10" followed by "100".

QUESTION 8:

public class Child1 extends Question {

int a 1000;

int b=2000;

void add (int a, int b) {

System.out.println(a+this.b-super.a);

Child1 c = new Child1 ();

c.add(100, 300);

If the program is executed, then what will be the output from the execution?

In the Child1 class constructor, a is assigned the value 1000, and b is assigned the value 2000.

The add method in the Child1 class accepts two parameters named a and b.

Inside the add method, a + this.b - super.a is calculated:

a (from the method parameter) is 100.

this.b (from the Child1 instance) is 2000.

super.a (from the Question class) is 400.

So, the calculation is: 100 + 2000 - 400 = 1700.

In the main method, an instance of Child1 is created, and the add method is called with parameters 100 and 300.

Therefore, the output of the program will be "1700".

a. Hiding internal data from the outside world and accessing it only through publicly exposed methods is known as data encapsulation.

b. Static methods in interfaces are never inherited.

c. The term "class variable" is another name for a non-static field.

d. A local variable stores a temporary state; it is declared inside a method.

a. This statement is true. Data encapsulation is a fundamental concept in object-oriented programming. It involves hiding the internal details and state of an object from the outside world and providing controlled access to that data through well-defined public methods. This helps in maintaining the integrity and consistency of the object's state.

b. This statement is false. Static methods in interfaces are indeed inherited by classes that implement the interface. They can be called using the interface name or through the implementing class.

c. This statement is false. The term "class variable" usually refers to a static variable, not a non-static field. A class variable is shared among all instances of a class and is associated with the class itself, not with individual instances.

d. This statement is true. A local variable is a variable declared within a method or a block of code and is accessible only within that scope. It stores temporary data that is used for computations or other tasks within the method. Once the method completes its execution, the local variable goes out of scope and is no longer accessible.

So, the correct answers are a and d.

All classes in java are inherited from which class?

a. java.lang.class

b. java.class.inherited C. java.class.object d. java.lang.Object

All classes in Java are inherited from:

d. java.lang.Object

In Java, the Object class, which resides in the java.lang package, is the root class for all other classes. This means that every class in Java implicitly inherits from the Object class. The Object class provides fundamental methods and behaviors that are common to all objects in Java, such as toString(), equals(), and hashCode().

Our website uses cookies to improve your experience. Learn more

Contact Form

Quizermania Logo

Programming in Java | NPTEL 2023 | Week 3 quiz solutions

This set of MCQ(multiple choice questions) focuses on the  Programming in Java NPTEL 2023 Week 3 Quiz Solutions .

Course layout (Answers Link)

Answers COMING SOON! Kindly Wait!

Week 1 : Overview of Object-Oriented Programming and Java Programming Assignment Week 2: Java Programming Elements Programming Assignment Week 3: Input-Output Handling in Java Programming Assignment Week 4: Encapsulation Programming Assignment Week 5: Inheritance Programming Assignment Week 6: Exception Handling Programming Assignment Week 7: Multithreaded Programming Programming Assignment Week 8: Java Applets and Servlets Programming Assignment Week 9: Java Swing and Abstract Windowing Toolkit Week 10: Networking with Java Week 11: Java Object Database Connectivity Week 12: Interface and Packages for Software Development

NOTE:  You can check your answer immediately by clicking show answer button. Programming in Java NPTEL 2023 Week 3 Quiz Solutions” contains 10 questions.

Now, start attempting the quiz.

Programming in Java NPTEL 2022 Week 1 Quiz Solutions

Q1. In which of the following scenario(s), the static block is used in Java?

a) To create static variables b) To initialize instance variables c) To initialize static variables d) To create new objects

Answer: c) To initialize static variables

Q2. Consider the following piece of code. Fill in the blank with the appropriate keyword(s) from the list given below so that the program compiles successfully.

a) public void b) private void c) public static void d) private static void

Answer: c), d)

Q3. What is the output of the above code?

a) A’s display method B’s display method b) A’s display method A’s dispaly method c) B’s display method B’s display method d) B’s display method A’s display method

Q4. Which of the following statement(s) is/are false?

a) You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it b) You can write a new static method in the subclass with the same signature as the one in the superclass, thus hiding it c) A subclass inherits all of its parent’s public and protected memebers, no matter what package the subclass is in d) You cannot declare new methods in the subclass that are not in the superclass

Q5. Which of the following statement(s) is/are true?

a) You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass b) You can prevent a class from being subclassed by using the final keyword in the class’s declaration c) An abstract class can be instantiated d) Common behaviour can be defined in a superclass and inherited into a subclass using the extends keyword

Answer: a), b), d)

Q6. What is the output of the above program?

a) prgam b) program c) gramm d) ing in

Answer: a) prgam

Q7. Which of the following is the output of the above program?

a) 10 100 b) 10 20 c) 100 10 d) 10 19

Q8. If the program is executed, then what will be the output from the execution?

a) 1700 b) 1300 c) 0 d) 2600

Answer: a) 1700

Q9. Which of the following statement(s) is/are true?

a) Hiding internal data from the outside world and accessing it only through publicly exposed methods is known as data encapsulation b) Static methods in interfaces are never inherited c) The term “class variable” is another name for a non-static field d) A local variable stroes a temporary state; it is declared inside a method

Answer: a), c), d)

Q10. All classes in java are inherited from which class?

a) java.lang.class b) java.class.inherited c) java.class.object d) java.lang.object

Programming in Java NPTEL 2023 Week 3 Quiz Solutions

Q1. Which of the following statement(s) is/are correct about the constructor?

a) Constructors cannot be synchronized in Java b) Java does not provide a default copy constructor c) A constructor cannot be overloaded d) “this” or “super” can be used in a constructor

Q2. Which of the following statement(s) is/are true?

a) You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it. b) You can write a new static method in the subclass with the same signature as the one in the superclass, thus hidiing it. c) A subclass inherits all of its parent’s public and protected members, no matter what package the subclass is in. d) You cannot declare new methods in the subclass that are not in the superclass.

Answer: a), b), c)

Q3. Fill in the blank with the appropriate keyword(s) from the list given below so that the program compiles successfully.

a) abstract b) final c) default d) public

Answer: b), d)

Q4. How many instances of abstract class can be created?

a) 0 b) 1 c) 2 d) Multiple

Q5. Structure a Java class such that only methods within the class can access its instance variables is referred to as ________.

a) Object orientation b) inheritance c) platform independence d) encapsulation

Q6. Which of the following statement(s) is/are true?

a) A final method cannot be overridden in a subclass b) The advantage of private static methods is that they can be reused later if you need to reinitialize the class variable c) Class methods cannot use this keyword as there is no instance for this refer to d) A final method can be overridden in a subclass

a) Java b) There will be a compile-time error c) JavaJava d) The program will give a runtime error

Q8. What is the output of the above program?

a) java b) ring c) r min d) gram

Q9. Which of the following statement(s) is/are False?

a) Hiding internal data from the outside world and accessing it only through publicly exposed methods is known as data encapsulation b) Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword c) The term “class variable” is another name for a non-static field d) A local variable stores a temporary state; it is declared inside a method.

Q10. Which of the following statement(s) is/are true?

a) Static methods in interfaces are never inherited b) You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass c) You can prevent a class from being subclassed by using the final keyword in the class’s declaration d) An abstract class can only be subclassed; it cannot be instantiated

Answer: a), b), c), d)

Programming in Java NPTEL 2022 Week 3 Quiz Solutions

Q1. Which of this keyword can be used in a sub class to call the constructor of super class?

a) super b) this c) extent d) extends

Answer: a) super

Q2. What is the output of the above program?

a) i+j is 42 4 0 b) i+j is 6 9 2 c) i+j is 42 9 2 d) i+j is 6 4 0

Q3. What is the output of the above program?

a) 4 b) 10 c) 2 d) runtime error

Answer: c) 2

Q4. For each description on the left, find the best matching modifier on the right. You may use a choice more than once or not at all.

a) 1-A, 2-A, 3-C, 4-D, 5-E b) 1-A, 2-A, 3-A, 4-B, 5-C c) 1-C, 2-B, 3-A, 4-A, 5-D d) None of Above

Answer: b) 1-A, 2-A, 3-A, 4-B, 5-C

Q5. All the variables of interface should be?

a) default and final b) default and static c) public, static and final d) protect, static and final

Answer: c) public, static and final

Q6. Which of the following statement(s) is/are NOT true?

a) A final method cannot be overridden in a subclass. b) The advantage of private static methods is that they can be reused later if you need to reinitialize the class variable. c) Class methods cannot use this keyword as there is no instance for this to refer to. d) A final method can be overridden in a subclass.

Answer: d) A final method can be overridden in a subclass.

Q7. Which of the following statements is/are true?

a) Hello b) There will be a compile-time error c) HelloHello d) The program will give a runtime error

Answer: d) The program will give a runtime error

Q8. Which of the following option is true about the above program?

a) Error: String cannot be a method return type like void, int, char, etc.; as it is a class. b) Error: Non-static variable ‘answer’ cannot be referenced from a static context. c) Output: The answer to the question. Which course have you opted? is Programming with Java d) Error: Compilation error as variable ‘question’ is not static.

Answer: c) Output: The answer to the question. Which course have you opted? is Programming with Java

Q9. Disadvantage(s) of inheritance in Java programming is/are

a) Code readability b) two classes (base and inherited class) get tightly coupled c) Save development time and effort d) Code reusability

Answer: b) two classes (base and inherited class) get tightly coupled

Q10. Which inheritance in Java programming is not supported?

a) Multiple inheritance using classes. b) Multiple inheritance using interfaces. c) Multilevel inheritance d) Single inheritance

Answer: a) Multiple inheritance using classes.

Previous Course – Week 3 Quiz Solutions

Q1. Consider the following piece of code in Java.

What is the output of the above program?

a) 2 3 b) 3 3 c) Runtime Error d) Compilation Error

Answer: b) 3 3

Q2. Consider the following piece of code in Java.

a) 6 b) 10 c) 21 d) error

Answer: a) 6

Q3. If a class inheriting an abstract class does not define all of its functions then it will be known as?

a) Default b) Abstract c) A simple class d) Static class

Answer: b) Abstract

Q4. Which among the following best describes polymorphism?

a) It is the ability for many messages/data to be processed in one way b) It is the ability for a message/data to be processed in only 1 form c) It is the ability for a message/data to be processed in more than one form d) It is the ability for undefined message/data to be processed in at least one way

Answer: c) It is the ability for a message/data to be processed in more than one form

Q5. Consider the following piece of code in Java

a) 30 b) 20 c) Compile error d) Runtime error

Answer: c) Compile error

Programming in Java NPTEL 2022 Week 3 quiz Solutions

Q6. All the variables of the interface should be?

Q7. Disadvantage(s) of inheritance in Java programming is/are

a) Code readability b) two classes (base and inherited class) get tightly coupled c) Code maintainability d) Code reusability

Programming in Java NPTEL 2022 Week 3 Quiz solutions

Q8. When does method overloading is determined?

a) At run time b) At coding time c) At compile time d) At execution time

Answer: c) At compile time

Which of the following statements is/are true?

a) Output: Hello b) Program will compile successfully c) There will be a compile-time error d) The program will give a runtime error

a) Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data encapsulation b) Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword c) The term “class variable” is another name for static field d) A local variable stores temporary state; it is declared inside a method

>> Next- Programming in Java Week 2 Assignment Solutions

>> Next- Programming in Java Week 4 Assignment Solutions

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Related Posts

Html mcq : html basics (multiple choice question), html mcq : html web browsers (multiple choice question).

Preprocessor Directives

C programming MCQ : Preprocessor Directives(MULTIPLE CHOICE QUESTION)

C++ mcq : c++ basics(multiple choice question), 1 thought on “programming in java | nptel 2023 | week 3 quiz solutions”.

' src=

Please share assignment 3 programming answers

Leave a Comment Cancel Reply

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

  • 1st Central Law Reviews: Expert Legal Analysis & Insights

NPTEL Programming In Java Assignment 3 Answers July 2023

NPTEL Programming In Java Assignment 3 Answers July 2023:-  All the Answers are provided here to help the students as a reference, You must submit your assignment at your own knowledge

ALSO READ :- NPTEL Registration Steps [July – Dec 2022] NPTEL Exam Pattern Tips & Top Tricks [2022] NPTEL Exam Result 2022 | NPTEL Swayam Result Download

NPTEL Programming In Java Week 3 Quiz Assignment Answers 2023

1. In which of the following scenario(s), the static block is used in Java? a. To create static variables. b. To initialize instance variables. c. To initialize static variables. d. To create new objects.

2. Consider the following piece of code.

Fill in the blank with the appropriate k eyword(s) from the list given below so that the program compiles successfully. a. public void b. private void c. public static void d. private static void

3. Consider the following piece of code.

What is the output of the a b ove code? a. A’s display method B’s display method b. A’s display method A’s display method c. B’s display method B’s display method d. B’s display method A’s display method

4. Which of the following statements) is/are false? a. You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it. b. You can write a new static method in the subclass with the same signature as the one in the superclass, th u s hiding it. c. A subclass inherits all of its parent’s public and protected members, no matter what package the subclass is in. d. You cannot declare new methods in the subclass that are not in the superclass.

5. Which of the following statement(s) is/are true? a. You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass. b. You can prevent a clas s from being subclassed by using the final keyword in the class’s declaration. c. An abstract class can be instantiated. d. Common behaviour can be defined in a superclass and inherited into a subclass using the extends keyword.

6. Consider the following program.

What is the output of the abo v e program? a. prgam b. program c. gramm d. ing in

7. Consider the following piece of code.

NPTEL Programming In Java Assignment 3 Answers July 2023

Which of the following is the output of the abo v e program? a. 10 100 b. 10 20 c. 100 1 0 d. 10 10

8. Consider the following program.

If the program is executed, then w h at will be the output from the execution? a. 1700 b. 1300 c. 0 d. 2600

9. Which of the following statement(s) is/are true? a. Hiding internal data from the outside world and accessing it only through publicly exposed methods is known as data encapsulation. b. Static methods in interfaces are never inherited. c. The term “class variable” is another name for a non-s t atic field. d. A local variable stores a temporary state; it is declared inside a method.

10. All classes in java are inherited from which class? a. java.lang.class b. java.class.inherited c. java.class . object d. java.lang.Object

NPTEL Programming In Java Week 3 Programming Assignment Solutions 2023

Q1. This program is related to the generation of Fibonacci numbers.

For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8th Fibonacci number.

A partial code is given and you have to complete the code as per the instruction given .

Q2. Define a class Point with two fields x and y each of type double. Also, define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double.

Complete the code segment given below. Use Math.sqrt( ) to calculate the square root.

Q3. A class Shape is defined with two overloading constructors in it. Another class Test1 is partially defined which inherits the class Shape. The class Test1 should include two overloading constructors as appropriate for some object instantiation shown in main() method. You should define the constructors using the super class constructors. Also, override the method calculate( ) in Test1 to calculate the volume of a Shape.

Q4. This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum( ) and multiply ( ). You have to call these methods to find the sum and product of two numbers. Complete the code segment as instructed.

Q5. Complete the code segment to swap two numbers using call by object reference.

NPTEL Programming In Java Assignment 3 Answers [July 2022]

1. Which of this keyword can be used in a sub class to call the constructor of super class? a. super b. this c. extent d. extends

2. What is the output of the above program? a. i+jis 42 4 b. i+jis6 9 2 c. i+jis 42 9 2 d. i+jis 6 4

Answers will be Uploaded Shortly and it will be Notified on Telegram, So  JOIN NOW

NPTEL Programming In Java Assignment 3 Answers July 2023

3. What is the output of the above program? a. 4 b. 10 c. 2 d. runtime error

4. For each description on the left, find the best matching modifier on the right. You may use a choice more than once or not at all. 1. Hides the instance variable from code in other files. A. private 2. Hides the method from code in other files B. public 3. Hides the subclass from code in other files. C. final 4. Exposes the API method to code in other files. D. static 5. Prevents the value of the instance variable from being Changed once initialized. E. none of the above a. 1-A.2-A.3-C.4-D5-E b. 1-A.2-A,3-A,4-B,5-C c. 1-C.2-B.3-A, 4-A,5-D d. None of Above

5. All the variables of interface should be? a) default and final b) default and static c) public, static and final d) protect, static and final

6. Which of the following statement(s) is/are NOT true? a. A final method cannot be overridden in a subclass. b. The advantage of private static methods is that they can be reused later if you need to reinitialize the class variable. c. Class methods cannot use this keyword as there is no instance for this to refer to. d. A final method can be overidden in a subclass.

👇 For Week 04 Assignment Answers 👇

7. Which of the following statements is/ are true? a. Hello b. There will be a compile-time error c. HelloHello. d. The program will give a runtime error.

8. Which of the following option is true about the above program? a. Eror: String cannot be a method return tpe like void, int, char, etc.; as it isa class. b. Eror: Non-static variable ‘answer’ cannot be referenced from a static context. C. Output: The answer to the question, Which course have you opted? is Programming with Java d. Error: Compilation error as variable question’ is not static.

9. Disadvantage(s) of inheritance in Java programming is/are a) Code readability b) two classes (base and inherited class) get tightly coupled c) Save development time and effort d) Code reusability

10. Which inheritance in Java programming is not supported? a. Multiple inheritance using classes. b. Multiple inheritance using interfaces. c. Multilevel inheritance. d. Single inheritance.

NPTEL Programming In Java Assignment 3 Programming Solutions

Q1. This program is related to the generation of Fibonacci numbers. For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8 th  Fibonacci number. A partial code is given and you have to complete the code as per the instruction given below.

Q4. This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum( ) and multiply ( ). You have to call these methods to find the sum and product of two numbers. Complete the code segment as instructed.  

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.

NPTEL Programming In Java Assignment 2 Answers Jan 2022

Q1. Consider the following piece of code in Java.

What is the output of the above program?

a) 2 3 b) 3 3 c) Runtime Error d) Compilation Error

Answer:- b) 3 3

👇 FOR NEXT WEEK ASSIGNMENT ANSWERS 👇

Q2. Consider the following piece of code in Java.

a) 6 b) 10 c) 21 d) error

Answer:- a) 6

Q3. If a class inheriting an abstract class does not define all of its functions then it will be known as?

a) Default b) Abstract c) A simple class d) Static class

Answer:- b) Abstract

Q4. Which among the following best describes polymorphism?

a) It is the ability for many messages/data to be processed in one way b) It is the ability for a message/data to be processed in only 1 form c) It is the ability for a message/data to be processed in more than one form d) It is the ability for undefined message/data to be processed in at least one way

Answer:- c) It is the ability for a message/data to be processed in more than one form

Q5. Consider the following piece of code in Java

a) 30 b) 20 c) Compile error d) Runtime error

Answer:- c) Compile error

Q6. All the variables of the interface should be?

a) default and final b) default and static c) public, static and final d) protect, static and final

Answer:- c) public, static and final

Q7. Disadvantage(s) of inheritance in Java programming is/are

a) Code readability b) two classes (base and inherited class) get tightly coupled c) Code maintainability d) Code reusability

Answer:- b) two classes (base and inherited class) get tightly coupled

Q8. When does method overloading is determined?

a) At run time b) At coding time c) At compile time d) At execution time

Answer:- c) At compile time

Which of the following statements is/are true?

a) Output: Hello b) Program will compile successfully c) There will be a compile-time error d) The program will give a runtime error

Answer:- (B) & (D)

Q10. Which of the following statement(s) is/are true?

a) Hiding internal data from the outside world, and accessing it only through publicly exposed methods is known as data encapsulation b) Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword c) The term “class variable” is another name for static field d) A local variable stores temporary state; it is declared inside a method

Answer:- (C) & (D)

Disclaimer :- We do not claim 100% surety of solutions, these solutions are based on our sole expertise, and by using posting these answers we are simply looking to help students as a reference, so we urge do your assignment on your own.

For More NPTEL Answers:-  CLICK HERE

Join Our Telegram:-  CLICK HERE

Programming In Java Assignment 2 Answers 2022:-  All the Answers provided here to help the students as a reference, You must submit your assignment at your own knowledge

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

Leave a Comment Cancel reply

You must be logged in to post a comment.

Spread the word.

Share the link on social media.

Confirm Password *

Username or email *

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Sorry, you do not have permission to ask a question, You must login to ask a question.

SIKSHAPATH Logo

SIKSHAPATH Latest Articles

Nptel programming in java week 3 assignment answers 2023.

NPTEL Programming in Java Assignment Answer

Are you looking for help in Programming In Java NPTEL Week 3 Assignment Answers? So, here in this article, we have provided Programming In Java week 3 Assignment Answer’s hint.

Table of Contents

NPTEL Programming In Java Week 3 Assignment Answers

Q1. Which of the following statement(s) is/are correct about the constructor?

Answer : a. Constructors cannot be synchronized in Java. b. Java does not provide a default copy constructor.

d. “this” or “super” can be used in a constructor.

1000+ students getting help from instant notifications, Join us on telegram.

Q2. Which of the following statement(s) is/are true?

Answer : a. You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it. b. You can write a new static method in the subclass with the same signature as the one in the superclass, thus hiding it. c. A subclass inherits all of its parent’s public and protected members, no matter what package the subclass is in.

Q3. Consider the following piece of code.

Fill in the blank with the appropriate keyword(s) from the list given below so that the program compiles successfully.

Answer: b. final d. public

Q4. How many instances of abstract class can be created?

Answer: a. 0

Q5. Structuring a Java class such that only methods within the class can access its instance variables is referred to as _______.

Answer: d. encapsulation

Q6. Which of the following statement(s) is/are true?

Answer: a. A final method cannot be overridden in a subclass. b. The advantage of private static methods is that they can be reused later if you need to reinitialize the class variable. c. Class methods cannot use this keyword as there is no instance for this to refer to.

Q7. Consider the following piece of code.

Which of the following is the output of the above program?

Answer: b. There will be a compile-time error.

Q8. Consider the following program.

What is the output of the above program?

Answer: b. ring

Q9. Which of the following statement(s) is/are False?

Answer: c. The term “class variable” is another name for a non-static field.

Q10. Which of the following statement(s) is/are true?

Answer: a. Static methods in interfaces are never inherited. b. You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass. c. You can prevent a class from being subclassed by using the final keyword in the class’s declaration. d. An abstract class can only be subclassed; it cannot be instantiated.

Programming In Java Week 3 Programming Assignment Answers

Disclaimer: These answers are provided only for the purpose to help students to take references. This website does not claim any surety of 100% correct answers. So, this website urges you to complete your assignment yourself.

Also Available:

NPTEL Programming In Java Week 2 Assignment Answers

NPTEL Java week 4 assignment answers

Related Posts

NPTEL Cloud Computing Assignment 3 Answers 2023

NPTEL Cloud Computing Assignment 3 Answers 2023

NPTEL Problem Solving Through Programming In C Week 1 & 2 Assignment Answers 2023

NPTEL Problem Solving Through Programming In C Week 1 & ...

NPTEL Programming In Java Week 6 Assignment Answers 2023

NPTEL Programming In Java Week 6 Assignment Answers 2023

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

nptel-assignments

Here are 63 public repositories matching this topic..., kishanrajput23 / nptel-the-joy-of-computing-using-python.

Study materials related to this course.

  • Updated Oct 27, 2023

souraavv / NPTEL-DAA-Programming-Assignment-Solutions

Programming assignments of NPTEL DAA course taken by Prof. Madhavan Mukund of Chennai Mathematical Institute.

  • Updated Dec 8, 2022

kishanrajput23 / NPTEL-Programming-In-java

  • Updated Apr 14, 2022

omunite215 / NPTEL-Programming-in-Java-Ultimate-Guide

I am sharing my journey of studying a course on Programming in Java taught by Prof.Debasis Samanta Sir IIT Kharagpur

  • Updated Dec 4, 2023

kadeep47 / NPTEL-Getting-Started-With-Competitive-Programming

[Aug - Oct 2023] Solutions for NPTEL Course Getting started with competitive programming weekly assignment.

  • Updated Sep 6, 2023

Md-Awaf / NPTEL-Course-Getting-started-with-Competitive-Programming

Solutions for NPTEL Course Getting started with competitive programming weekly assignment.

  • Updated Apr 20, 2023

rvutd / NPTEL-Joy-of-Computing-2020

Programming Assignment Solutions

  • Updated May 5, 2020

roopeshsn / embedded-system-design-nptel

Embedded System Design Course Materials - NPTEL

  • Updated May 6, 2022

guru-shreyansh / NPTEL-Programming-in-Java

The sole intention behind this repository is to help the beginners in Java with the course contents.

  • Updated Aug 1, 2021

gunjanmimo / NPTEL-The-Joy-of-Computing-using-Python

  • Updated Jan 26, 2020

avinashyadav16 / The-Joy-of-Computing-Using-Pyhton

12 Weeks long NPTEL Elective MOOC Course's codes, assignments and solutions.

  • Updated Oct 30, 2023
  • Jupyter Notebook

AdishiSood / The-Joy-of-Computing-using-Python

  • Updated Apr 28, 2021

gxuxhxm / NPTEL-The-Joy-of-Computing-using-Python

NPTEL-The-Joy-of-Computing-using-Python with NOTES and Weekly quizes Answers

  • Updated Dec 31, 2023

NPTEL-Course / Programming-Data-Structures-And-Algorithms-Using-Python

Nptel Course Solutions : Programming, Data Structures And Algorithms Using Python

  • Updated Nov 30, 2020

ShishiraB / Programming-Data-Structures-And-Algorithms-Using-Python

This is a repository where i have tried to give explaination

  • Updated Mar 1, 2023

Rahulnisanth / Python-ZTM-Hub

Complete python repository from zero to mastery experience

  • Updated Apr 30, 2024

NPTEL-Course / Google-Cloud-Computing-Foundations

Nptel Course Solution : Google Cloud Computing Foundations

  • Updated Nov 19, 2020

code-reaper08 / NPTEL-Practice-Repo

Practice repo for NPTEL 📚 Programming, Data Structures and Algorithms.

  • Updated Aug 27, 2021

CGreenP / NPTEL-Introduction-to-Programming-in-C-Assignment-4-Question-1

NPTEL Introduction to Programming in C Assignment 4 Question 1

  • Updated Apr 2, 2024

lonebots / python-programming-joc-nptel

Python programming repository for NPTEL joy of computing course

  • Updated Dec 21, 2020

Improve this page

Add a description, image, and links to the nptel-assignments topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the nptel-assignments topic, visit your repo's landing page and select "manage topics."

swayam-logo

  • Review Assignment
  • Announcements
  • About the Course
  • Explore Courses

Thank you for learning with NPTEL!!

Dear Learner, Thank you for taking the course with NPTEL!! Hope you enjoyed the journey with us. The results for this course have been published and we are closing this course now.  You will still have access to the contents and assignments of this course, if you click on the course name from the "Mycourses" tab on swayam.gov.in. For any further queries please write to [email protected] . - Team NPTEL

Ethical Hacking : Result Published!!

                                      ***THIS IS APPLICABLE ONLY FOR EXAM REGISTERED CANDIDATES***                             ****Please don't click on below link, if you are not registered/not present for the Exam****                          Dear Candidate, The exam scores and E Certificates have been released for October 2023 Exam(s). Step 1 - Are the results of my courses released? Please check the Results published courses list in the below links.:- Oct 2023 Exam - Click here Step 2 - How to check Results? Please login to internalapp.nptel.ac.in/ . and check your exam results. Use the same login credentials as used to register to the exam. What's next? Please read the pass criteria carefully and check against what you have gotten. If you still have any issues, please report the same here. internalapp.nptel.ac.in/ . We will reply within a week. Last date to report queries: 3 days within publishing of scores. Note : Hard copies of certificates will not be dispatched. The duration shown in the certificate will be based on the timeline of offering of the course in 2023, irrespective of which Assignment score that will be considered. Thanks and Best wishes. NPTEL Team

Ethical Hacking : Final Feedback Form !!!

Dear students, We are glad that you have attended the NPTEL online certification course. We hope you found the NPTEL Online course useful and have started using NPTEL extensively. In this regard, we would like to have feedback from you regarding our course and whether there are any improvements, you would like to suggest.   We are enclosing an online feedback form and would request you to spare some of your valuable time to input your observations. Your esteemed input will help us in serving you better. The link to give your feedback is: https://docs.google.com/forms/d/13AnQnFgEZ9e9ADaKAyZ4JBfuR1NCWhSE8eC62ZEVctE/edit?usp=drivesdk We thank you for your valuable time and feedback. Thanks & Regards, -NPTEL Team

Ethical Hacking : Assignment 12: Question no 3

Dear Students, There is change in answers in assignment 12 question no 3. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team

October 2023 NPTEL Exams - Hall Tickets Released!

nptel java week 3 assignment answers 2023

Ethical Hacking - Assignment- 11 and 12 Solution Released

Dear Learners, The   Assignment- 11, 12  of   Week- 11, 12 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 11 solution:    https://drive.google.com/file/d/1comSW3C5ZyayjSg2uDFEBTi--oxk5FY4/view?usp=drive_link Link for assignment 12 solution:  https://drive.google.com/file/d/1W1V_sQQbDqsrIsOGvGTWXTkTd-OIcQZz/view?usp=share_link Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Assignment- 10 Solution Released

Dear Learners, The   Assignment- 10  of   Week- 10 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 10 solution:    https://drive.google.com/file/d/1GM-u1Ee-_p_WxXwy4bb63525Va7srJk0/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

Exam Format - October, 2023 !!

Dear Candidate, ****This is applicable only for the exam registered candidates**** Type of exam will be available in the list: Click Here You will have to appear at the allotted exam center and produce your Hall ticket and Government Photo Identification Card (Example: Driving License, Passport, PAN card, Voter ID, Aadhaar-ID with your Name, date of birth, photograph and signature) for verification and take the exam in person.  You can find the final allotted exam center details in the hall ticket. The hall ticket is yet to be released.  We will notify the same through email and SMS. Type of exam: Computer based exam (Please check in the above list corresponding to your course name) The questions will be on the computer and the answers will have to be entered on the computer; type of questions may include multiple choice questions, fill in the blanks, essay-type answers, etc. Type of exam: Paper and pen Exam  (Please check in the above list corresponding to your course name) The questions will be on the computer. You will have to write your answers on sheets of paper and submit the answer sheets. Papers will be sent to the faculty for evaluation. On-Screen Calculator Demo Link: Kindly use the below link to get an idea of how the On-screen calculator will work during the exam. https://tcsion.com/ OnlineAssessment/ ScientificCalculator/ Calculator.html NOTE: Physical calculators are not allowed inside the exam hall. Thank you! -NPTEL Team

Ethical Hacking - Week 12 Feedback Form

Dear Learners, Thank you for enrolling in this NPTEL course and we hope you have gone through the contents for this week and also attempted the assignment. We value your feedback and wish to know how you found the videos and the questions asked - whether they were easy, difficult, as per your expectations, etc We shall use this to make the course better and we can also know from the feedback which concepts need more explanation, etc. Please do spare some time to give your feedback - comprises just 5 questions - should not take more than a minute, but makes a lot of difference for us as we know what the Learners feel. Here is the link to the form:  https://docs.google.com/forms/d/13kovMs5WO8aiwDOg5gaXRgnrSw_xRVZhHEpngLMTmAw/viewform NPTEL Team

NPTEL: Ethical Hacking: Week 12 Content and Assignment is live now !

Dear Students, The lecture videos for  Week 12  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=122&lesson=123 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 12  for  Week 12  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=122&assessment=183 The assignment has to be submitted on or before  Wednesday, [18/10/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking : Assignment 9: Question no 6

Dear Students, There are mistakes in  assignment 9 question no 6 . Hence the questions are not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team

Ethical Hacking - Week 11 Feedback Form

Ethical hacking - assignment- 9 solution released.

Dear Learners, The   Assignment- 9  of   Week- 9 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 9 solution:    https://drive.google.com/file/d/1-WVlyvwQIrWIIx_gyMQh_q1Yy_cUIJ6U/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

NPTEL: Ethical Hacking: Week 11 Content and Assignment is live now !

Dear Students, The lecture videos for  Week 11  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=111&lesson=112 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 11  for  Week 11  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=111&assessment=182 The assignment has to be submitted on or before  Wednesday, [11/10/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Week 10 Feedback Form

Nptel: ethical hacking: week 10 content and assignment is live now .

Dear Students, The lecture videos for  Week 10  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=102&lesson=103 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 10  for  Week 10  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=102&assessment=181 The assignment has to be submitted on or before  Wednesday, [04/10/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Assignment- 8 Solution Released

Dear Learners, The   Assignment- 8  of   Week- 8 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 8 solution:    https://drive.google.com/file/d/1cQWzc-vxG6ti8mSN6lmp377CMvuSea2T/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

NPTEL: Ethical Hacking: Week 9 Content and Assignment is live now !

Dear Students, The lecture videos for  Week 9  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=92&lesson=93 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 9  for  Week 9  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=92&assessment=180 The assignment has to be submitted on or before  Wednesday, [27/09/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Week 9 Feedback Form

Ethical hacking - assignment- 7 solution released.

Dear Learners, The   Assignment- 7  of   Week- 7 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 7 solution:    https://drive.google.com/file/d/1XJnvMsNWE5DLse2wt6THzr8WrCquytJB/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

NPTEL: Ethical Hacking: Week 8 Content and Assignment is live now !!

Dear Students, The lecture videos for  Week 8  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=83&lesson=84 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 8  for  Week 8  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=83&assessment=179 The assignment has to be submitted on or before  Wednesday, [20/09/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Assignment- 6 Solution Released

Dear Learners, The   Assignment- 6  of   Week- 6 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 6 solution:    https://drive.google.com/file/d/1StHWuPlj-FgCjED7AwfK-sMAaKFgYeAw/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Week 8 Feedback Form

Ethical hacking - assignment- 5 solution released.

Dear Learners, The   Assignment- 5  of   Week- 5 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 5 solution:    https://drive.google.com/file/d/1mIC1sDaOXdohYTW2vHyBqTYHk01aZKzY/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Week 7 Feedback Form

Ethical hacking : assignment 3: question no 1.

Dear Students, There are mistakes in  assignment 3 question no 1 . Hence the questions are not considered for evaluation. The re-evaluation has been done. The updated score is displayed under Progress tab. Sorry for the inconvenience. -NPTEL Team

NPTEL: Ethical Hacking: Week 7 Content and Assignment is live now !!

Dear Students, The lecture videos for  Week 7  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=74&lesson=75 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 7  for  Week 7  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=74&assessment=178 The assignment has to be submitted on or before  Wednesday, [13/09/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Week 6 Feedback Form

Nptel: ethical hacking: week 6 content and assignment is live now .

Dear Students, The lecture videos for  Week 6  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=65&lesson=66 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 6  for  Week 6  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=65&assessment=177 The assignment has to be submitted on or before  Wednesday, [06/09/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Assignment- 4 Solution Released

Dear Learners, The   Assignment- 4  of   Week- 4 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 4 solution:    https://drive.google.com/file/d/1Vp0eAF_rf-hfFKS5kZmqas_J6G27WG-l/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Assignment- 3 Solution Released (Revised QS 3)

Dear Learners, The   Assignment- 3  of   Week- 3 Solution (Revised QS 3)  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 3 solution  (Revised QS 3) :    https://drive.google.com/file/d/1OQImzjTu2Y3rnNVeLJrw7TAQki6mElkS/view?usp=drive_li nk Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Assignment- 3 Solution Released

Dear Learners, The   Assignment- 3  of   Week- 3 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 3 solution:    https://drive.google.com/file/d/1XQtqDUqoNvNL0VWHWoNmKBmFcLWeph76/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Week 5 Feedback Form

Nptel: ethical hacking: week 5 content and assignment is live now .

Dear Students, The lecture videos for  Week 5  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=56&lesson=57 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 5  for  Week 5  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=56&assessment=176 The assignment has to be submitted on or before  Wednesday, [30/08/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Exam Registration for NPTEL courses extended !!

Dear Learner,

Registration for the certification exam has been extended.

CLICK HERE to register for the exam.

Choose from the Cities where exam will be conducted: Exam Cities

Last date for exam registration is extended : August 28, 2023, 5:00 PM (Monday).

Click here to view Timeline and Guideline : Guideline

Note: Kindly ignore if registered already.

Happy Learning!

Thanks and Regards,

NPTEL TEAM.

Ethical Hacking - Week 4 Feedback Form

Nptel: ethical hacking: week 4 content and assignment is live now .

Dear Students, The lecture videos for  Week 4  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=47&lesson=48 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 4  for  Week 4  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=47&assessment=172 The assignment has to be submitted on or before  Wednesday, [23/08/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Assignment- 0, 1 & 2 Solution Released

Dear Learners, The   Assignment- 0, 1 & 2  of   Week- 0, 1 & 2 Solution  for the course " Ethical Hacking " has been released in the portal. Please go through the solution and in case of any doubt post your queries in the forum. Link for assignment 0 solution:   https://drive.google.com/file/d/1UMt2ygNr59vV6jH1vatmeeu8Gv0GUDyH/view?usp=drive_link Link for assignment 1 solution:   https://drive.google.com/file/d/1TrBT2Yk5c51ausARzmukKcBlRB2TrNeA/view?usp=drive_link Link for assignment 2 solution:   https://drive.google.com/file/d/1VJ5JUcCLki11EJlTitvsNq17oXuSSGRI/view?usp=drive_link Happy Learning! Thanks & Regards, NPTEL Team

Ethical Hacking - Week 3 Feedback Form

Nptel: ethical hacking: week 3 content and assignment is live now .

Dear Students, The lecture videos for  Week 3  have been uploaded for the course  Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=38&lesson=39 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 3  for  Week 3  is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=38&assessment=170 The assignment has to be submitted on or before  Wednesday, [16/08/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note:  Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Week 2 Feedback Form

Nptel: ethical hacking: week 2 content and assignment is live now .

Dear Students, The lecture videos for Week 2 have been uploaded for the course Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=29&lesson=30 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 2 for Week 2 is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=29&assessment=169 The assignment has to be submitted on or before Wednesday, [09/08/2023], 23:59 IST . As we have done so far, please use the discussion forums if you have any questions on this module. Note: Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Ethical Hacking - Week 1 Feedback Form

Ethical hacking - download video links are available now.

Dear Learners, The download video link for the course  Ethical Hacking is available now in the course outline. Please check the download video link:  https://nptel.ac.in/courses/106105217 -NPTEL Team

NPTEL: Ethical Hacking: Week 1 Content and Assignment is live now !!

Dear Students, The lecture videos for Week 1 have been uploaded for the course Ethical Hacking . The lectures can be accessed using the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=18&lesson=19 The other lectures of this week are accessible from the navigation bar to the left. Please remember to login into the website to view contents (if you aren't logged in already). Assignment 1 for Week 1 is also released and can be accessed from the following link:  https://onlinecourses.nptel.ac.in/noc23_cs75/unit?unit=18&assessment=168 The assignment has to be submitted on or before Wednesday, [09/08/2023], 23:59 IST. As we have done so far, please use the discussion forums if you have any questions on this module. Note : Please check the due date of the assignments in the announcement and assignment page if you see any mismatch write to us immediately. Thanks and Regards, --NPTEL Team

Stay Ahead of the Curve: Follow NPTEL for a Bright Future!!

Dear Learners Don't let knowledge pass you by! Stay in the loop with all the latest updates from NPTEL!  Follow us on social media to never miss a beat in your educational journey. Be the first to know about new courses, insightful articles, and exciting announcements.  Join our growing community. Tap those links below and let the learning adventure begin! Twitter: https://twitter.com/nptelindia?t=Yv1BextATpcwg7K2kOxbhg&s=08 Facebook:  https://www.facebook.com/NPTELNoc/ Instagram:  https://www.instagram.com/nptel_india/ LinkedIn: https://www.linkedin.com/mwlite/company/nptel YouTube: https://www.youtube.com/user/nptelhrd Happy learning!  Team NPTEL

Ethical Hacking- Assignment-0-RELEASED

Dear Learners, We welcome you all to this course. The assignment 0 for the course Ethical Hacking has been released.  This assignment is based on a prerequisite of the course. Kindly note that marks obtained in this assignment will not be considered for the final assessment.  You can find the assignment under Week 0 unit on the left-hand side of your screen. You can submit the assignment multiple times. All the best !!     --NPTEL Team

NPTEL: Exam Registration is open now for July 2023 courses!

Dear Learner, 

Here is the much-awaited announcement on registering for the July 2023 NPTEL course certification exam. 

1. The registration for the certification exam is open only to those learners who have enrolled in the course. 

2. If you want to register for the exam for this course, login here using the same email id which you had used to enroll to the course in Swayam portal. Please note that Assignments submitted through the exam registered email id ALONE will be taken into consideration towards final consolidated score & certification. 

3 . Date of exam: October 29, 2023

4. Exam fees: 

If you register for the exam and pay before Aug 14, 2023, 5:00 PM, Exam fees will be Rs. 1000/- per exam .

5. 50% fee waiver for the following categories: 

Students belonging to the SC/ST category: please select Yes for the SC/ST option and upload the correct Community certificate.

Students belonging to the PwD category with more than 40% disability: please select Yes for the option and upload the relevant Disability certificate. 

6. Last date for exam registration: Aug 18, 2023, 5:00 PM (Friday). 

7. Between Aug 14, 2023, 5:00 PM & Aug 18, 2023, 5:00 PM late fee will be applicable.

8. Mode of payment: Online payment - debit card/credit card/net banking/UPI. 

9. HALL TICKET: 

The hall ticket will be available for download tentatively by 2 weeks prior to the exam date. We will confirm the same through an announcement once it is published. 

10. FOR CANDIDATES WHO WOULD LIKE TO WRITE MORE THAN 1 COURSE EXAM:- you can add or delete courses and pay separately – till the date when the exam form closes. Same day of exam – you can write exams for 2 courses in the 2 sessions. Same exam center will be allocated for both the sessions. 

11. Data changes: 

Last date for data changes: Aug 18, 2023, 5:00 PM :  

We will charge an additional fee of Rs. 200 to make any changes related to name, DOB, photo, signature, SC/ST and PWD certificates after the last date of data changes.

The following 6 fields can be changed(until the form closes) ONLY when there are NO courses in the course cart. And you will be able to edit those fields only if you: - 

REMOVE unpaid courses from the cart And/or - CANCEL paid courses 

1. Do you come under the SC/ST category? * 

2. SC/ST Proof 

3. Are you a person with disabilities? * 

4. Are you a person with disabilities above 40%? 

5. Disabilities Proof 

6. What is your role ? 

Note: Once you remove or cancel a course, you will be able to edit these fields immediately. 

But, for cancelled courses, refund of fees will be initiated only after 2 weeks. 

12. LAST DATE FOR CANCELLING EXAMS and getting a refund: Aug 18, 2023, 5:00 PM  

13. Click here to view Timeline and Guideline : Guideline

Domain Certification

Domain Certification helps learners to gain expertise in a specific Area/Domain. This can be helpful for learners who wish to work in a particular area as part of their job or research or for those appearing for some competitive exam or becoming job ready or specialising in an area of study.  

Every domain will comprise Core courses and Elective courses. Once a learner completes the requisite courses per the mentioned criteria, you will receive a Domain Certificate showcasing your scores and the domain of expertise. Kindly refer to the following link for the list of courses available under each domain: https://nptel.ac.in/domains

Outside India Candidates

Candidates who are residing outside India may also fill the exam form and pay the fees. Mode of exam and other details will be communicated to you separately.

Thanks & Regards, 

Ethical Hacking:Welcome to NPTEL Online Course - July 2023!!

  • Every week, about 2.5 to 4 hours of videos containing content by the Course instructor will be released along with an assignment based on this. Please watch the lectures, follow the course regularly and submit all assessments and assignments before the due date. Your regular participation is vital for learning and doing well in the course. This will be done week on week through the duration of the course.
  • Please do the assignments yourself and even if you take help, kindly try to learn from it. These assignments will help you prepare for the final exams. Plagiarism and violating the Honor Code will be taken very seriously if detected during the submission of assignments.
  • The announcement group - will only have messages from course instructors and teaching assistants - regarding the lessons, assignments, exam registration, hall tickets, etc.
  • The discussion forum (Ask a question tab on the portal) - is for everyone to ask questions and interact. Anyone who knows the answers can reply to anyone's post and the course instructor/TA will also respond to your queries.
  • Please make maximum use of this feature as this will help you learn much better.
  • If you have any questions regarding the exam, registration, hall tickets, results, queries related to the technical content in the lectures, any doubts in the assignments, etc can be posted in the forum section
  • The course is free to enroll and learn from. But if you want a certificate, you have to register and write the proctored exam conducted by us in person at any of the designated exam centres.
  • The exam is optional for a fee of Rs 1000/- (Rupees one thousand only).
  • Date and Time of Exams: October 29, 2023 Morning session 9am to 12 noon; Afternoon Session 2 pm to 5 pm.
  • Registration URL: Announcements will be made when the registration form is open for registrations.
  • The online registration form has to be filled and the certification exam fee needs to be paid. More details will be made available when the exam registration form is published. If there are any changes, it will be mentioned then.
  • Please check the form for more details on the cities where the exams will be held, the conditions you agree to when you fill the form etc.
  • Once again, thanks for your interest in our online courses and certification. Happy learning.

A project of

nptel java week 3 assignment answers 2023

In association with

nptel java week 3 assignment answers 2023

  • Fri. Mar 31st, 2023

Brokenprogrammers

Learning platform for programmers

NPTEL Programming in Java Assignment 3 Answers 2023

' data-src=

By Brokenprogrammers

NPTEL Programming in Java Assignment 3 Answers 2023

Hello Learners, In this Post, you will find NPTEL Programming in Java Assignment 3 Week 3 Answers 2023 . All the Answers are provided below to help the students as a reference don’t straight away look for the solutions.

NPTEL Programming in Java Assignment 4 Answers Join Group👇

Note: First try to solve the questions by yourself. If you find any difficulty, then look for the solutions.

NPTEL Programming in Java Assignment 3 Answers 2023

NPTEL Programming in Java Assignment 3 Answers 2023:

We are updating answers soon Join Group for update: CLICK HERE

Q.1. Which of the following statement(s) is/are correct about the constructor?

  • a. Constructors cannot be synchronized in Java.
  • b. Java does not provide a default copy constructor.
  • c. A constructor cannot be overloaded.
  • d. “this” or “super” can be used in a constructor.

Q.2. Which of the following statement(s) is/are true?

  • a. You can write a new instance method in the subclass with the same signature as the one in the superclass, thus overriding it.
  • b. You can write a new static method in the subclass with the same signature as the one in the superclass, thus hiding it.
  • c. A subclass inherits all of its parent’s public and protected members, no matter what package the subclass is in.
  • d. You cannot declare new methods in the subclass that are not in the superclass.

Q.3. Consider the following piece of code.

Fill in the blank with the appropriate keyword(s) from the list given below so that the program compiles successfully.

  • a. abstract

nptel java week 3 assignment answers 2023

Q.4. How many instances of abstract class can be created?

  • d. Multiple

Q.5. Structuring a Java class such that only methods within the class can access its instance variables is referred to as __ .

  • a. object orientation
  • b. inheritance
  • c. platform independence
  • d. encapsulation

Q.6. Which of the following statement(s) is/are true?

  • a. A final method cannot be overridden in a subclass.
  • b. The advantage of private static methods is that they can be reused later if you need to reinitialize the class variable.
  • c. Class methods cannot use this keyword as there is no instance for this to refer to.
  • d. A final method can be overridden in a subclass.

Q.7. Consider the following piece of code.

Which of the following is the output of the above program.

  • b. There will be a compile-time error.
  • c. JavaJava.
  • d. The program will give a runtime error.

NPTEL Programming in Java Week 3 Answers Join Group👇

Q.8. consider the following program..

What is the output of the above program?

Q.9. Which of the following statement(s) is/are False?

  • a. Hiding internal data from the outside world and accessing it only through publicly exposed methods is known as data encapsulation.
  • b. Common behavior can be defined in a superclass and inherited into a subclass using the extends keyword.
  • c. The term “class variable” is another name for a non-static field.
  • d. A local variable stores a temporary state; it is declared inside a method.

Q.10. Which of the following statement(s) is/are true?

  • a. Static methods in interfaces are never inherited.
  • b. You will get a compile-time error if you attempt to change an instance method in the superclass to a static method in the subclass.
  • c. You can prevent a class from being subclassed by using the final keyword in the class’s declaration.
  • d. An abstract class can only be subclassed; it cannot be instantiated.

NPTEL Programming in Java Assignment 3 Answers Join Group👇

nptel java week 3 assignment answers 2023

Disclaimer : This answer is provided by us only for discussion purpose if any answer will be getting wrong don’t blame us. If any doubt or suggestions regarding any question kindly comment. The solution is provided by  Brokenprogrammers . This tutorial is only for Discussion and Learning purpose.

About NPTEL Programming in Java Course:

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. 

Course Layout:

  • Week 1   :  Overview of Object-Oriented Programming and Java
  • Week 2   :  Java Programming Elements
  • Week 3   :  Input-Output Handling in Java
  • Week 4   :  Encapsulation
  • Week 5   :  Inheritance
  • Week 6   :  Exception Handling 
  • Week 7   :  Multithreaded Programming 
  • Week 8   :  Java Applets and Servlets 
  • Week 9   :  Java Swing and Abstract Windowing Toolkit (AWT)
  • Week 10  : Networking with Java
  • Week 11 :  Java Object Database Connectivity (ODBC)
  • Week 12 :  Interface and Packages for Software Development

CRITERIA TO GET A CERTIFICATE :

Average assignment score = 25% of 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 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.

If you have not registered for exam kindly register Through https://examform.nptel.ac.in/

Related Post

Nptel data science for engineers assignment 6 answers 2023, nptel data mining assignment 6 answers 2023, nptel programming in java assignment 6 answers 2023, leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

NPTEL Data Base Management System Assignment 6 Answers 2023

Category: NPTEL

Programming in modern c++ | week 12, introduction to internet of things week 12, introduction to industry 4.0 and industrial internet of things | week 12, an introduction to artificial intelligence | week 12, the joy of computing using python | week 12, quantum mechanics 1 | week 12, programming in java | week 12, principles of management | week 12, leadership and team effectiveness | week 12, introduction to machine learning | week 12.

nptel java week 3 assignment answers 2023

  • Thursday, May 2, 2024

NPTEL Programming in Java Week3 Assignment Solution 2023

Programming-In-Java-Week3-Programming-Assignment-Solutions

NPTEL Programming in Java Week3 All Programming Assignment Solutions – Jan 2023 | Swayam. 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.

COURSE LAYOUT

  • Week 1 : Overview of Object-Oriented Programming and Java
  • Week 2 : Java Programming Elements
  • Week 3 : Input-Output Handling in Java
  • Week 4 : Encapsulation
  • Week 5 : Inheritance
  • Week 6 : Exception Handling
  • Week 7 : Multithreaded Programming
  • Week 8 : Java Applets and Servlets
  • Week 9 : Java Swing and Abstract Windowing Toolkit (AWT)
  • Week 10 : Networking with Java
  • Week 11: Java Object Database Connectivity (ODBC)
  • Week 12: Interface and Packages for Software Development

Course Name : “Programming in Java 2023”

Question : 1 This program is related to the generation of Fibonacci numbers.

For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8 th  Fibonacci number.

Question : 2  Define a class Point with two fields x and y each of type double . Also, define a method distance(Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double.

Question : 3 A class Shape is defined with two overloading constructors in it. Another class Test1 is partially defined which inherits the class Shape.  The class Test1 should include two overloading constructors as appropriate for some object instantiation shown in main() method . You should define the constructors using the super class constructors. Also, override the method calculate( ) in Test1 to calculate the volume of a Shape.

Question : 4 This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum( ) and multiply ( ) . You have to call these methods to find the sum and product of two numbers. Complete the code segment as instructed. 

Question : 5 Complete the code segment to swap two numbers using call by object reference.

IMAGES

  1. NPTEL Programming In Java Week 3 Programming Assignment Answers

    nptel java week 3 assignment answers 2023

  2. Programming in Java|| WEEK-3 Quiz assignment Answers 2023||NPTEL||#

    nptel java week 3 assignment answers 2023

  3. Programming In Java

    nptel java week 3 assignment answers 2023

  4. Programming in Java|| WEEK-3 Programming assignment Answers 2023||NPTEL

    nptel java week 3 assignment answers 2023

  5. NPTEL: Programming in Java Assignment 3 Quiz Answers |Week 3 Quiz

    nptel java week 3 assignment answers 2023

  6. NPTEL PROGRAMMING IN JAVA WEEK 3 ASSIGNMENT ANSWERS

    nptel java week 3 assignment answers 2023

VIDEO

  1. NPTEL Programming In Java WEEK 8 Quiz Assignment Solutions💡

  2. NPTEL Programming In Java WEEK 8 Programming Assignment Solutions💡

  3. NPTEL Programming In Java WEEK3 Quiz Assignment Solutions💡

  4. NPTEL Programming In Java WEEK8 Quiz Assignment Solutions💡

  5. Nptel Programming in Java Week 7 Assignment 7 Answers and Solutions 2024

  6. Data Structure And Algorithms Using Java || NPTEL Week 3 assignment answers

COMMENTS

  1. Programming in Java NPTEL Assignment Answers of Week 3 (2023)

    Programming Assignment Answers. Week 3 : Programming Assignment 1. Define a class Point with two fields x and y each of type double. Also, define a method distance (Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double. Complete the code segment given below.

  2. NPTEL Programming In Java WEEK3 Quiz Assignment Solutions

    🔊 NPTEL Programming In Java WEEK3 Quiz Assignment Solutions | Swayam July 2023 | IIT Kharagpur | GATE NPTEL⛳ABOUT THE COURSE :With the growth of Information...

  3. NPTEL Programming In Java WEEK3 Programming Assignment ...

    🔊 Programming In Java NPTEL Elective Course 2023 | GATE NPTEL | https://techiestalk.in/NPTEL Programming In Java WEEK3 Programming Assignment Solutions | Sw...

  4. PDF NPTEL IITm

    July-Dec 2023 semester. General. Events. ... For any queries regarding the NPTEL website, availability of courses or issues in accessing courses, please contact . NPTEL Administrator, IC & SR, 3rd floor IIT Madras, Chennai - 600036 Tel : (044) 2257 5905, (044) 2257 5908, 9363218521 (Mon-Fri 9am-6pm)

  5. Programming in Java nptel quiz solutions 2023 week 3 solutions

    programming in java nptel assignment solutions week 3. Consider the following piece of code. class A {public void display { System.out.println("A's display method");}} ... Introduction To Packet Tracer Quiz Answers 2023. Nptel Design And Analysis Of Algorithms Week 1 Quiz Solutions. NPTEL Soft Skills Assignment Answers 2023. News. Breaking ...

  6. NPTEL Programming in Java Week3 Assignment Solution July 2023

    Course Name : "Programming in Java 2023". Question : 4 This program to exercise the call of static and non-static methods. A partial code is given defining two methods, namely sum ( ) and multiply ( ). You have to call these methods to find the sum and product of two numbers. Complete the code segment as instructed.

  7. nptel-solutions · GitHub Topics · GitHub

    nptel 2021 programming-in-java nptel-solutions nptel-assignments programming-in-java-nptel-solutions nptel-java-solutions Updated Aug 1, 2021 ... NPTEL-The-Joy-of-Computing-using-Python with NOTES and Weekly quizes Answers. ... Python code from week-3 to week-12 for the NPTEL course The Joy of Computing using Python.

  8. NPTEL Programming In Java WEEK 3 Quiz Assignment Solutions

    🔊 Programming In Java NPTEL Elective Course 2023 | https://techiestalk.in/🔗Programming Assignment Link : https://bit.ly/3K0fba7NPTEL Programming In Java WE...

  9. bkkothari2255/Programming_In_Java_NPTEL

    Java Week 6:Q2 In the following program, a thread class ThreadRun is created using the Runnable interface which prints "Thread using Runnable interface". Complete the main class to create a thread object of the class ThreadRun and run the thread, Java Week 6:Q3 A part of the Java program is given, which can be completed in many ways, for example using the concept of thread, etc. Follow the ...

  10. Programming in Java

    Week 10: Networking with Java. Week 11: Java Object Database Connectivity. Week 12: Interface and Packages for Software Development. NOTE: You can check your answer immediately by clicking show answer button. Programming in Java NPTEL 2023 Week 3 Quiz Solutions" contains 10 questions. Now, start attempting the quiz.

  11. NPTEL Programming In Java Assignment 3 Answers July 2023

    NPTEL Programming In Java Week 3 Programming Assignment Solutions 2023. Q1. This program is related to the generation of Fibonacci numbers. For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8th Fibonacci number. A partial code is given and you have to complete the code as per the instruction given .

  12. Programming In Java

    The assignment 0 for the course Programming In Java has been released. This assignment is based on a prerequisite of the course. Kindly note that marks obtained in this assignment will not be considered for the final assessment. You can find the assignment under Week 0 unit on the left-hand side of your screen.

  13. NPTEL Programming In Java Week 3 Assignment Answers 2023

    NPTEL Programming In Java Week 3 Assignment Answers. Q1. Which of the following statement (s) is/are correct about the constructor? Answer: a. Constructors cannot be synchronized in Java. b. Java does not provide a default copy constructor. d. "this" or "super" can be used in a constructor.

  14. Programming In Java

    Programming In Java | Week 3 #Quiz Assignment Answers | NPTEL 2023 | Unique Jankari

  15. NPTEL Programming In Java Week 3 Assignment 3 Answers

    Solution: //Code. These are NPTEL Programming In Java Week 3 Assignment 3 Answers. Question 2. Define a class Point with two fields x and y each of type double. Also, define a method distance (Point p1, Point p2) to calculate the distance between points p1 and p2 and return the value in double. Solution:

  16. nptel-assignments · GitHub Topics · GitHub

    To associate your repository with the nptel-assignments topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

  17. Ethical Hacking

    The Assignment- 3 of Week- 3 Solution ... Here is the much-awaited announcement on registering for the July 2023 NPTEL course certification exam. ... Anyone who knows the answers can reply to anyone's post and the course instructor/TA will also respond to your queries. Please make maximum use of this feature as this will help you learn much ...

  18. NPTEL Programming in Java Assignment 3 Answers 2023

    Hello Learners, In this Post, you will find NPTEL Programming in Java Assignment 3 Week 3 Answers 2023. All the Answers are provided below to help the students as a reference don't straight away look for the solutions. NPTEL Programming in Java Assignment 4 Answers Join Group👇. Note: First try to solve the questions by yourself. If you ...

  19. NPTEL Programming In Java Week 3 Assignment 3 Answers ...

    Programming In Java Week 3 Assignment 3 Answers Solution Quiz | 2023-JanJoin our Telegram Channel : https://telegram.me/SwayamSolverNPTEL - Programming in Ja...

  20. NPTEL Assignment Answers And Solutions Jan-Apr 2024 Progiez

    NPTEL Assignment Answers and solutions of all courses. Week 1,2,3, 4, 5, 6, 7 , 8, 9, 10 ,11, 12 Answers. By Swayam platform. Jan Apr 2024 by progiez

  21. NPTEL NLP Week 8 Assignment Answers 2024: Homonymy & Synonymy

    a. Fruit is a hypernym of mango. b. Animal is hyponym of cat. c. Homographs are the words with the same pronunciation but di³erent spelling d. Bank (±nancial organization) vs Bank (riverside) is an example of homonym Answer: c. Homographs are the words with the same pronunciation but di³erent spelling Reason: Homographs are words that share the same spelling but have di³erent meanings ...

  22. NPTEL Programming in Java Week3 Assignment Solution 2023

    Course Name : "Programming in Java 2023". Question : 1 This program is related to the generation of Fibonacci numbers. For example: 0,1, 1,2, 3,5, 8, 13,… is a Fibonacci sequence where 13 is the 8th Fibonacci number. Question : 2 Define a class Point with two fields x and y each of type double. Also, define a method distance (Point p1 ...

  23. NPTEL NLP Week 6 Assignment Solutions: Parsing & Dependency

    View NPTEL Natural Language Processing Week 6 Assignment Answers 2023 - DBC Itanagar.pdf from CS 8602 at Govt. Postgraduate College, Gujranwala. NPTEL Natural Language Processing Week 6

  24. Programming in Java|| WEEK-3 Quiz assignment Answers 2023||NPTEL||

    Guys!!!For Exam preparation PDF MCQs, mail us at:[email protected] bits === 300/-(access for upto 3 members)300 bits === 500/-(access for upto 5 members)

  25. NPTEL Natural Language Processing Assignment Solutions

    View [Week 4] NPTEL Natural Language Processing Assignment Answers 2023 - DBC Itanagar.pdf from CS 8791 at Govt. Postgraduate College, Gujranwala. Notifications Powered by iZooto [Week 4] NPTEL

  26. Programming in Java|| WEEK-3 Quiz assignment Answers 2023||NPTEL||#

    Programming in Java|| WEEK-3 Quiz assignment Answers 2023||NPTEL||#SKumarEdu