0% found this document useful (0 votes)
9 views2 pages

Key Java and UML Concepts Explained

Uploaded by

ghostlonewolfvn6
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)
9 views2 pages

Key Java and UML Concepts Explained

Uploaded by

ghostlonewolfvn6
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

MODULE -1 IMPORTANT QUESTIONS

1. Write short notes on any three Object Oriented concepts.


2. Write a note on final keyword in Java.
3. Construct a UML Activity diagram for Food Ordering System, which shows the flows
between the activity of Order, Delivery, Food ltem, Category, Payment.
4. Differentiate between the two main approaches of software design or Differentiate between
function oriented and object oriented software design
5. approaches using a suitable example.
6. What is Use Case Diagram ? Construct Use Case diagrams for the following
ATM ii) Railway reservation
7. Compare and contrast Java Applets and Java Application.
8. Describe Garbage collection in Java.
9. What is Java Runtime Environment? What is the role of Java Virtual Machine in it?
10. Construct Use Case diagram for Library management system.
11. Explain Java program structure with example
12. Describe the features of Java language with description
13. Use case diagram of online railway ticket reservation system
14. Why are java programs are platform independent

15. Explain the terms: Polymorphism and Encapsulation


16. Consider a Banking System. Identify three entities in the system which can be
represented using classes and show the relationship between them using UML class
diagrams
17. Draw Use case Diagram for online Pizza ordering system
18. What is the role of Java Virtual Machine?
19. Explain Object Oriented System Development Life Cycle.
20. What is Just-In-Time compiler?
21. Why Java is said to be a secure programming language?
22. Why is the ‘main’ method in Java qualified as public, static, and void?
23. Construct a UML Class diagram for Online Movie Ticket Booking System. The various entities
involved in the system are Admin, Registered User, Visitor /Guest User, Movie, Book Ticket,
Make Payment.
24. Consider the problem of a Service Station which provides three types of
services to its customers: refuelling, vehicle maintenance and parking.
Customer can pay using cash, card or cheque. The pricing for vehicle
maintenance depends on the cost of parts and labour. Parking areas are rented
according to weekly and monthly rates. Construct an UML class diagram for
the above problem by identifyingatleast six entities in the system which can
be represented using classes and show the relationship between them
25. Describe programming structure of Java that deals with the organization of
Java code
26. Construct a UML Activity diagram for an online Hotel Reservation System,
which shows the flow of activities for booking rooms at a hotel.
27. Outline the reasons as of why Java programs are known as “Write Once and
Run Anywhere” programs?
28. Define encapsulation with a proper example.
29. Construct a Use Case Diagram for an online music playing system
30. What are the advantages of using UML diagram
31. Illustrate the steps involved in Java compilation
32.

33.

34. Why Java programs are said to be robust?


35. Represent the entities ‘Student’ and ‘Course’ and their relationship using a class diagram
36. Construct Use-case diagram for online shopping applications

Common questions

Powered by AI

Java is considered platform-independent because Java programs are compiled into bytecode, which is interpreted by the Java Virtual Machine (JVM) rather than directly executed on the hardware. This allows Java programs to run on any device equipped with a JVM, embodying the philosophy of 'Write Once, Run Anywhere' by providing consistent behavior across different platforms without modification .

The Object-Oriented System Development Life Cycle comprises stages such as requirement analysis, system design, object modeling, implementation, testing, deployment, and maintenance, each focusing on developing, using, and reusing objects. Its significance lies in promoting modular and scalable code, enhancing code reusability through inheritance and encapsulation, improving maintenance with object abstraction, and fostering closer alignment with real-world entities .

Encapsulation in Java is achieved through the use of access modifiers like private, protected, and public. For example, consider a class 'Account' with private variables 'balance' and public methods 'getBalance' and 'setBalance.' This design allows controlled access to 'balance' through these methods, ensuring its value is safe from inconsistent states .

Garbage collection in Java is the process by which the Java Virtual Machine (JVM) identifies and discards objects that are no longer in use to reclaim memory resources automatically. This process helps in preventing memory leaks by making the memory of unused objects available for future allocation, significantly contributing to effective memory management and overall application stability .

The 'main' method is public so it can be accessed by the Java runtime; static so it can be invoked without needing an object (as the entry point before any objects are created); and void because it does not return any value. This method serves as the starting point of execution for any standalone Java application .

UML (Unified Modeling Language) helps visualize, specify, construct, and document software systems, ensuring clear communication among development team members by providing a standard way to visualize system architecture . Advantages of UML diagrams include providing a clear blueprint of software projects, allowing early problem detection, enabling better stakeholder communication, and easing system maintenance and scalability .

Three core concepts of OOP are encapsulation, inheritance, and polymorphism. Encapsulation involves bundling the data (variables) and methods that operate on the data into a single unit or class, providing access through public methods only . Inheritance allows a new class to inherit properties and behavior from an existing class, promoting code reuse and hierarchical classifications . Polymorphism allows methods to do different things based on the object it is acting upon, typically achieved through method overriding and overloading .

The Java Virtual Machine (JVM) is a critical component of the Java Runtime Environment (JRE), executing Java applications by converting bytecode into machine code specific to the native operating system and hardware. The JVM provides platform independence by abstracting away the specifics of the underlying architecture . It manages memory through garbage collection and ensures runtime constraints and security measures are enforced .

Java applets are small Java programs that run within a web browser and need a Java plug-in, providing functionality over the web . They emphasize graphical user interface aspects. Java applications are standalone programs executed by the Java runtime environment, either as console or GUI-based applications. They run on a client machine without necessarily requiring a browser interface .

Function-oriented software design focuses on decomposing the system into a set of interacting functions, each performing a certain task . It's process-oriented and often represented using data flow diagrams. Object-oriented software design decomposes the system into objects that encapsulate data and behavior, promoting reuse and flexibility through principles like inheritance and polymorphism . An example is designing a banking system where function-oriented might break down the system based on operations like 'deposit' and 'withdraw', while object-oriented will center around entities like 'Account' and 'Transaction' .

You might also like