Skip to main content

Posts

Java Program to implement inheritance || Java Programming Lab Exercise 2.1

  IMPLEMENTATION OF INHERITANCE What is Inheritance ? Ø   The process by which one class acquires the properties(data members) and functionalities(methods) of another class is called  inheritance . Ø   The aim of inheritance is to provide the reusability of code so that a class has to write only the unique features and rest of the common properties and functionalities can be extended from the another class. Aim:             To write a java program to implement the concept of inheritance. Procedure: Open text editor(notepad) Create a base class called “StudentBase” Declare & define department, collegeName as private data members of string datatype. Since the private data members cannot be   accessed directly, we are using public getter & setter methods   to access the private members of base class Create a derived class called “StudentDerive” that extends the base class “StudentBase” Declare & define regNo, sName as default data members of string datatype.  
Recent posts

Operating System || Unit I || Process Management

  Operating System Unit I Process Management Introduction to Process: A program in execution is called a process. The execution of a process must progress in a sequential fashion. In order to complete its task, process needs the computer resources. A process can be defined as an entity which represents the basic unit of work to be implemented in the system. The operating system has to manage all the processes which require the same resource at the same time , in a convenient and efficient way. The Process Management Involves, Scheduling processes and threads on the CPUs. Creating and deleting both user and system processes. Suspending and resuming processes. Providing mechanisms for process synchronization. Providing mechanisms for process communication. Process Architecture A program becomes a process, when it is loaded into the memory. A process in memory can be divided in 4 sections