0% found this document useful (0 votes)
983 views17 pages

"Dice Roll": Visvesvaraya Technological University

The document describes an Android project report submitted by three students for their 6th semester bachelor's degree in computer science and engineering. It discusses the development of a "Dice Roll" application in partial fulfillment of their degree requirements. The report is certified by their guide and the heads of the computer science department of their institute. It includes an abstract, introduction to the Android operating system architecture, and an index of chapters covering the application requirements, implementation, and results.

Uploaded by

kushal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
983 views17 pages

"Dice Roll": Visvesvaraya Technological University

The document describes an Android project report submitted by three students for their 6th semester bachelor's degree in computer science and engineering. It discusses the development of a "Dice Roll" application in partial fulfillment of their degree requirements. The report is certified by their guide and the heads of the computer science department of their institute. It includes an abstract, introduction to the Android operating system architecture, and an index of chapters covering the application requirements, implementation, and results.

Uploaded by

kushal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

DICE ROLL 2021-2022

VISVESVARAYA TECHNOLOGICAL UNIVERSITY


JNANA SANGAMA, BELAGAVI – 590018

A Project Report
For the 6th semester
“DICE ROLL”
Submitted in partial fulfillment of the requirements for the award of degree
of
BACHELOR OF
ENGINEERING IN
COMPUTER SCIENCE AND ENGINEERING

Submitted by
Akshata B Kurubar 2VD19CS002
Chandan R Naik 2VD19CS009
Kushal Nayak 2VD19CS020

Under the Guidance of


Prof. Pranesh K

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


KLS VISHWANATHRAO DESHPANDE INSTITUTE OF
TECHNOLOGY,
HALIYAL-581329
2020-2021
DICE ROLL 2021-2022

KLS VISHWANATHRAO DESHPANDE


INSTITUTE OF TECHNOLOGY,
HALIYAL - 581329

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING

Certificate
Certified that the project work entitled
“DICE ROLL”
Is bonafide work carried out by

Akshata B Kurubar
(2VD19CS002)
Chandan R Naik
(2VD19CS009)
Kushal Nayak
(2VD19CS020)

in partial fulfillment of the requirements for the award of the degree of Bachelor of
Computer Science and Engineering of Visvesvaraya Technological
University,Belagavi, during the year 2021-2022. It is certified that all the corrections /
suggestions indicated for internal assessment have been incorporated in the report. The
project report has been approved as it satisfies the academic requirements in respect of
project work prescribed for the Bachelor of Engineering degree.

Signature of the Guide Signature of the HOD Signature of the Principal


Prof. Pranesh K Prof.PoornimaRaikar Dr. V. A. Kulkarni

Name of the Examiners: Signature


DICE ROLL 2021-2022
with date:
ACKNOWLEGEMENT

Culmination of project is that stage which makes the transformation of


theoretical idea into a visible reality. Our report acknowledges, guidance, supervision
and a lot of inspiration; it is time now to acknowledge our obligations to all who have
extended their co-operation all along our study tenure of project work.
We wish to place a record our profound privilege & deep sense of gratitude
towards our guide Prof. Pranesh K for their whole hearted guidance and support
without which this endeavor would not have been possible.
We take this opportunity to thank Prof. POORNIMA RAIKAR HOD of
Computer Science and Engineering Dept. VDIT Haliyal for providing the inspiration for
taking the project to its completion.
We are also deeply grateful to Dr. V.A.KULKARNI our beloved principal for
having provided us the academic environment, which nurtured our practical skills,
contributing to the success of our project.
Our diction falls short of words to gratify the teaching and non-teaching
faculty members of our Department for being primary source of inspiration and strength
for the project study.
Lastly with unquantifiable affection and reference we wish to express our
sincere feelings to our parents and family members in the form of words, which are
restrictive in expression and quantum.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

ABSTRACT

Dice are used in many games, and often in fairly complex ways that make it difficult to
unambiguously describe the dice-roll mechanism in plain language.
Many role-playing games, such as Dungeons & Dragons, use a formalised notation for
some instances of dice-rolls. This notation, once explained, make dice-roll descriptions
concise and unambiguous. Furthermore, the notation has been used in automated tools for
pseudo-random dice-rolling (typically used when playing over the Internet).
This notation is, however, fairly limited in the types of dice-rolls it can describe, so most
games still use natural language to describe rolls. Even Dungeons & Dragons use formal
notation only for some of the dice-roll methods used in the game. Hence, a more complete
notation is in this paper proposed, and a tool for pseudo-random rolls and (nearly) exact
probability calculations is described.
The notation is called “Troll”, combining the initial of the Danish word for dice
(“terninger”) with the English word “roll”. It is a development of the language Roll
described in an earlier paper. The present paper describes the most important features of
Troll and its implementation

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

INDEX

Pagenumber

Chapter1 Introduction 1-9

Chapter2 Literature Survey 10

Chapter3 System Requirement Specification 11

Chapter4 Implementation 12

Chapter5 Results 13-15

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Chapter 1
Introduction to Android OS

Android is a Linux-based operating system it is designed primarily for touch screens


mobile devices such as smartphones and tablet computers. Android is a powerful
operating system and it supports a large number of applications on Smartphones. These
applications are more comfortable and advanced for users. The hardware that supports
android software is based on the ARM architecture platform.

Android Framework or Android architecture

Android operating system composed of different software components that are arranged
into a stack.

1. Applications:

An application is the top layer of the android architecture. The pre-installed


applications like camera, gallery, home, contacts, etc., and third-party
applications downloaded from the play store like games, chat applications, etc.,
will be installed on this layer. It runs within the Android run time with the help
of the classes and services provided by the application framework.

2. Application framework:

Application Framework provides several important classes used to create an


Android application. It provides a generic abstraction for hardware access and
helps in managing the user interface with application resources. Generally, it
provides the services with the help of which we can create a particular class and
make that class helpful for the Applications creation. It includes different types
of services, such as activity manager, notification manager, view system,
package manager etc., which are helpful for the development of our application
according to the prerequisite. The Application Framework layer provides many
higher-level services to applications in the form of Java classes. Application
developers are allowed to make use of these services in their applications.

Dept. Of CSE, KLS VDIT Page |1


Haliyal
DICE ROLL 2021-2022

3. Application runtime:

Android Runtime environment contains components like core libraries and the
Dalvik virtual machine (DVM). It provides the base for the application
framework and powers our application with the help of the core libraries. Like
Java Virtual Machine (JVM), Dalvik Virtual Machine (DVM) is a register-based
virtual machine designed and optimized for Android to ensure that a device can
run multiple instances efficiently. It depends on the layer Linux kernel for
threading and low-level memory management. The core libraries enable us to
implement android applications using the standard JAVA or Kotlin
programming languages.

4. Platform libraries:

The Platform Libraries include various C/C++ core libraries and Java based
libraries such as Media, Graphics, Surface Manager, OpenGL, etc., to support
Android development.

5. Linux Kernel:

Linux Kernel is the heart of the android architecture. It manages all the available
drivers such as display, camera, Bluetooth, audio, memory, etc., required during
the runtime. The Linux Kernel will provide an abstraction layer between the
device hardware and the other android architecture components. It is
responsible for the management of memory, power, devices etc.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Introduction to Android Studio


Android Studio is the official Integrated Development Environment (IDE) for Android
app development, based on IntelliJ IDEA. On top of IntelliJ's powerful code editor and
developer tools, Android Studio offers even more features that enhance your
productivity when building Android apps, such as:
• A flexible Gradle-based build system
• A fast and feature-rich emulator
• A unified environment where you can develop for all Android devices

Project structure
Each project in Android Studio contains one or more modules with source code files
and resource files. Types of modules include:
1. Android app modules
2. Library modules
3. Google App Engine modules

By default, Android Studio displays your project files in the Android project view.
This view is organized by modules to provide quick access to your project's key source
files. All the build files are visible at the top level under Gradle Scripts and each app
module contains the following folders:
1. manifests: Contains the AndroidManifest.xml file.
2. java: Contains the Java source code files, including JUnit test code.
3. res: Contains all non-code resources, such as XML layouts, UI strings, and
bitmap images.

Gradle build system


Android Studio uses Gradle as the foundation of the build system, with more Android-
specific capabilities provided by the Android plugin for Gradle. This build system runs
as an integrated tool from the Android Studio menu, and independently from the
command line.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

You can use the features of the build system to do the following:
• Customize, configure, and extend the build process.
• Create multiple APKs for your app, with different features using the same
project and modules.
• Reuse code and resources across source sets.

By employing the flexibility of Gradle, you can achieve all of this without modifying
your app's core source files. Android Studio build files are named build.gradle. They are
plain text files that use Groovy syntax to configure the build with elements provided by
the Android plugin for Gradle. Each project has one top-level build file for the entire
project and separate module-level build files for each module. When you import an
existing project, Android Studio automatically generates the necessary build files.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

INTRODUCTION
The Dice is a simple cube shaped like object used in various board games such as snake-
ladder, Ludo etc. It is a simple cube which generates a random number when rolled by a
user. A Dice rolling simulator is nothing but a computer model that can be created by a
software program and it functions same as a normal dice in which user rolls a dice and a
random number gets shown on the screen.
An universal method for dice-rolls needs to be able to describe all of the above, and more.
Any Turing-complete programming language can do this, but the result is not necessarily
very concise or readable, and it may be impossible to analyse descriptions for such things
as probability distributions. Hence, we propose a notation that extends the mdn notation
from Dungeons & Dragons while being readable to non-programmers after a short
introduction.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Chapter 2
SYSTEM REQUIREMENTS SPECIFICATION
2.1. HARDWARE:
• Android v9.0 (pie)
• 6 Gb Ram
• Display screen with working touch
• 1 Gb Storage

2.1.SOFTWARE:

.1.1. Android Studio:

It is an Integrated Development Environment (IDE) that Android use to develop


applications. It incorporates with the IntelliJ IDEA, a Java Integrated Development
Environment when you edit codes and develop tools. Android Studio provides more
features that enhance our productivity while building Android apps.

Each project in Android Studio contains one or more modules with source code files
and resource files. Types of modules include:

• Android app modules


• Library modules
• Google App Engine modules
By default, Android Studio displays your project files in the Android project view.
This view is organized by modules to provide quick access to your project's key source
files. All the build files are visible at the top level under Gradle Scripts and each app
module contains the following folders:

• Manifests: Contains the AndroidManifest.xml file.


• Java: Contains the Java source code files, including JUnit test code.
• Res: Contains all non-code resources, such as XML layouts, UI strings, and
bitmap images.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Chapter 3

IMPLEMENTATION

During the software-testing phase each module of software is thoroughly tested for
bugs and for accuracy of output. The system developed is very user-friendly and the
detailed documentation is also given to the user as online help wherever necessary. The
implementation phase normally ends with the formal test involving all the components.
Here 5 steps are involved:
Step 1: Creating a new project
• Click on the File option at the topmost corner in the left.
• Then click on new and open a new project and name the project.
• Now select the Empty Activity with language as Java.
• Name it Dice roller.

Step 2: Designing the UI with activity_main.xml


• Navigate to and open the MainActivity.kt file (app > java >
com.example.diceroller > MainActivity.kt). Below is what you should see. If
you see import..., click on the ... to expand the imports.
•  Android apps operate differently. Instead of calling a main() function, the
Android system calls the onCreate() method of your MainActivity when your app
is opened for the first time.
• The rest of the onCreate() method sets up the MainActivity by using code from
the imports and by setting the starting layout with setContentView().
• Android provides a framework of numerous classes to make writing Android
apps easier, but it needs to know exactly which class you mean. You can specify
which class in the framework to use in your code by using an import statement.
For example, the Button class is defined in android.widget.Button.
Step 3: Working with DiceRoll.java
• code more concise by condensing code into a shorter number of lines. For example,
here is the code that sets the click listener on the Button.
• Since the instructions for the click listener are only 1 line long, you can condense
the rollDice() method call and the curly braces all onto one line. This is what it
looks like. One line instead of three lines!
• In the MainActivity.kt class, select all the text in the file with the keyboard
shortcut Control+A on Windows (or Command+A on Mac). Or you could go to the
menu in Android Studio Edit > Select All

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Chapter 4

RESULTS

Fig 4.1: Dice with face one Fig 4.1: Dice with face two

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Fig 4.1: Dice with face three Fig 4.1: Dice with face four

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

Fig 4.1: Dice with face five Fig 4.1: Dice with face six

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

CONCLUSION

We have created a Dice roller that contains six faces marked with a different number of
dots from one to six. When rolled, the die comes to rest showing a random integer from
one to six on its upper surface. It works on Android devices and is designed for
generating random numbers, commonly as part of tabletop games, including dice
games, board games, role- playing games, and games of chance.

Dept. Of CSE, KLS VDIT Page


Haliyal
DICE ROLL 2021-2022

REFERENCES

1. Google Developer Training, "Android Developer Fundamentals Course –


Concept Reference”, Google Developer Training Team, 2017.

Dept. Of CSE, KLS VDIT


Haliyal

Page

You might also like