Kartik 3pdf
Kartik 3pdf
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
If already
registered, click
to check your
Week 03 : Assignment 03
payment status The due date for submitting this assignment has passed.
Due on 2024-02-14, 23:59 IST.
https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&assessment=296 1/5
5/21/24, 9:50 AM Programming In Java - - Unit 6 - Week 3 :
-V (unit?
unit=34&lesso
n=36)
Lecture 13 :
Inheritance
(unit?
unit=34&lesso
n=37)
Lecture 14 :
Demonstration
-VI (unit?
unit=34&lesso
n=38)
Lecture 15 :
Information
Hiding (unit?
unit=34&lesso
n=39)
Quiz: Week
03 :
Assignment
a. 0
03
(assessment? b. 1
name=296) c. 2
Assignment 3 d. Compilation Error
Solution (unit?
Yes, the answer is correct.
unit=34&lesso Score: 1
n=41)
Accepted Answers:
Week 3 c. 2
Feedback
4) In Java, is it possible to override a static method? 1 point
Form (unit?
unit=34&lesso
a. Yes, we can override a static method just like we do with instance methods.
n=40)
b. No, static methods cannot be overridden because they belong to the class, not the
Week 4 : () object.
c. It depends on whether the static method is declared as final or not.
Week 5 : () d. It depends on the access modifier of the static method.
Week 8 : ()
5) What is the output of the following Java program? 0 points
Week 9 : ()
Week 10 : ()
Week 11 : ()
https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&assessment=296 2/5
5/21/24, 9:50 AM Programming In Java - - Unit 6 - Week 3 :
Week 12 : ()
DOWNLOAD
VIDEOS ()
Books ()
Text
Transcripts ()
Problem
Solving
Session -
Jan 2024 ()
a. "The vehicle moves"
b. "The car moves"
c. The code does not compile
d. None of the above
6) What is the output of the below Java program with inheritance? 1 point
a. Sweet=$10 Sugar=$20
b. Sweet=$10 Sugar=$10
c. Sweet=$20 Sugar=$20
d. Compiler error
https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&assessment=296 3/5
5/21/24, 9:50 AM Programming In Java - - Unit 6 - Week 3 :
Y h i
https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&assessment=296 4/5
5/21/24, 9:50 AM Programming In Java - - Unit 6 - Week 3 :
a. Yes, we can override a static method just like we do with instance methods.
b. No, static methods cannot be overridden because they belong to the class, not the
object.
c. It depends on whether the static method is declared as final or not.
d. It depends on the access modifier of the static method.
https://onlinecourses.nptel.ac.in/noc24_cs43/unit?unit=34&assessment=296 5/5