You are on page 1of 32

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

“Jnana Sangama”, Belagavi-590018 , Karnataka

Inter/Intra Internship Report [21INT49]


On

“A TEXT-BASED ADVENTURE GAME”


Submitted in partial fulfillment of the requirements for the award of the degree of
Bachelor of Engineering
In
Computer Science & Engineering

Submitted by

USN Name
1BI21CS088 NISHA KUMARI
1BI21CS102 PRAVEEN HER
1BI21CS106 R AKASH KASHYAP
1BI21CS108 RAHUL RAGHAVENDRA M

Under the Guidance of


Prof. Vidya R
Assistant Professor
Dept. of CSE, BIT

DEPARTMENT OF COMPITER SCIENCE AND ENGINEERING


BANGALORE INSTITUTE OF TECHNOLOGY
K. R. Road, V. V. Puram, Bengaluru - 560004
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
“Jnana Sangama”, Belagavi-590 018, Karnataka

BANGALORE INSTITUTE OF TECHNOLOGY


Bengaluru-560 004

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Certificate

Certified that the Inter/Intra Internship (21INT49) work entitled “A Text


- Based Adventure Game” carried out by Ms. Nisha Kumari, USN 1BI21CS088,
Mr. Praveen Her, USN 1BI21CS102, Mr. R Akash Kashyap USN, 1BI21CS106, Mr. Rahul
Raghavendra M, USN 1BI21CS108, bonafide students of Bangalore Institute of
Technology in partial fulfilment for the award of Bachelor of Engineering in Computer
Science & Engineering of the Visvesvaraya Technological University, Belagavi during
the academic year 2022-2023. It is certified that all corrections/suggestions indicated for
Internal Assessment have been incorporated in the report deposited in the departmental
library.
The Internship report has been approved as it satisfies the academic requirements in
respect of Internship work prescribed for the said degree.

Internal Guide Dr. J. Girija


Prof. Vidya R Professor and Head
Assistant Professor Department of CSE, BIT
Department of CSE, BIT
ACKNOWLEDGEMENT

The satisfaction and euphoria that accompanies the successful completion of any
task would be incomplete without complementing those who made it possible and whose
guidance and encouragement made my efforts successful. My sincere thanks to all those
who have supported me in completing this Internship successfully.

My sincere thanks to Dr. M. U. Aswath, Principal, BIT and Dr. J. Girija, HOD,
Department of CSE, BIT for their encouragement, support and guidance to the student
community in all fields of education. I am grateful to our institution for providing us a
congenial atmosphere to carry out the Internship successfully.

I would not forget to remember Prof. Neetha Das, Assistant Professor and Prof.
Vidyashree A. L., Assistant Professor, Inter/Intra (21INT49) Internship Coordinators,
Department of CSE, BIT, for her encouragement and more over for her timely support and
guidance till the completion of the Internship. I wish to express my heartfelt gratitude to
my mentor, guide Mr. Pavan Kumar M., Lead Engineer, Quest Global Engineering
Company, Bengaluru and my team members for their valuable guidance, suggestions and
cheerful encouragement during the period of my Internship.

I avail this opportunity to express my profound sense of deep gratitude to my


esteemed guide Vidya R, Professor, Department of CSE, BIT, for his/her moral support,
encouragement and valuable suggestions throughout the Internship. I extend my sincere
thanks to all the department faculty members and non-teaching staff for supporting me
directly or indirectly in the completion of this Internship.

NAME: NISHA KUMARI USN: 1BI21CS088


NAME: PRAVEEN HER USN: 1BI21CS102
NAME: R AKASH KASHYAP USN: 1BI21CS106
NAME: RAHUL RAGHAVENDRA M USN: 1BI21CS108
CERTIFICATES
TABLE OF CONTENTS
Chapter 1 - Introduction 1
1.1 Overview
1.2 Objective
1.3 About the game

Chapter 2 - Problem Statement 3


2.1 Aim of the project

Chapter 3 - System Architecture 4

Chapter 4 - Tools/Technologies 6
Chapter 5 - Implementation 8
5.1 Source code
Chapter 6 - Results 22
Chapter 7 - Reflection Notes 23
Chapter 1
INTRODUCTION

1.1 Overview
This report is based on the Inter College Internship Programming carried out by Bangalore
Institute of Technology for the year 2022 for the first year students at the end of their first year
course. It is done as per the guidelines issued by Visvesvaraya Technological University
(VTU). The goal of the internship being to indulge in outcome based learning initiations and
inculcate attributes that fall within the graduate attributes defined by the NBA.

To test the skill and knowledge attained by the students over the course of their internship is
tested by giving them a problem statement to solve using their creativity and their
understanding of the internship subject. Over the course of this report we have incorporated
the knowledge of JAVA that we have gotten over the course of the internship into solving the
problem statements.

The problem statement introduced is a combination of various problems that are based on the
entirety of JAVA programming. The problem statement given is such that it uses all the
concepts of python and with each part of the problem statement being a problem that revolves
around a certain concept in JAVA. This report contains various topics and concepts of JAVA
that are combined together to cover and solve the problem statement. All the concepts of JAVA
are incorporated together to solve various aspects of the problem. The application is reduced
as much as possible to avoid errors while entering the data.

Dept. of CSE, BIT 2022-2023 1


INTRODUCTION

1.2 Objective
This report contains various topics and concepts of JAVA that are combined together to cover
and solve the problem statement. All the concepts of JAVA are incorporated together to solve
various aspects of the problem.

The report contains the information about the System architecture used in the project. System
architecture is the visualization of the program model or a conceptual model that defines the
behaviour, structure and working of a system.

A system architecture can consists of system components and the assembly of the
subsystems, that will work together to implement the overall system.

The report contains the description of the tools and techniques that are used to implement the
working of the overall problem statement. It contains the information and explanation about
the tools and technologies, the reason why they are used in the problem, the role that they play
and description about their features and other details.

The report then contains the notes and the written reflection of the thought process that went
into implementing the project report, about their self-assessment and experience throughout
them working on their project. It also contains the non-technical take-outs that have been
taken from the project, like improvement in vocalization skills, communication skills, time
management and more.

Overall the internship was an excellent and effective step for students to sharpen their skills
and learn new ones to add to their portfolios and resumes. It also created and opportunity for
them to learn and practice team working and effective communicative skills and enhance
their knowledge and make them ready for acing entry-level jobs.

Dept. of CSE, BIT 2022-2023 2


Chapter 2
PROBLEM STATEMENT

A text-based adventure game is a type of interactive fiction where the player reads
through a story and makes choices that affect the outcome. These games usually have
simple graphics and are driven by text input from the player. Text adventures are games
that put heavy focus on text-based interactions with the game world and the characters
living inside of it. The player has to make choices in every step of the game, and based
on these choices, the storyline changes.

2.1 Aim of the project


• The main agenda of this game is to show people how they can think and play and not
get carried away with the graphics-based games which leads them to just get addicted
without any thoughts.

• The graphics game will only get you addicted and have disadvantages like spoiling
the eye or having headaches after a certain period of time.

• The graphic games will not have any option to think the possibilities of what is going
to happen if I choose one option or the other which can lead to just get carried into
the as per the designer.

Dept. of CSE, BIT 2022-2023 3


Chapter 3
SYSTEM ARCHITECTURE
User : A user is a person who utilizes a computer or network service.
A user often has a user account and is identified to the system by a username (or user name).
Other terms for username include login name, screenname (or screen name), account
name, nickname (or nick) and handle, which is derived from the identical citizens band
radio term.
But in this game user is the one who plays the game.

User Interface: User Interface (UI) defines the way humans interact with the information
systems. In Layman’s term, User Interface (UI) is a series of pages, screens, buttons, forms
and other visual elements that are used to interact with the device. Every app and every
website has a user interface.

User Interface (UI) Design is the creation of graphics, illustrations, and use of photographic
artwork and typography to enhance the display and layout of a digital product within its
various device views. Interface elements consist of input controls (buttons, drop-down
menus, data fields), navigational components (search fields, slider, icons, tags), informational
components (progress bars, notifications, message boxes).A good User Interface (UI) focuses
on making user’s interactions simple and efficient. User would appreciate a website with
intuitive user interface that leads them towards their task in most engaging way. User
Interface (UI) design focuses on thinking of a user, what they might need to do when they
visit website and ensure that the interface has elements that are easy to access and understand.
Being a UI designer, one need to understand the goals, skills, preferences and tendencies of
the user to make a better interface.

Server: In computing, a server is a piece of computer hardware or software (computer


program) that provides functionality for other programs or devices, called "clients".
This architecture is called the client–server model. Servers can provide various functionalities,
often called "services", such as sharing data or resources among multiple clients or
performing computations for a client. A single server can serve multiple clients, and a single
client can use multiple servers. A client process may run on the same device or may connect
over a network to a server on a different device. Typical servers are database servers, file
servers, mail servers, print servers, web servers, game servers, and application servers.
Client–server systems are usually most frequently implemented by (and often identified with)
the request–response model: a client sends a request to the server, which performs some action
Dept. of CSE, BIT 2022-2023 4
SYSTEM ARCHITECTURE

and sends a response back to the client, typically with a result or acknowledgment. Designating
a computer as "server-class hardware" implies that it is specialized for running servers on it.
This often implies that it is more powerful and reliable than standard personal computers, but
alternatively, large computing clusters may be composed of many relatively simple,
replaceable server components.

Authentication and Authorization : In cyber security, authentication is the process of


verifying someone's or something's identity. Authentication usually takes place by checking a
password, a hardware token, or some other piece of information that proves identity. Just as
an airline worker checks a passport or an identification card to verify a person's identity when
they board a plane, computer systems need to be sure a person really is who they say they are.
At an airport, this authentication process ensures only people with a ticket get on the plane;
for digital systems, this ensures data is viewed and used by the right people.

Authentication does not just apply to verifying human users. Computer systems also need to
check servers, software, APIs, and other computers to be sure they are who they "say" they
are.

Dept. of CSE, BIT 2022-2023 5


Chapter 4
TOOLS AND TECHNOLOGIES
Title: A Text-Based Adventure Game
Abstract: This document provides an in-depth overview of the technology stack and tools
used in the development of the a text-based adventure game. The application's primary
objective is to create a user-friendly and visually engaging interface that displays using Java
Swing. The report delves into the significance of each technology and tool and explains how
they contribute to the successful implementation of the application's functionalities. The
development environment, libraries, and other relevant tools are explored in detail to offer a
comprehensive understanding of the application's architecture.

4.1 Introduction: Text-based adventure game is designed to provide users with an interactive
interface for playing text games. To accomplish this, a robust technology stack and
appropriate tools are essential. The report outlines the use of Java programming language and
Java Swing framework as the core technologies, as well as other supporting tools that facilitate
the development process.

4.2 Java Programming Language: Java is a widely-used object-oriented programming


language known for its platform independence, making it suitable for cross-platform
applications. It offers robustness, scalability, and an extensive standard library, which
simplifies the development process and allows for efficient implementation of complex
functionalities in the Data Visualization App.

4.3 Java Swing: Java Swing is a comprehensive GUI toolkit that serves as the backbone of
the Electricity Bill System’s graphical user interface. It provides a wide array of components
,such as JFrame, JPanel, and My SQL, that enable developers to create dynamic and
interactive interface. Swing's event handling capabilities ensure responsiveness, allowing
users to interact with the charts seamlessly.

4.4 Integrated Development Environment (IDE): An Integrated Development


Environment, such as Eclipse or IntelliJ IDEA, streamlines the development process by
offering a rich set of features like code auto-completion, syntax checking, and debugging
tools. IDEs enhance developers' productivity and collaboration, making it easier to manage
the project and improve code quality.

Dept. of CSE, BIT 2022-2023 6


TOOLS AND TECHNOLOGIES

4.5 Random Class: Java's built-in ‘java.util.Random’ class is utilized to generate random data
for the bar chart and pie chart. The Random class provides methods to create random integers
within specified ranges, allowing the application to populate the charts with diverse and
dynamic data points for a more representative visualization.

4.6 Scalability and Extensibility: The chosen technology stack and tools offer scalability,
enabling the user to sign in securely and play the game and appropriate management of the
system. - Java's modular approach and object-oriented nature make it easier to extend and add
new features to the application in a structured manner.

4.7 Accessibility: Java Swing's built-in accessibility features ensure that the game is accessible
to users with both customers and as well as admin.

4.8 User Interaction: The application's user-friendly interface allows users to interact with
the system easily, providing all the required facilities as sign up , sign in , play securely .
Admin can monitor the whole system.

4.9 Real-time Data Updates: To cater to dynamic data scenarios, the app can be extended to
update the user information in real-time when the users update their details, providing users
with up-to date their profiles.

4.10 Error Handling and Validation: Robust error handling and data validation mechanisms
can be incorporated to ensure the application gracefully handles unexpected data or user input.

4.11 Performance Optimization: The project can include performance optimization


techniques to ensure smooth responses, even for both customers and admins.

4.12 Cross-Platform Compatibility: Java's platform independence ensures that the text-
based adventure game can run seamlessly on multiple operating.

Dept. of CSE, BIT 2022-2023 7


Chapter 5
IMPLEMENTATION
The provided code is an implementation of a text-based adventure game in Java, utilizing the
Swing library for creating the graphical user interface. The game presents a player with
different scenarios and choices as they navigate through a fictional world. The main class
"game" sets up the window and defines various panels, buttons, and labels required for the
game interface. It also includes inner classes for handling user input during the game, such as
starting the game, making choices, and interacting with NPCs and monsters.

The game starts with a title screen displaying the title "ADVENTURE" and a "START"
button. When the player clicks on the "START" button, the main game screen is created,
presenting the player with a text area for narrative and buttons for making choices. The
player's character has health points (HP) and can carry a weapon, initially set to “KNIFE”.
The game involves various scenarios, such as encountering a guard at the town gate, crossing
a road with different directions, finding a river, entering a forest to discover a sword,
encountering a goblin, and engaging in fights. The player's choices impact their HP, the
monster's HP, and whether they win or lose the game.

The goal of the game is to defeat the monster, which rewards the player with a silver ring and
a message from the guard welcoming them to the town. However, losing the game displays a
"Game over" message. The player can choose to play again or exit the game after either
winning or losing.

Overall, this code provides the foundation for a simple text-based adventure game with
limited features and interactions. Further development could expand the game world, add
more choices, introduce items, quests, and more complex gameplay mechanics

Dept. of CSE, BIT 2022-2023 8


IMPLEMENTATION

5.1 – Source Code

import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;

public class game {


JFrame window;
Container con;
JPanel titlepanel,startpanel,maintextpanel,choicebuttonpanel,playerpanel;
JLabel titlelabel,hplabel,hplabelno,weaponlabel,weaponlabelno;
Font titlefont = new Font("Times New Roman", Font.PLAIN, 90);
JTextArea maintextarea;
int playerhp,monsterhp,silverring;
String weapon,position;
JButton startbutton,choice1,choice2,choice3,choice4;
titlescreenhandler tshandler = new titlescreenhandler();
choicehandler chhandler = new choicehandler();
public static void main(String[] args){
new game();
}

Dept. of CSE, BIT 2022-2023 9


IMPLEMENTATION

public game(){
window = new JFrame();
window.setSize(800,600);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.getContentPane().setBackground(Color.black);
window.setLayout(null);
window.setVisible(true);
con = window.getContentPane();
titlepanel = new JPanel();
titlepanel.setBounds(100, 100, 600, 150);
titlepanel.setBackground(Color.black);
titlelabel = new JLabel("ADVENTURE");
// titlelabel.setBounds(100, 50, 1000, 30);
titlelabel.setForeground(Color.WHITE);
titlelabel.setFont(titlefont);
startpanel = new JPanel();
startpanel.setBounds(0,400,1000,1000);
startpanel.setBackground(Color.BLACK);
startbutton = new JButton("START");
//startbutton.setBounds(0,100, 100,50);
startbutton.setBackground(Color.yellow);
startbutton.setForeground(Color.red);
startbutton.addActionListener(tshandler);
// startbutton.setFocusPainted(false);
titlepanel.add(titlelabel);
startpanel.add(startbutton);
con.add(titlepanel);
con.add(startpanel);
}

Dept. of CSE, BIT 2022-2023 10


IMPLEMENTATION

public void creategamescreen(){


titlepanel.setVisible(false);
startpanel.setVisible(false);
maintextpanel = new JPanel();
maintextpanel.setBounds(100, 100, 600, 250);
maintextpanel.setBackground(Color.YELLOW);
con.add(maintextpanel);
maintextarea = new JTextArea("main text area");
maintextarea.setBounds(100,100,600,250);
maintextarea.setBackground(Color.BLACK);
maintextarea.setForeground(Color.WHITE);
maintextarea.setLineWrap(true);
maintextpanel.add(maintextarea);
choicebuttonpanel = new JPanel(null, false);
choicebuttonpanel.setBounds(250,350,300,300);
choicebuttonpanel.setVisible(true);
choicebuttonpanel.setBackground(Color.BLACK);
con.add(choicebuttonpanel);

choice1 = new JButton("choice1");


choice1.setBounds(100, 0, 200, 50);
choice1.setBackground(Color.black);
choice1.setForeground(Color.BLACK);
choice1.addActionListener(chhandler);
choice1.setActionCommand("c1");
// choice1.setVisible(true);
choicebuttonpanel.add(choice1);
choice2 = new JButton("choice2");
choice2.setBounds(100, 50, 200, 50);
choice2.setBackground(Color.black);

Dept. of CSE, BIT 2022-2023 11


IMPLEMENTATION

choice2.setForeground(Color.BLACK);
choice2.addActionListener(chhandler);
choice2.setActionCommand("c2");
choicebuttonpanel.add(choice2);

choice3 = new JButton("choice3");


choice3.setBounds(100, 100, 200, 50);
choice3.setBackground(Color.black);
choice3.setForeground(Color.black);
choice3.addActionListener(chhandler);
choice3.setActionCommand("c3");
choicebuttonpanel.add(choice3);

choice4 = new JButton("choice4");


choice4.setBounds(100, 150, 200, 50);
choice4.setBackground(Color.black);
choice4.setForeground(Color.black);
choice4.addActionListener(chhandler);
choice4.setActionCommand("c4");
choicebuttonpanel.add(choice4);

playerpanel = new JPanel(null, false);


playerpanel.setBounds(100, 700, 1000, 50);
playerpanel.setBackground(Color.white);
playerpanel.setLayout(new GridLayout(1, 4, 0, 0));
con.add(playerpanel);

hplabel = new JLabel("HP:");


hplabel.setForeground(Color.black);
playerpanel.add(hplabel);

Dept. of CSE, BIT 2022-2023 12


IMPLEMENTATION

hplabelno = new JLabel();


hplabelno.setForeground(Color.black);
playerpanel.add(hplabelno);

weaponlabel = new JLabel("WEAPON:");


weaponlabel.setForeground(Color.black);
playerpanel.add(weaponlabel);

weaponlabelno = new JLabel(null, null, 0);


weaponlabelno.setForeground(Color.black);
playerpanel.add(weaponlabelno);

playersetup();
}

public void playersetup(){


playerhp = 15;
monsterhp = 20;
weapon = "KNIFE";
weaponlabelno.setText(weapon);
hplabelno.setText(""+playerhp);
towngate();
}

public void towngate(){


position = "towngate";
maintextarea.setText("you are at the gate of the town.\nA gaurd is standing in
front of you.What do you do? ");
choice1.setText("talk to the guard");
choice2.setText("attack the guard");

Dept. of CSE, BIT 2022-2023 13


IMPLEMENTATION

choice3.setText("leave");
choice4.setText("");
}
public void talkguard(){
position = "talktoguard";
maintextarea.setText("Guard: hello stranger. im sorry but we cannot let any
stranger enter our town. ");
choice1.setText(">");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}

public void attackguard(){


position = "attackguard";
maintextarea.setText("guard: hey dont be stupid!\n\n the guard fought back and
hit you hard\nyou recieve 3 damage");
playerhp = playerhp - 3;
hplabelno.setText(""+playerhp);
choice1.setText(">");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}

public void crossroad(){


position = "crossroad";
maintextarea.setText("you are at a crossroad.\n if you go south,you will go back
to town");
choice1.setText("go north");
choice2.setText("go east");

Dept. of CSE, BIT 2022-2023 14


IMPLEMENTATION

choice3.setText("go south");
choice4.setText("go west");
}

public void north(){


position = "north";
maintextarea.setText("there is a river.\nyou drink the water and rest\nyour hp is
recovered by 2");
if(playerhp>=15){
playerhp=15;
}
else{
playerhp = playerhp+2;
}
hplabelno.setText(""+playerhp);
choice1.setText("go south");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}

public void east(){


position = "east";
maintextarea.setText("you walk into a forest and found a long sword\nyou obain
it");
weapon = "sword";
weaponlabelno.setText(weapon);
choice1.setText("go west");
choice2.setText("");
choice3.setText("");
choice4.setText("");

Dept. of CSE, BIT 2022-2023 15


IMPLEMENTATION

public void west(){


position = "west";
maintextarea.setText("YOU ENCOUNTER A GOBLIN ");
choice1.setText("FIGHT");
choice2.setText("RUN");
choice3.setText("");
choice4.setText("");
}

public void fight(){


position = "fight";
maintextarea.setText("monster HP "+ monsterhp +"\nwhat do you do");
choice1.setText("ATTACK");
choice2.setText("RUN");
choice3.setText("");
choice4.setText("");
}

public void playerattack(){


position = "playerattack";
int playerdamage = 0;
if(weapon.equals("KNIFE")){
playerdamage = new java.util.Random().nextInt(3);
}
else if(weapon.equals("sword")){
playerdamage = new java.util.Random().nextInt(8);
}
maintextarea.setText("you attacked the monster and gave"
+playerdamage+"damage");
Dept. of CSE, BIT 2022-2023 16
IMPLEMENTATION

monsterhp = monsterhp - playerdamage;


choice1.setText(">");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}

public void monsterattack(){


position = "monsterattack";
int monsterdamage = 0;
monsterdamage = new java.util.Random().nextInt(4);
maintextarea.setText("the monster attacked you and
gave"+monsterdamage+"damage");
playerhp = playerhp - monsterdamage;
hplabelno.setText( ""+playerhp);
choice1.setText(">");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}

public void win(){


position = "win";
maintextarea.setText("you defeated the monster\nyou obtain a silver ring");
silverring = 1;
choice1.setText("east");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}

Dept. of CSE, BIT 2022-2023 17


IMPLEMENTATION

public void lose(){


position = "lose";
maintextarea.setText(("you are dead\nGame over"));
choice1.setText("PLAY again");
choice2.setText("exit");
choice3.setText("");
choice4.setText("");
}

public void ending(){


position = "ending";
maintextarea.setText("GUARD: you have obtained a silver ring\nwelcome to our
town");
choice1.setText("RESTART");
choice2.setText("EXIT");
choice3.setText("");
choice4.setText("");
}

public class titlescreenhandler implements ActionListener{


public void actionPerformed(ActionEvent event){
creategamescreen();
}
}

public class choicehandler implements ActionListener{


public void actionPerformed(ActionEvent event){
String yourchoice = event.getActionCommand();
switch(position){
case "towngate":

Dept. of CSE, BIT 2022-2023 18


IMPLEMENTATION

switch(yourchoice){
case "c1": if(silverring==1)
ending();
else
talkguard();
break;
case "c2": attackguard(); break;
case "c3": crossroad();break;
}
break;
case "talktoguard":
switch(yourchoice){
case "c1": towngate(); break;
}
break;
case "attackguard":
switch(yourchoice){
case "c1": towngate();
break;
}
break;

case "crossroad":
switch(yourchoice){
case "c1": north();break;
case "c2": east(); break;
case "c3": towngate(); break;
case "c4": west();break;
}

Dept. of CSE, BIT 2022-2023 19


IMPLEMENTATION

break;

case "north":
switch(yourchoice){
case "c1": crossroad();break;
}
break;

case "east":
switch(yourchoice){
case "c1": crossroad();break;
}
break;

case "west":
switch(yourchoice){
case "c1": fight();break;
case "c2": crossroad();break;
}
break;
case "fight":
switch(yourchoice){
case "c1": playerattack();break;
case "c2": crossroad(); break;
}
break;
case "playerattack":
switch(yourchoice){
case "c1": if(monsterhp<1)
win();

Dept. of CSE, BIT 2022-2023 20


IMPLEMENTATION

else
monsterattack();
break;
}
break;
case "monsterattack":
switch(yourchoice){
case "c1": if(playerhp<1)
lose();
else
fight();
break;
}
break;
case "win":
switch(yourchoice){
case "c1": crossroad();break;
}
break;
}
}
}
}

Dept. of CSE, BIT 2022-2023 21


Chapter 6
RESULTS

Dept. of CSE, BIT 2022-2023 22


CHAPTER 7
REFLECTION NOTES

Participating in a Java internship has been an invaluable experience that has significantly
contributed to my growth as a Java developer. Throughout the internship, I had the
opportunity to work on real-world projects, collaborate with experienced professionals, and
expand my knowledge and skills in Java development. Below are some key reflections on
my Java internship journey:

1. Hands-on Learning: The internship provided a hands-on learning experience,


allowing me to apply theoretical knowledge to practical scenarios. Working on actual
projects gave me a deeper understanding of Java concepts and their real-world applications.

2. Mentorship and Guidance: Having experienced mentors guiding me throughout the


internship was immensely beneficial. Their expertise and feedback helped me improve my
coding practices and adopt industry best practices.

3. Team Collaboration: Collaborating with a team of developers taught me the


importance of effective communication and teamwork. It helped me appreciate the
significance of collaborative problem-solving in achieving project goals.

4. Time Management: The internship demanded time management skills to meet


project deadlines. Balancing tasks and prioritizing work became essential for delivering
high quality results.

5. Adapting to Change: The dynamic nature of the projects taught me to be adaptable


and embrace change. I learned to handle unforeseen challenges and quickly adjust to new
requirements.

6. Feedback and Continuous Improvement: Receiving feedback during code reviews


and project evaluations helped me identify areas for improvement. Embracing constructive
criticism enabled me to grow as a developer continuously.
7. Debugging and Troubleshooting: Working on real projects required me to become
proficient in debugging and troubleshooting code. I learned to identify and resolve issues
efficiently, leading to more robust solutions.

8. Project Management: The internship provided insights into project management


practices. I learned to plan, organize, and monitor tasks effectively, ensuring project
milestones were met.

Dept. of CSE, BIT 2022-2023 23


REFLECTION NOTES

9. Building a Portfolio: The internship allowed me to showcase my work and


contributions, building a valuable portfolio that demonstrates my Java development skills
to future employers.

10. Confidence and Independence: As the internship progressed, I gained confidence


in my Java abilities and became more independent in tackling coding challenges.

11. Career Direction: The internship allowed me to explore different aspects of Java
development, assisting me in deciding on a specific career path or specialization that aligns
with my interests and strengths.

12. Code Optimization: As the internship progressed, I became more conscious of code
efficiency and optimization. I learned to write cleaner, more maintainable, and performant
code.

13. Soft Skills: Beyond technical skills, the internship sharpened my soft skills, including
presentation, effective communication, and collaboration with non-technical stakeholders.

14. Industry Exposure: The internship provided a glimpse into the software
development industry, understanding how businesses operate, project lifecycles, and
client interactions.

15. Networking Opportunities: Interacting with professionals in the industry, both


within the organization and during events, opened networking opportunities that may be
beneficial in the future.

Overall, the Java internship has been a transformative experience, consolidating my


passion for Java development and preparing me for a successful career in the software
industry. It has ignited a thirst for continuous learning, motivating me to explore more
advanced Java topics and explore other areas of software development. I am grateful for
the knowledge gained, the friendships made, and the valuable experience that will
undoubtedly shape my future endeavours.

Dept. of CSE, BIT 2022-2023 24

You might also like