Wednesday, 19 December 2012
APPLET
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
///////////////////////////////////////////////////////////// ClockAnalogBuf
public class ClockAnalogBuf extends JApplet {
//=============================================================== fields
private Clock _clock; // Our clock component.
//================================================================= main
public static void main(String[] args) {
JFrame window = new JFrame();
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.setTitle("Analog Clock");
window.setContentPane(new ClockAnalogBuf());
window.pack(); // Layout components
window.setLocationRelativeTo(null); // Center window.
window.setVisible(true);
}
//========================================================== constructor
public ClockAnalogBuf() {
//... Create an instance of our new clock component.
_clock = new Clock();
//... Set the applet's layout and add the clock to it.
setLayout(new BorderLayout());
add(_clock, BorderLayout.CENTER);
//... Start the clock running.
start();
}
//=============================================================== start
@Override public void start() {
_clock.start();
}
//================================================================ stop
@Override public void stop() {
_clock.stop();
}
}
Sunday, 4 November 2012
Review
The name of our project is entitled Decimal
Places.There is 3 main subtopics is allocated for each of us and a program is
required to be designed for each of the subtopic .Namely the following topic is
done by all of us where Lam Soon Hong designed for Understanding the decimal
places,Navilina done for Conversation between decimal number and the
fraction and Tan Yih Fen for Comparison between decimal number.
There is many loops and bounds that we had
to challenge during the progress of the project as for an example getting the
knowledge of using Java Applets in our program in the terms of execution of the
program in a proper form.For instance, the usage of JOptionPane in the
program.First of all,we took a lot of reference from the internet and we used the Introduction Java Programming book as a
reference to be done.Furthermore,we seeked some tutorials from the Youtube
videos mainly to see how the Java Applets is illustrated in programs without
error. Besides the problem of lack of
information about JOptionPane, we are also facing the problem of creating the
student class. Although we tried to search information online to solve the
problem, we still face the challenge to create the student class. We have
failed many times in our trials. However, in the end, we manage to success in
creating the student class with the help of my course mate, Chen Chie Phui. She
pointed out the mistakes we made in our
program. After we made some changes according to her advice, we manage to
success in creating the student class. Although we successfully compile the
program, but we still continue to modify the program of student class to become
more better than before.
In aspect of cooperation, we do achieve
an average cooperation level.
The project takes us about few weeks to
complete it. However, each part of the project takes different time to
accomplished by each of us.
Saturday, 3 November 2012
Introduction
We are required to design and implement a java based application for a topic in Mathematic (Topik 7 – 13) for year 2 student. For this application, we need to create a menu based program with the main menu similar to the following:
- Understanding The Concept of Decimal
- Conversion of Decimal and Fraction
- Comparison between Decimal Places
- Exit
We have chosen "Topic 7: Decimal" as the topic of our application created. It contains 3 subtopics:
- Understanding the concept of decimal
- Conversion of decimal to fraction
- Comparison of decimal
For game, it contains 10 questions for student to answer and timer is created to know that how long the student spent to answer all. After that, the student will be able to know his/her level.
Vision
To help a Year 2 student learn quickly and easily about a topic of Mathematics Year 2 from our java education software developed which is interesting, professional, best, absolute and perfect.
Mission
- To apply basic object-oriented programming concepts in solving easy problems.
- To let the users can be easy to use and to learn from our java application
- To create a simple, object-oriented and familiar java programming
UML Diagram of Student Class
Student class
|
-name::String
|
+mark::int
+student()
+getName()::String
+setName(String)::void
+addMark(double)::void
+showMark()::double
+addSecond(double)::void
+displaySecond()::double
+getStatus()::String
|
Description of Module
Our project
title is “Decimal Number”. In this chapter, the user will learn how to
recognize and differentiate the difference between the decimal numbers and the
whole number. Inside our program, we have three subtopics which understand the
decimal places, conversation between decimal number and fraction and comparison
between decimal numbers. The detail at the below is the step that user need to
follow when using our program:
1. Firstly, user need to key in his/her name in the dialog box.
2. After the user key in his/her name, the program will automatically run out one dialog box. There are three subtopics that I mention in the above will appear in that dialog box.
3. The user need to choice one of the subtopics by key in 1,2 or 3 inside the dialog box.
4. After the user key in one of
the number, the program will immediately run out one dialog box. Inside the
dialog box, there are 4 options at there which is introduction, quiz, game and
exit.
5. The user need to choice one of the options by key in the no. 1,2 or 3 if want continue to learn. If not the user can key in no.4, which is the exit option to end the program.
6. Inside the introduction option
of each subtopic, the user will more understanding about this topic.
7. Inside the quiz option of each subtopic, the user will be test for his/her ability and level of understanding about the content of each subtopic. During the quiz session, the user need to key in the answer or just click “yes” or “no” option to answer the questions given. The mark for each quiz will be given after user finishes his/her one quiz.
8. Inside the game option of each subtopic, the time use that the user finishes his/her question will be record from each of the subtopic. During the game session, the user need to key in the answer or just click “yes” or “no” option to answer the questions given .After the users finish the game of three subtopics, the mark and the time use from each subtopic will then be add up.
9. After studying and answer the question in one subtopic, the user need to key in the no.4, which is the exit option to end that subtopic. Then the user can continue to study another subtopic by key in one more time number in the dialog box given.
10. At the end, after the user finish all subtopics given, user need to key in the no.4 again, which is the exit option to end it. The total mark and the time use during the game sessions will then run out. The status for the user result will also appear after the total mark.
1. Firstly, user need to key in his/her name in the dialog box.
2. After the user key in his/her name, the program will automatically run out one dialog box. There are three subtopics that I mention in the above will appear in that dialog box.
3. The user need to choice one of the subtopics by key in 1,2 or 3 inside the dialog box.
5. The user need to choice one of the options by key in the no. 1,2 or 3 if want continue to learn. If not the user can key in no.4, which is the exit option to end the program.
7. Inside the quiz option of each subtopic, the user will be test for his/her ability and level of understanding about the content of each subtopic. During the quiz session, the user need to key in the answer or just click “yes” or “no” option to answer the questions given. The mark for each quiz will be given after user finishes his/her one quiz.
8. Inside the game option of each subtopic, the time use that the user finishes his/her question will be record from each of the subtopic. During the game session, the user need to key in the answer or just click “yes” or “no” option to answer the questions given .After the users finish the game of three subtopics, the mark and the time use from each subtopic will then be add up.
9. After studying and answer the question in one subtopic, the user need to key in the no.4, which is the exit option to end that subtopic. Then the user can continue to study another subtopic by key in one more time number in the dialog box given.
10. At the end, after the user finish all subtopics given, user need to key in the no.4 again, which is the exit option to end it. The total mark and the time use during the game sessions will then run out. The status for the user result will also appear after the total mark.
Subscribe to:
Posts (Atom)




















