Professional Documents
Culture Documents
Java Harshal
Java Harshal
“ Flappy Bird Game using Java, Java Swing, Java AWT, and OOPS”
Submitted- 2023-24
This micro-project work submitted in partial fulfillment of requirements for the award of
diploma in Computer Technology for subject "JavaAdvanced programing "()”.
Computer Engineering
Lect.Prof.Ashirwad Ramteke
SUBMITTED BY
Sr
no Roll no. Name of Student Enrollment
. no.
1. 54 Harshal.R.Ukey 2101210133
DEPARTMENT OF COMPUTER ENGINEERING
This is to certify that the following student of this institute have carried out this micro-
project in work ““ Flappy Bird Game using Java, Java Swing, Java AWT, and
OOPS”” Under the guidance of Prof.Ashirwad ramteke Lect. in the Department of
Computer Engineering during the session 2022-2023 This work has been in the partial
fulfillment of the award for Diploma in Computer Engineering from Maharashtra State
Board of Technical Education, Mumbai.
SUBMITTED BY
Sr
no Roll no. Name of Student Enrollment
. no.
1. 54 Harshal.R.Ukey 2101210133
3.0Course outcome:
5.0Proposed methodology:
Sr. Name of
no. resource/materia specification Quantity Purpose
l
1. Internet Gives As per To get
information requirement information- on
and pictures.
2. Laptop Asus-Tuf 1 To make micro
project.
3. Book Business 1 To get
communication information- on
4. Software Jdk-7.0 1 To develop the
program
Part :-B
“ Flappy Bird Game using Java, Java Swing, Java AWT, and OOPS”
1.0 Rationale:- Rationality, pivotal in decision-making, fosters logical thinking by
considering facts, minimizing biases, and maximizing utility. It aids problem-solving
and efficient resource allocation. In societal contexts, rationality shapes policies and
ethical considerations, steering progress. In personal realms, it promotes sound
judgments, enhancing individual growth. Rationality is a cornerstone, fostering clarity
and coherence in various domains, enabling optimal choices and outcomes.
Name of Specification
Resource/Material
Laptop SSD 512GB, RAM 8 GB ,Rayzen7
processor
Software Ms-Word ,Chrome Browser ,
Jdk-7.0,Notepad ,Etc.
Other Accessories Reference Book
8.0. Conclusion:-
The provided Java program, which calculates monthly loan payments, serves as a
foundational example of Java Swing GUI development and basic mathematical
computation. It demonstrates core Java concepts, GUI design, event handling, input
validation, and error handling.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public FlappyBirdGame() {
gap = 150;
birdHeight = 20;
initialBirdY = 150;
obstacleX = 300;
obstacleWidth = 50;
obstacleGap = 150;
obstacleSpeed = 5;
frame.setSize(800, 600);
frame.add(this);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
frame.addKeyListener(this);
birdY = initialBirdY;
velocity = 0;
isGameOver = false;
timer.start();
@Override
super.paintComponent(g);
g.setColor(Color.CYAN);
g.setColor(Color.RED);
if (isGameOver) {
g.setColor(Color.BLACK);
@Override
birdY += velocity;
if (!isGameOver) {
isGameOver = true;
obstacleX -= obstacleSpeed;
if (obstacleX < -obstacleWidth) {
obstacleX = getWidth();
isGameOver = true;
repaint();
@Override
@Override
velocity = -10;
@Override
public void keyReleased(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_SPACE) {
velocity = 5;
new FlappyBirdGame();
}
Output:-
Conclusion
Conclusion for a Flappy Bird Game developed using Java, Java Swing, Java AWT, and
OOP principles:
2. Java Swing and AWT: These libraries facilitated interactive GUI components,
enabling smooth gameplay and user engagement.
5. Overall, the project showcases effective utilization of Java, Swing, AWT, and OOP,
culminating in a functional and enjoyable Flappy Bird game.