The document lists the course titles for a computer engineering degree program. It includes courses in areas such as computer programming, information technology, programming methodology, discrete structures, computer organization, digital logic, algorithms, databases, software engineering, computer systems, networking, and more. The program provides students with a well-rounded education covering both the hardware and software aspects of computer engineering.
This document provides an overview of object-oriented analysis and design. It defines key terms and concepts in object-oriented modeling like use cases, class diagrams, states, sequences. It describes developing requirements models using use cases and class diagrams. It also explains modeling object behavior through state and sequence diagrams and transitioning analysis models to design.
The document lists the course titles for a computer engineering degree program. It includes courses in areas such as computer programming, information technology, programming methodology, discrete structures, computer organization, digital logic, algorithms, databases, software engineering, computer systems, networking, and more. The program provides students with a well-rounded education covering both the hardware and software aspects of computer engineering.
This document provides an overview of object-oriented analysis and design. It defines key terms and concepts in object-oriented modeling like use cases, class diagrams, states, sequences. It describes developing requirements models using use cases and class diagrams. It also explains modeling object behavior through state and sequence diagrams and transitioning analysis models to design.
This document provides an overview of object-oriented programming (OOP) including:
- The history and key concepts of OOP like classes, objects, inheritance, polymorphism, and encapsulation.
- Popular OOP languages like C++, Java, and Python.
- Differences between procedural and OOP like top-down design and modularity.
The document discusses key concepts in object-oriented programming including objects, classes, messages, and requirements for object-oriented languages. An object is a bundle of related variables and methods that can model real-world things. A class defines common variables and methods for objects of a certain kind. Objects communicate by sending messages to each other specifying a method name and parameters. For a language to be object-oriented, it must support encapsulation, inheritance, and dynamic binding.
- Java applets allow Java programs to run within web browsers. All applets extend the Applet class and override lifecycle methods like init(), start(), stop(), and destroy().
- To create an applet, you define its structure using these lifecycle methods and draw to the screen using the Graphics object's drawing methods. Applets are compiled and run within HTML using the <applet> tag.
- Applets differ from standalone Java applications in that they have security restrictions and run within a web browser rather than having their own execution environment. The Graphics class provides methods for drawing various shapes, text, and images to the applet display area.
This document discusses geo-localized web applications and frameworks. It describes two applications, YoubeQ and Smarturbia, that integrate with the Google Maps API. It also covers the Django web framework, its components and features for building dynamic websites and web applications in an organized and efficient manner.
The document describes an event handling program in Netbeans IDE that allows a user to input values to calculate the areas of different shapes. The program takes length and width values to calculate the area of a rectangle, a side value to calculate the area of a square, and base and height values to calculate the area of a triangle. It then displays the computed areas. It also describes a program that displays a user's name or "UNIDENTIFIED" when an enter button is clicked based on input. Finally, it outlines a product order program that allows a user to input quantities, calculates totals, displays discount percentages based on total amount, and shows discounted amounts.
Code/DLL injection techniques allow malicious code to be inserted into other running programs. There are two main types: static injection modifies the target program's code prior to execution, while dynamic injection inserts code during runtime. Attackers use these methods to evade firewalls by hijacking trusted processes. Defenses include anti-hook tools to restrict DLL loading and memory scanning to detect rogue code. The document discusses these injection methods and demonstrates examples using malware samples in a lab environment.
This document discusses how Oracle user groups can work with the Oracle User Group Team. It provides information on promoting user group events on Oracle.com, requesting Oracle speakers and facilities for events, collaborating on large user group tours and events, and participating in programs like the Oracle OpenWorld User Group Leader Summit. The document emphasizes communicating early with Oracle Relationship Managers to plan successful user group programs and events.
The document summarizes M&A activity in the Midwest region in the second quarter of 2014. It discusses that the Bridgepoint Midwest M&A Index decreased slightly in Q2 after declining in Q1, but increased nearly 19% year-over-year. Median deal sizes increased while valuations decreased slightly from the previous quarter but remained at high levels. The report provides statistics on transaction volumes and sizes by sector and notes that deal momentum continues to build in the Midwest region.
Google provides a wide range of developer technologies and platforms including Android, Chrome, Google Cloud Platform, Google Maps, and more. Developers can build apps and services using these technologies, distribute them through Google Play Store, and monetize using Google Adsense and other monetization options. Google aims to provide developers with the tools and infrastructure to build innovative apps and services at scale.
The document discusses threads at the kernel and user level. It describes threads as the basic unit of CPU utilization consisting of a program counter, register set, and stack space. Threads share code, data, and operating system resources with other threads in a process. The document compares single-threaded and multi-threaded processes and models including one-to-one, many-to-one, and many-to-many. It provides details on thread support in Solaris 2, including lightweight processes (LWPs), and basic thread management.
Adapting to Responsive Design - HCID2014, 24 April 2014Matt Gibson
This document discusses adapting websites to responsive web design. It defines responsive design as creating interfaces that react quickly and positively to user conditions. It notes that people access websites in many ways, so responsive design aims to have one code base that works across devices rather than separate mobile/desktop sites. The document outlines four goals for responsive design: content parity across devices, speed/performance, future-proofing the design, and accessibility. It provides examples and recommendations for achieving each goal, such as researching content needs, optimizing assets, progressive enhancement, and testing accessibility. The results of implementing responsive design are shown to be a 200% increase in mobile traffic and 43% increase in conversions, with a 4000% reduction in homepage exit rates on
The document discusses JDBC and provides information on its objectives, architecture, drivers, API, and how to create JDBC applications. The key points covered are that JDBC has two layers - the application layer and driver layer; there are four types of JDBC drivers; and the main steps to create a JDBC application are to load a driver, connect to a database, create and execute statements, and handle exceptions.
This document summarizes a rebranding presentation for Irish Pubs Global. It reviews a proposed shamrock logo and font combination using the font "Skia". It also presents two options for incorporating a shamrock symbol inside a globe icon to represent Ireland and pubs globally. Finally, it introduces advertising concepts based on using the shamrock icon to promote a unified brand across different countries and regions.
Utilizando o Google de forma estratégicaMário Valney
O documento apresenta as diversas ferramentas gratuitas do Google para uso pessoal e profissional, incluindo Gmail, Drive, Hangouts, Agenda, Sites e ferramentas de marketing online. Destaca como o Google pode ajudar empresas a terem presença online, além de facilitar a comunicação, armazenamento e compartilhamento de arquivos na nuvem.
Second lecture in Java EE training series.
Covers:
- Maven objectives
- Build lifecycle
- Dependencies and Repositories
- Plugins, profiles and configuration
- Multiple modules
- Useful plugins
- Jave EE projects with Maven
This document discusses Java applets. It defines an applet as a small program that performs a specific task within a larger program. The document outlines the features of applets, providing examples of how to write a basic "Hello World" applet in Java. It also describes the lifecycle of an applet, including the init, start, stop, and destroy methods. The document notes advantages of applets like platform independence, and disadvantages like requiring the Java plugin.
This document provides an overview of building Java applications. It discusses how applications are built from classes which contain fields to store data and methods to manipulate the data. Every application needs one main class with a main method, which acts as the entry point and control point to call other methods. The class describes the data and behavior, while class instances are needed to work with data.
Bai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethuaBai06 mot sokythuattrongkethua
HƯớng dẫn các công đoạn thực hành khi lập trình gia công cho các chi tiết phức tạp, với sự hỗ trợ của phần mềm Powermill sẽ giúp bạn có thể xuất code nhanh cho chi tiết bạn cần và rất chính xác.
3. Tạo cửa sổ khung (frame)
• Sử dụng lớp JFrame
JFrame frame = new JFrame();
frame.setSize(300, 400);
frame.setTitle("An Empty Frame");
frame.setDefaultCloseOperation(
JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
• import javax.swing.*;
• Ví dụ :
•EmptyFrameViewer.java
(BigJava, ch05)
2009-2010 OOP - http://mim.hus.edu.vn/elearning 3
4. Vẽ hình (1)
paintComponent: là phương thức được gọi mỗi
khi cần vẽ lại một thành phần đồ hoạ
VD: thành phần hình chữ nhật được xây dựng nhờ
thừa kế (từ khoá extends) lớp JComponent
public class RectangleComponent extends JComponent {
public void paintComponent(Graphics g){
// Recover Graphics2D
Graphics2D g2 = (Graphics2D) g;
...
}
}
2009-2010 OOP - http://mim.hus.edu.vn/elearning 4
5. Vẽ hình (2)
Lớp Graphics: cho phép thao tác với các trạng thái đồ
họa (vd: màu hiện tại)
Lớp Graphics2D: có các phương thức để vẽ hình khối.
Phải ép kiểu để thu được đối tượng g2 thuộc lớp
Graphics2D từ tham biến g thuộc lớp Graphics
Vẽ hình:
Rectangle box = new Rectangle(5, 10, 20, 30);
g2.draw(box);
Các lớp đồ hoạ thuộc gói java.awt
2009-2010 OOP - http://mim.hus.edu.vn/elearning 5
6. VD: vẽ hình chữ nhật
Xây dựng 2 lớp:
RectangleComponent có phương thức paintComponent để vẽ
2 hình chữ nhật
RectangleViewer có hàm main làm các việc sau:
Vẽ một khung
Xây dựng một đối tượng thuộc lớp thành phần hình chữ nhật:
RectangleComponent component = new
RectangleComponent();
Thêm thành phần vào khung:
frame.add(component);
/* trước version 5 cần dùng lệnh
frame.getContentPane().add(component); */
Hiển thị khung (setVisible)
RectangleComponent.java, RectangleViewer.java (BigJava ch05)
2009-2010 OOP - http://mim.hus.edu.vn/elearning 6
7. Ứng dụng con (Applet)
Applets là các chương trình chạy trong một trình duyệt Web
Để cài đặt một applet, sử dụng đoạn mã kiểu như sau (tương tự như vẽ thành
phần đồ hoạ, ngoại trừ vài thay đổi):
public class MyApplet extends JApplet // thay cho JComponent
{
public void paint(Graphics g) // thay cho paintComponent
{
// Recover Graphics2D
Graphics2D g2 = (Graphics2D) g;
// Drawing instructions go here
. . .
}
}
Để chạy một applet, cần một tệp HTML có thẻ applet
Một tệp HTML có thể có nhiều applets; mỗi applet có một thẻ
Sử dụng một appletviewer hoặc một trình duyệt có hỗ trợ Java để chạy applet
2009-2010 OOP - http://mim.hus.edu.vn/elearning 7
9. Các hình đồ họa (1)
Rectangle, Ellipse2D.Double,
Line2D.Double: mô tả các hình
Các lớp .Double này là các lớp trong (inner class),
cách sử dụng không khác các lớp thông thường, tuy
nhiên khi khai báo thư viện thì khai báo lớp ngoài của
chúng:
import java.awt.geom.Ellipse2D;
// không có .Double
Vẽ hình: Tạo đối tượng hình rồi thực hiện lệnh vẽ
2009-2010 OOP - http://mim.hus.edu.vn/elearning 9
10. Các hình đồ họa (2)
Vẽ hình elíp:
Ellipse2D.Double ellipse = new Ellipse2D.Double(x, y, width, height);
g2.draw(ellipse);
Vẽ đường thẳng:
Line2D.Double segment = new Line2D.Double(x1, y1, x2, y2);
hoặc
Point2D.Double from = new Point2D.Double(x1, y1);
Point2D.Double to = new Point2D.Double(x2, y2);
Line2D.Double segment = new Line2D.Double(from, to);
g2.draw(segment);
Vẽ một xâu:
g2.drawString("Message", 50, 100);
2009-2010 OOP - http://mim.hus.edu.vn/elearning 10
11. Các hình đồ họa (3)
Elíp
2009-2010 OOP - http://mim.hus.edu.vn/elearning 11
12. Màu sắc
Các màu chuẩn: Color.BLUE, Color.RED,
Color.PINK, v.v…
Pha màu RGB (red, green, blue) với các giá trị trong
khoảng 0.0F và 1.0F (F = float)
Color magenta = new Color(1.0F, 0.0F, 1.0F);
Thiết lập màu đồ hoạ:
g2.setColor(magenta);
Màu đã thiết lập được dùng để vẽ và tô màu các hình
g2.fill(rectangle); // tô với màu hiện tại của g2
2009-2010 OOP - http://mim.hus.edu.vn/elearning 12
13. Đọc dữ liệu văn bản
1 ứng dụng đồ hoạ có thể lấy dữ liệu vào bằng cách hiển
thị hộp thoại với lớp JOptionPane
Phương thức showInputDialog
dùng để hiển thị một lời nhắc và đợi người dùng nhập dữ liệu
kết quả trả về là một xâu mà người dùng đã nhập
Ví dụ
String input = JOptionPane.showInputDialog("Enter x");
double x = Double.parseDouble(input);
VD chương trình (BigJava, ch05)
ColorViewer.java, ColoredSquareComponent.java
2009-2010 OOP - http://mim.hus.edu.vn/elearning 13
14. Vẽ hình phức tạp (1)
VD:
Vẽ 2 xe ô tô: 1 ở góc trên bên trái của màn hình, 1 ở góc dưới bên phải
Lời khuyên:
Tạo 1 lớp riêng cho mỗi hình
class Car
{
. . .
public void draw(Graphics2D g2)
{
// Drawing instructions
. . .
}
}
Vẽ nháp trên giấy khi cần vẽ các hình phức tạp
2009-2010 OOP - http://mim.hus.edu.vn/elearning 14
16. Vẽ hình phức tạp (3)
Cụ thể:
Tính vị trí góc dưới bên phải màn hình trong phương thức
paintComponent
int x = getWidth() - 60;
int y = getHeight() - 30;
Car car2 = new Car(x, y);
getWidth và getHeight áp dụng trên đối tượng thực hiện
phương thức paintComponent
Nếu cửa sổ khung thay đổi kích thước, phương thức
paintComponent sẽ được gọi và vị trí của xe được tính lại
Chương trình (BigJava, ch05):
CarComponent.java
Car.java
CarViewer.java
2009-2010 OOP - http://mim.hus.edu.vn/elearning 16
17. So sánh thông tin dạng số và
trực quan
Tính giao điểm giữa đường tròn và đường thẳng
Đường tròn có bán kính r = 100 và tâm (a, b) = (100, 100)
Đường thẳng có giá trị tham số x
Tính giao điểm:
Phương trình đường tròn với bán kính r và tâm (a, b) là
(x – a)2 + (y – b)2 = r2
Biết x, tính được giá trị của y với lệnh Java:
double root = Math.sqrt(r * r - (x - a) * (x - a));
double y1 = b + root;
double y2 = b - root;
Kết quả trực quan trên hình vẽ và kết quả số thu được phải
giống nhau
2009-2010 OOP - http://mim.hus.edu.vn/elearning 17
18. Giao điểm của đường thẳng và
đường tròn
Chương trình:
IntersectionComponent.java
IntersectionViewer.java
LabeledPoint.java
2009-2010 OOP - http://mim.hus.edu.vn/elearning 18