100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

Lecture Notes - Computer Science CSC1016S (2021) - Absolute Java

Rating
3.0
(1)
Sold
6
Pages
158
Uploaded on
30-11-2021
Written in
2021/2022

Entire Syllabus Notes for First-Year, Computer Science 1016 Second Semester Course! All Summaries and Important Parts, Detailed and In-Depth.

Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Course

Document information

Uploaded on
November 30, 2021
Number of pages
158
Written in
2021/2022
Type
Class notes
Professor(s)
Aslam safla
Contains
All classes

Subjects

Content preview

CSC1016s
2021

, OOP in Java
(Object-Orientated Programming)

Procedural Programming
o Writing procedures that perform data operations.

Object-Orientated Programming
o Creating objects that contain both data and methods.

Why OOP is better than PP:
 Faster and easier to execute.
 Provides a clear structure for the programs.
 Helps to keep Java ode DRY (Don’t Repeat Yourself),
making the code easier to maintain, modify, and debug.
 Makes it possible to create full reusable apps in less code
and shorter development time.


Introduction to Java
 Considered a language for Internet apps.
 General purpose programming language.
 Syntax is similar to that of other high-level languages.


Origins
 Created by Sun Microsystems, led by James Gosling, in ’91.
 Now, owned by Oracle.
 Originally designed for programming home appliances.
o Difficult task, as appliances are controlled by a wide
range of computer processers.

, o Team developed a two-step translation process to
simplify the task of compiler writing for each
appliance class…

• Writing a compiler (translation program) for each
appliance processer type = expensive.
• Rather, developed intermediate language that I the
same for all processor types: Java byte-code.
• Thus, only a small, easy-to-write program was needed to
translate byte code to machine code for each
processor.

 In 1994, at Sun Microsystems, Patrick Naughton and
Jonathan Payne developed a Web browser that could run
programs over the Internet.
o Beginning of Java’s connection to the Internet.
o Original browser evolves into HotJava.
…other companies followed suit.

Objects and Methods
 OOP is a programming methodology that views programs
as consisting of objects that interact through methods.
 Objects of the same kind have same type or in same class.

Java Application Programs
Two types…
Application Programs
 “regular”
 A class with a method named main.
 When run, the run-time system automatically invokes main.
 All start with the main method.
 May use a windowing interface or console IO.

, Applet Programs
 “Little Java application”
 Meant to be run from a Web browser.
 Can be run from a location on the Internet.
 Can be run on Applet viewer program for debugging.
 Always use a windowing interface.

Computer Language Levels
High-Level Language:
…people can read, write, and understand.
 Must be translated into a language that can be
understood by a computer before it can be run.

Machine Language:
…computer can understand.

Low-Level Language:
…Machine Language / any similar to Machine Language.

Compiler:
…program that translated High-Level Language programs
into equivalent Low-Level Language programs.
 Translation process = compiling.

Reviews from verified buyers

Showing all reviews
3 year ago

3.0

1 reviews

5
0
4
0
3
1
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
NoteSeller102 University of Cape Town
Follow You need to be logged in order to follow users or courses
Sold
10
Member since
4 year
Number of followers
9
Documents
7
Last sold
1 year ago

3.0

3 reviews

5
0
4
0
3
3
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions