0% found this document useful (0 votes)
13 views12 pages

Java Programming Fundamentals Guide

The document outlines the syllabus for a Java programming course at Savitribai Phule Pune University, focusing on Java fundamentals and object-oriented programming concepts. It includes detailed topics for each unit, such as Java features, classes, objects, and control statements, along with important questions for examination preparation. The document emphasizes the comparison between Java and C++ in terms of object-oriented features, highlighting key differences and similarities.

Uploaded by

ghostofdark601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views12 pages

Java Programming Fundamentals Guide

The document outlines the syllabus for a Java programming course at Savitribai Phule Pune University, focusing on Java fundamentals and object-oriented programming concepts. It includes detailed topics for each unit, such as Java features, classes, objects, and control statements, along with important questions for examination preparation. The document emphasizes the comparison between Java and C++ in terms of object-oriented features, highlighting key differences and similarities.

Uploaded by

ghostofdark601
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

`

Savitribai Phule Pune University


2019 Pattern
( As Per New Revised Syllabus )

ScoreBooster

Fundamentals of JAVAFor

Programming

Semester- V
Electronics & Tele. Engineering
-: Syllabus Topic :-
:-

Unit I JAVA Fundamentals

Syllabus Topics :
Review of Object oriented concepts, Evolution of Java, Comparison of Java with other
programming languages, Java features, Java and World Wide Web, Java Run Time
Environment. JVM architecture. Overview of Java Language, Simple Java Program, Java
Program Structure. Installing and Configuring Java. Java Tokens, Java Statements,
Constants, variables, data types. Declaration of variables, Giving values to variables, Scope
of variables, arrays, Symbolic constants, Typecasting, Getting values of variables,
Standard default values, Operators, Expressions, Type conversion in expressions,
Operator precedence and associatively, Mathematical functions, Control statements-
Decision making & looping.

Unit II Classes and Objects

Syllabus Topics :
Class Fundamentals, Creating Objects, Accessing Class members, Assigning Object
reference variables, Methods, Constructors, using objects as parameters, Argument
passing, returning objects, Method Overloading, static members, Nesting of Methods ,
this keyword, Garbage collection, finalize methods, , final variables and methods, final
class.
-: Imp, Expected & Pyq’s Question :-
:-

Unit I JAVA Fundamentals

Imp, Expected & Pyq’s Question :

1. Enlist and explain various object oriented concepts with reference to Java
Programming language. [8]

2. With reference to various object oriented features, compare C++ and Java
programming languages. [8]

3. Explain various features of Java programming language. [5]

4. How Java is useful in world wide web? Write a Java program to check whether an
alphabet is vowel or consonant. [7]

5. Draw and explain JVM architecture. [5]

6. Explain different types of Java statements with suitable examples. [5]

7. How constants are declared in Java? Write a Java program to check whether a
number is even or odd. [7]

8. Explain the different data types in Java. [5]

9. Explain variable declaration and initialization in Java. [5]

10. What is an array? With suitable example, explain in how arrays are used in Java
programming. [7]

11. What are symbolic constants in Java? How are they declared? [5]

12. What are different types of operators used in Java? With suitable example,
explain type conversion in expressions. [8]
13. How do you get input from the user in Java and what are the standard default
values for data types? [5]

14. Explain precedence and associativity of operators in Java. Explain any two built-in
mathematical functions in Java. [8]

15. Write a short note on control statements in Java. [7]

16. What are control statements? Explain various control statements used in Java
programming. [8]

17. The straight line method of computing the yearly depreciation of the value of an
item is given by:
Purchase price - Salvage value = Depreciation × Years of service. Write a Java
program to determine the salvage value of an item when the purchase price, years
of service and the annual depreciation is given. [8]

18. For a certain electrical circuit with an inductance L and resistance R, the damped
natural frequency is given by:
Frequency = sqrt(1 / (LC) - (R^2 / (4C^2)))
Write a Java program which will accept L, C and R values from the user and will
display the frequency. [8]

19. Write a Java assignment statement to evaluate the following expression:


Torque = (m1 * m2 * g) / (m1 + m2) [2]
Unit II Classes and Objects

Imp, Expected & Pyq’s Question :

1. What is a class in Java? Explain its structure with an example. [5]

2. Explain assigning object reference variables in Java. [5]

3. Define methods in Java. How are they declared and called? [5]

4. What is a constructor? What are its special properties? [4]

5. What is a constructor? Explain constructor overloading in Java. [7]

6. Explain a concept of constructor overloading with suitable example. [8]

7. Can objects be passed to and returned from methods in Java? Explain with suitable
programming example. [8]

8. What is method overloading in Java? Give example. [5]

9. Explain the use of ‘static’ keyword in Java. What are static members and static
methods in Java? [7]

10. Explain following: i) Static variables ii) Static methods [4]

11. What is method nesting in Java? Explain with example. [5]

12. What is ‘this’ keyword in Java? How it is used in Java Programming? [8]

13. Explain the meaning of garbage collection in Java. What is the use of finalize( )
method in garbage collection? [8]
14. What is garbage collection in Java? How it is important to Java programming? [7]

15. With suitable example, explain ‘final’ keyword in Java. [7]

16. What are access modifiers? How they are used in Java programming. [8]

17. Explain access specifiers in Java. [3]

18. Write a program in Java to calculate the factorial of any number given. [3]

19. Write a Java program to design a class date, including the following members: [8]
A) Data members:
1. day
2. month
3. year
B) Methods:
4. Constructor to initialize the date object
5. Display method to display date in format dd:mm:yyyy
Write a program to invoke all the methods.
Unit 1 : Java Fundamentals

(Review of Object Oriented Concepts)


Pyq Question:
 Enlist and explain various object oriented concepts with reference to Java
Programming language. [8]

Introduction:
 Object-Oriented Programming (OOP) is a programming approach that focuses on
using objects and classes to model real-world entities.
 Java is a fully object-oriented language and supports all the fundamental principles
of OOP to build modular and reusable code.

Definition:
 Object-Oriented Concepts in Java refer to the core principles that support object-
based programming structure, enabling better code organization and reuse.

Object:
 An object is an instance of a class that holds both data (variables) and methods
(functions) related to a specific entity or behavior.
 In Java, objects are created using the new keyword and interact with each other
to perform tasks in the program.

Class:
 A class acts as a blueprint or template for creating objects, defining attributes
(data) and methods (behavior).
 Java class can include variables, constructors, methods, and nested classes to
define the structure and behavior of objects.

Encapsulation:
 Encapsulation is the process of wrapping data and methods that operate on that
data into a single unit called class.
 In Java, encapsulation is achieved by using access modifiers like private, public, and
protected, along with getter and setter methods.
Abstraction:
 Abstraction means hiding internal details and showing only the essential features
to the user.
 In Java, abstraction is implemented using abstract classes and interfaces to define
methods without showing internal logic.

Inheritance:
 Inheritance is the mechanism in Java by which one class can inherit properties and
behavior from another class using the extends keyword.
 It promotes code reuse and establishes a parent-child relationship between classes,
allowing hierarchical classification.

Polymorphism:
 Polymorphism allows one interface to be used for different underlying data types
or implementations.
 In Java, it is achieved in two ways: compile-time polymorphism (method overloading)
and runtime polymorphism (method overriding).

Message Passing:
 Message passing in Java refers to the process of objects communicating with each
other by sending and receiving information via method calls.
 It allows inter-object interaction, enabling modular design and efficient task
delegation within the program.

Dynamic Binding:
 Dynamic binding refers to the process of resolving method calls at runtime based
on the object type rather than the reference type.
 Java uses dynamic binding when a parent class reference is used to call overridden
methods in the subclass during runtime.

Reusability:
 Reusability means using existing code to build new features or functionalities with
minimal duplication.
 Java supports reusability through classes, inheritance, interfaces, and packages
which help in developing modular and maintainable code.

Modularity:
 Modularity is the division of a program into independent modules or components,
each responsible for specific functionality.
 Java achieves modularity using classes and packages, making code more organized
and easier to manage and debug.

Summary of Java OOP Principles:


 Java fully supports object-oriented concepts that help in organizing, structuring,
and reusing code effectively.
 These concepts provide the foundation for building large-scale, maintainable, and
secure applications using Java.

(Comparison of C++ and Java based on Object-Oriented Features)


Pyq Question:
 With reference to various object oriented features, compare C++ and Java
programming languages. [8]

Introduction:
 Both C++ and Java are object-oriented programming languages, but they differ in
their approach and implementation of OOP features.
 The comparison is based on core object-oriented concepts like inheritance,
abstraction, encapsulation, and polymorphism.

Definition:
 Object-Oriented Features are the building blocks that allow a programming
language to represent real-world entities through classes, objects, and reusable
components.
 C++ supports both procedural and object-oriented styles, whereas Java is a purely
object-oriented language.

Class and Object:


 In both C++ and Java, classes define the structure and behavior of objects using
variables and methods.
 Java requires everything (except primitive data) to be written inside a class, while
C++ allows functions and variables outside the class.

Encapsulation:
 Both C++ and Java support encapsulation using access specifiers like private, public,
and protected to control access to class members.
 Java enforces better encapsulation by organizing code into packages and using
getter-setter methods for secure access.

Inheritance:
 C++ supports multiple inheritance, where a class can inherit from more than one base
class directly.
 Java does not support multiple inheritance through classes but achieves it using
interfaces to avoid ambiguity problems.

Abstraction:
 Abstraction in C++ is achieved using abstract classes and pure virtual functions,
hiding implementation from the user.
 Java uses abstract classes and interfaces to achieve abstraction and supports
stronger abstraction through enforced method implementation.

Polymorphism:
 C++ and Java both support polymorphism in the form of function overloading and
method overriding.
 Java binds overridden methods at runtime (dynamic binding), while C++ supports
both static and dynamic binding using virtual functions.

You might also like