Computer-Programmimg Java J-SHS Quarter-2 LAS-7 Week-7 Final
Computer-Programmimg Java J-SHS Quarter-2 LAS-7 Week-7 Final
Computer-Programmimg Java J-SHS Quarter-2 LAS-7 Week-7 Final
Name of Learner:_____________________________________________________
Grade and Section:_________________________________Date: ______________
The following are key terms that you should get familiar with in learning
IDE. These are the following:
● Window System – a framework controlling behavior of windows and
document windows. Window system doesn't control behavior of dialog
boxes, which are native windows controlled by native window
manager.
● Main Window – the main NetBeans window containing main menu,
toolbars, status line and in MDI mode also windows and document
windows. In SDI the main window doesn't contain windows, neither
document windows.
● Window– basic window system element, also called "IDE Window" in
SDI. Note: Some images below use the old terminology and refer to
Window as View.
● Document Window– a special type of window with different behavior
and characteristics than regular window. Document Window is part of
the window system. Some images below use the old terminology and
refer to Document Window as Editor.
● Dialog Box – a special native window controlled by native window
manager. Dialog boxes are not part on NetBeans window system, and
are not covered by this spec.
● Window Area – area inside the main window used for laying out
Windows. Some images below use the old terminology and refer to
Window Area as View Area.
● Document Area – area inside the main window (surrounded by
Window Area) used for laying out Document Windows. Some images
below use the old terminology and refer to Document Area as Editor
Area.
● Status Line – a component displaying status of an action performed
in IDE. This is not the status line of editor window or explorer
windows. Those status lines are part of those components and this
specification doesn't define their behavior. The status line is also
called "Status bar".
Detailed Descriptions
● Main Window
Main window is a container for application menu, toolbars, status line
and windows which are provided and controlled by the window system.
All of the windows are always displayed inside the main window, neither
user can separate them out of the main window. The windows are shown
in two areas depending on a type of displayed window. The areas are a
document area and window area. The document area is used for
document windows, and the window area lays out all of the other
windows.
Figure 3.1 Main Window of Netbeans
● Netbeanslayout
NetBeans layout is distributed in 4 main areas identified by its
numbers in the graphic:
o Control area
o Reference area
o Working area
o Status area
Figure 3.2 Netbean Layout
Quick launch bar-Few of the most common used actions are available
through quick launch bar icons. It is located between main menu and the
other working areas. It is integrated by smaller and thematic quick
launch bars called Toolbars.
Figure 3.4 Quick Launch Bar
Search tool- This tool let you find topic inside NetBeans topics. For
source code or project searches there are other tools. You can find more
information out here.
Filename: MyFirstJavaProgram.java
Folder Name: MYJAVAPROGRAMS
Note: The path may vary for the specified folder in the installation of
Java in your machine.
To compile a Java Program, type in the command: javac[filename]
So, in this case, type in: javac MyFirstJavaPrograms.java during
compilation, javac adds a file to the disk called [filename].class, or in
this case, MyFirstJavaPrograms.class, which is the actual bytecode.
Java Errors
In MyFirstJavaPrograms example, we didn’t encounter any problems in
compiling and running the program. However, in programming this is not
always the case. In Java, there are two types of errors: Syntax Errors and
Run-time Errors.
1. Syntax Errors
Syntax Errors occur after compilation of a Java Program. They are
usually typing errors of the syntax of the Java source code. Java
attempts to isolate the error by displaying the line of code and pointing
to the first incorrect character in that line. However, the problem may
not be at the exact point.
Common syntax errors in Java are misspelled Java commands, or
forgotten semicolon at the end of a statement. Other common mistakes
are capitalization, spelling, use of incorrect special characters, and
omission of correct punctuation.
Example: In our MyFirstJavaProgram.java code, we intentionally omit
one semicolon at the end of one statement and type a command
incorrectly. The error messages are then generated after compiling the pr
ogram.
Figure 4.6: MyFirstJavaPrograms code typed incorrectly
2. Run-time Errors
Run-time Errors are errors that will not display until you run or execute
the program. Even programs that compile successfully may display
wrong answers if the programmer has not thought the logical processes
and structures of the program.
++ ++op Increments op by 1;
evaluates to the value
of op after it was
incremented
-- op-- Decrements op by 1;
Evaluates to the value
of op before it was
decremented
-- --op Decrements op by 1;
Evaluates to the value
of op after it was
decremented
Table 1. Increment and Decrement Operators
Example:
public class MySecondJavaProgram
{
public static void main (String[] args)
{
int a= 2;
int b= 5;
System.out.println (“Variable value:”);
System.out.println (“a=” + a);
System.out.println (“b=” + b);
}
}
III. Accompanying DepEd Textbook and Educational Sites (With
Possible Materials for experiments/activities)
NetBeans Developing Applications with NetBeans IDE. (n.d.). Retrieved July 5, 2020,
from Oracle.com:
https://docs.oracle.com/netbeans/nb81/netbeans/develop/gs_nbea
ns.htm#NBDAG111
Paon, J. (2013, June 6). Java programming with NetBeans – NetBeans layout.
Retrieved July 5, 2020, from Wordpress.com:
https://joanpaon.wordpress.com/2013/06/28/java-programming-with-
netbeans-netbeans-layout/
Rojcek, J., & Tichy, G. (n.d.). User Interface Specification: Window System, Final
Draft. Retrieved July 5, 2020, from netbeans.org:
https://ui.netbeans.org/docs/ui/ws/ws_spec.html
2. It refers to errors that will not display until you run or executes the
program.
a. Syntax error c. Run-time error
b. Timing Error d. Program Error
Output 5 4 3 2
https://www.w3schools.com/
1.4.
Rubric for Scoring
Criteria Score
Completeness (5 points) Does
your response directly answer 5 4 3 2 1
each part of the question(s)?
Knowledge (10 points) Does
your response clearly show you
have read and understand the
lesson content by correctly 10-9 8-7 6-5 4-3 2-1
defining key terms, key persons
and summarizing concepts?
Have you made inferences based
on this knowledge to personal or
modern-day applications?
Writing Skills (5 points) Does
you write clearly, in complete 5 4 3 2 1
sentences, with minimal errors
in grammar and spelling