FIT1051 Chapter Notes - Chapter 2: Instance Variable, Structured Document, Computer Language

65 views8 pages
Week 2
Saturday, 3 March 2018
5:46 PM
HOW JAVA APPLICATIONS WORK
An application is software that performs one or more specific tasks for a user.
A software is data and code that manipulates that data
Java is an Object Orientated Programming (OOP) language. In Java all data and code is contained in
textual structures called classes.
Classes are recipes of data items (not data item values) and code that manipulates these data items.
This recipe is used to create objects each containing its own independent set of the recipe's data
items. The Class's code can operate on individual objects to change or report on their data item's
current values.
The programmed interaction between these objects enables a Java application to perform its
required tasks.
OOP has been found to greatly increase the efficiency of programmers as well as dramatically
reducing the errors they make during creation and even more importantly during subsequent
maintenance of applications. As software has moved through the decades from novelty through
useful to absolutely essential, programmer efficiency and low error rates have also become
essential.
TEACHING AND LEARNING JAVA PROGRAMMING
Java is often considered a difficult language to teach and learn because even the simplest fully
functioning Java application requires a lot of Syntax.
"In computer science, the syntax of a computer language is the set of rules that defines the
combinations of symbols that are considered to be a correctly structured document or
fragment in that language" -Wikipedia.
If a code does not have correct syntax is cannot be translated to an executable form i.e. it won't run.
Semantics is the meaning of correct syntax
Useful techniques for complex text:
You can completely ignore right now (plumbing)
You should not touch because it may break the code (upset its syntax)
You can mess around with, try experiments with and generally have fun without breaking the
code
INTELLIJ
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 8 pages and 3 million more documents.

Already have an account? Log in
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 8 pages and 3 million more documents.

Already have an account? Log in
Variables are storage locations in a computer's memory. Variables have names which can be used to
both set the value at the variable's memory location and get the value currently stored there.
Variables also have a data type. Only data of this type can be stored at the variables memory
location.
Instance variables are special variables that hold the data item values of a class's objects. But like all
variables they need to be "declared" (given a name and data type) before use.
Methods: Syntax, inputs and outputs.
Both these methods concern themselves exclusively with the age instance variable allowing code
outside the class to indirectly access this variable (get and set its value) while protecting its integrity.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 8 pages and 3 million more documents.

Already have an account? Log in

Document Summary

An application is software that performs one or more specific tasks for a user. A software is data and code that manipulates that data. Java is an object orientated programming (oop) language. In java all data and code is contained in textual structures called classes. Classes are recipes of data items (not data item values) and code that manipulates these data items. This recipe is used to create objects each containing its own independent set of the recipe"s data items. The class"s code can operate on individual objects to change or report on their data item"s current values. The programmed interaction between these objects enables a java application to perform its required tasks. Oop has been found to greatly increase the efficiency of programmers as well as dramatically reducing the errors they make during creation and even more importantly during subsequent maintenance of applications.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents