Thursday, August 27, 2020

AN OVERVIEW OF JAVA PART 1 : SELF REVIEW QUESTIONS

 This is a part where learners are given the opportunity to test their knowledge level in JAVA.


QUESTIONS:

1. What is a hardware? What is a software?

2. What are the two primary functions of an operating system?

3. What happens to information when it is stored digitally?

4. How many unique items that can be represented with the following?

        a. 2 bits

        b. 4 bits

        c. 5 bits

        d. 7 bits

5. How many bits are there in each of the following?

        a. 8 bytes

        b. 2 KB

        c. 4 MB

6. What are the two primary hardware components in a computer?  How do they interact?

7. What is a memory address?

8. What does volatile mean? Which memory devices are volatile and which are not?

9. What is a file server?

10. What is the origin of the word Internet?

11. What is the relationship between high-level language and machine language?

12. What is JAVA bytecode?

13. Which of the following are not valid JAVA identifiers? Why?

        a. RESULT

        b. result

        c. 12345

        d. x12345y

        e. black&white

        f. answer_7

14. What do we mean by the syntax and semantics of a programming language?

15. What are the primary concepts that support object oriented programming?

 

Wednesday, August 26, 2020

JAVA: THE BEGINNERS' GUIDE

THE DIFFERENCE BETWEEN PROCEDURAL PROGRAMMING & OBJECT ORIENTED PROGRAMMING

 



All computer program holds two elements:














Ya... You guessed it right...data and code.

Furthermore, a program is organized when it is revolving around its code or data.  

Example of how some programs are written:

What is happening?
Who is being affected?

Two paradigms that govern how a program is executed:

Process Oriented model
    This approach characterizes a program as a series of linear steps (this relates to code).  This approach is regarded as code acting on data.

**Problems occur as program grows larger and more complex

Object Oriented Programming
    This approach is able to manage increasing complexity.  Object Oriented Programming organizes a program around its data (this will be objects).  This approach is characterized as data controlling access to code. 

**By switching the controlling entity to data, you can achieve organizational benefits.


ABSTRACTION

Abstraction or data abstraction is the process of hiding certain details and showing only essential information to the user.

Example:

From the outside, the car is a single object.  
Once you go in, you will notice that the car consists of steering, brakes, sound system, seat belts and more. 
In turn, these subsystems are made up of more special units.  For instance, the sound system consists of a radio, or even a CD player.

With this example, it shows the hierarchical abstraction of complex systems which can also be applied to computer programs.
    
ENCAPSULATION, INHERITANCE & POLYMORPHISM


Encapsulation is the mechanism that binds together code and the data it manipulates and keeps both safe from the outside interference and misuse.


AN INTRODUCTION TO JAVA:




A SHORT HISTORY OF - JAVA

JAVA  has lots of connection with C++.  C++ is an inheritance from C.  JAVA derives its syntax from C.

Many of JAVA object oriented features are influenced from C++ language.  

JAVA was conceived by a group of programmers at Sun Microsystems in 1991.  It actually took them 18 months to develop the first working version.

This language was developed to allow the evolution of platform independent language which can be used to create software that can be embedded into consumer electronic devices.  This technology can be seen and experienced  by us today.

Because of the similarities between JAVA and C++, it is very obscure to think that JAVA is the internet version of C++.  However, JAVA has practical and philosophical differences.  

**JAVA was not built to replace C++, it was built to solve a certain set of problems.

The reality of why computer languages evolved:

To adapt changes to environment

To implement advances in the art of programming 


JAVA APPLET

Applets are intended to be small programs.  They are used in displaying data provided by the server, handle user input or provide simple functions - loan calculator.


JAVA NAMING CONVENTIONS CAN BE FOUND HERE:


JAVA GUIDE: VIDEOS ON OBJECT ORIENTED PROGRAMMING

DIFFERENCES BETWEEN CONSTRUCTOR AND METHOD DIFFERENCES BETWEEN ARRAY AND LINKED LISTS HOW TO CREATE A SIMPLE LINK LISTS WITH 3 NODES I...