Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views13 pages

Java - Microproject (1111111)

The document outlines a micro project titled 'Number Guessing Game' completed by students of the Diploma in Computer Technology at Sou. Venutai Chavan Polytechnic. It details the rationale, aims, course outcomes, methodology, and skills developed through the project, which involves creating a Java-based game that utilizes object-oriented programming concepts. The project serves as a practical application of Java programming skills and includes certificates of completion for the participants.

Uploaded by

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

Java - Microproject (1111111)

The document outlines a micro project titled 'Number Guessing Game' completed by students of the Diploma in Computer Technology at Sou. Venutai Chavan Polytechnic. It details the rationale, aims, course outcomes, methodology, and skills developed through the project, which involves creating a Java-based game that utilizes object-oriented programming concepts. The project serves as a practical application of Java programming skills and includes certificates of completion for the participants.

Uploaded by

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

A

Micro project

On

“NUMBER GUESSING GAME”


Submitted By

Pratiksha Bombale(05)

Preeti Bhoge (46)

Shravani Adhav(48)

Guided By

Ms. S. K. Kawale
Diploma Course in Computer Technology

(As per directives of I Scheme, MSBTE)

Sinhgad Institutes
Sinhgad Technical Education Society’s
SOU. VENUTAI CHAVAN POLYTECHNIC
PUNE – 411041
ACADEMIC YEAR 2023-2024
Maharashtra State Board of Technical
Education
Certificate

This is to certify that Miss. Pratiksha P. Bombale with Roll No. 05 of Semester IV of
Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code: 0040) has successfully completed the Micro-Project in Java
Programming (22412) for the academic year 2023-2024 as prescribed in the
curriculum.

Program Code: CM Enrolment No: 2200400277


Course Code: CM/4/I Exam Seat No: 172995
Place: Pune Date:

Ms. S. K. Kawale Mrs. A. V. Kurkute Dr (Mrs)M.S. Jadhav


Course Teacher Head of Department Principle
Maharashtra State Board of Technical
Education
Certificate

This is to certify that Miss.Preeti D. Bhoge with Roll No. 46 of Semester IV of


Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code: 0040) has successfully completed the Micro-Project in Java
Programming (22412) for the academic year 2023-2024 as prescribed in the
curriculum.

Program Code: CM Enrolment No: 2200400368


Course Code: CM/4/I Exam Seat No: 173079
Place: Pune Date:

Ms. S. K. Kawale Mrs. A. V. Kurkute Dr (Mrs)M.S. Jadhav


Course Teacher Head of Department Principle
INDEX

Sr. CONTENT PAGE


No NO.
1 Rationale 1.

2 Aim of the Micro – Project 2.

3 Course Outcomes Addressed 3.

4 Benefits of the micro-project 4.

5 Literature Review 5.

6 Action plans 6.

7 Actual Methodology Followed 7.

8 Resources Required 8.

9 Output Of the Project 9.

10 Skills Developed 10.

11 Applications of this Project 11.

12 Conclusion 12.

13 References 13.
Annexure - I

Micro Project Report

NUMBER GUESSING GAME

1.0 Rationale:
Java is platform independent, open-source object-oriented programming language
enriched with free and open-source libraries. In current industrial scenario Java has
the broad industry support and is prerequisite with many allied technologies like
Advanced Java, Java Server Pages, and Android Application Development. Thus,
current industrial trends necessitate acquiring Java knowledge for Computer
Engineering and Information Technology graduates. This course develops necessary
skills in students to apply object-oriented programming techniques in Java so that
students will be able to develop complete applications using core Java.

2.0 Aim of the Micro – Project:


To develop a Number Guessing Game

3.0 Course Outcomes Addressed:


a) Develop programs using Object Oriented methodology in Java.
b) Apply concept of inheritance for code reusability.
c) Develop programs using multithreading.
d) Implement Exception Handling

4.0 Benefits of the micro-project:


 Micro-Project aim:
1. To get information about java applet.
2. To get information about different shapes and methods in java applet.
3. To get information about how to create animations in java applet.

 Benefits of project:

1. We learned about how to insert image in java applet.


2. We learned about different shapes in java applet.
3. We learned about creating animations using java applet
5.0 Literature Review:

 Introduction to Random Class:


Random class is used to generate pseudo-random numbers in java.
An instance of this class is thread-safe. The instance of this class is
however cryptographically insecure. This class provides various
method calls to generate different random data types such as
float, double, int.
 Advantages of Random Class:

 Disadvantages of Random Class:

 Methods of Random Class:

Method Declaration
For using the methods of this class you need to import it first from the package as
import java.util.Random;

After importing, you need to create an object of this class like


Random randomNumbers = new Random();

1. java.util.Random.doubles(): Returns an effectively unlimited stream of


pseudo random double values, each between zero (inclusive) and one
(exclusive)
Syntax:
public DoubleStream doubles()
Returns:
a stream of pseudorandom double values

2. java.util.Random.ints(): Returns an effectively unlimited stream of


pseudo random int values
Syntax:
public IntStream ints()
Returns:
a stream of pseudorandom int values
3. java.util.Random.longs(): Returns an effectively unlimited stream of
pseudo random long values
Syntax:
public LongStream longs()
Returns:
a stream of pseudorandom long values
4. next(int bits): java.util.Random.next(int bits) Generates the next
pseudo random number
Syntax:
protected int next(int bits)
Parameters:
bits - random bits
Returns:
the next pseudo random value from this
random number generator's sequence

5. java.util.Random.nextBoolean(): Returns the next pseudo random,


uniformly distributed boolean value from this random number
generator’s sequence
Syntax:
public boolean nextBoolean()
Returns:
the next pseudorandom, uniformly distributed boolean value
from this random number generator's sequence

6. java.util.Random.nextBytes(byte[] bytes) :Generates random bytes


and places them into a user-supplied byte array
Syntax:
public void nextBytes(byte[] bytes)
Parameters:
bytes - the byte array to fill with random bytes
Throws:
NullPointerException - if the byte array is null

7. java.util.Random.nextDouble(): Returns the next pseudo random,


uniformly distributed double value between 0.0 and 1.0 from this
random number generator’s sequence
Syntax:
public double nextDouble()
Returns:
the next pseudo random, uniformly distributed double
value between 0.0 and 1.0 from this
random number generator's sequence

8. java.util.Random.nextFloat(): Returns the next pseudo random,


uniformly distributed float value between 0.0 and 1.0 from this
random number generator’s sequence
Syntax:
public float nextFloat()
Returns:
the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from this
random number generator's sequence

9. java.util.Random.nextGaussian(): Returns the next pseudo random,


Gaussian (“normally”) distributed double value with mean 0.0 and
standard deviation 1.0 from this random number generator’s
sequence
Syntax:
public double nextGaussian()
Returns:
the next pseudorandom, Gaussian ("normally") distributed double
value with mean 0.0 and standard deviation 1.0 from this
random number generator's sequence

10. java.util.Random.nextInt(): Returns the next pseudorandom,


uniformly distributed int value from this random number generator’s
sequence
Syntax:
public int nextInt()
Returns:
the next pseudorandom, uniformly distributed int value from
this random number generator's sequence

11. java.util.Random.nextInt(int bound): Returns a pseudo random,


uniformly distributed int value between 0 (inclusive) and the specified
value (exclusive), drawn from this random number generator’s
sequence
Syntax:
public int nextInt(int bound)
Parameters:
bound - the upper bound (exclusive). Must be positive.
Returns:
the next pseudorandom, uniformly distributed int value
between zero (inclusive) and bound (exclusive) from this random number
generator's sequence
Throws:
IllegalArgumentException - if bound is not positive

12. java.util.Random.nextLong(): Returns the next pseudorandom,


uniformly distributed long value from this random number
generator’s sequence
Syntax:
public long nextLong()
Returns:
the next pseudorandom, uniformly distributed long value
from this random number
generator's sequence

13. java.util.Random.setSeed(long seed): Sets the seed of this random


number generator using a single long seed
Syntax:
public void setSeed(long seed)
Parameters:
seed - the initial seed

6.0 Action plans –


Sr. Details of Activities Planned Planned Name of
No. Start Date Finish Date Responsible
Team
Member
1 Decide subject for micro- Pratiksha Bombale
project.
2 Preparation and submission of Preeti Bhoge
Abstract.

3 Collection of data. Shravani Adhav


4 Discussion and outline Pratiksha Bombale
of Content.

5 Formulation of content. Preeti Bhoge


6 Editing of Content. Shravani Adhav
7 Final submission of Micro- Pratiksha Bombale
Project. Preeti Bhoge
Shravani Adhav

7.0 Actual Methodology Followed:

Program Code:
import java.util.Random;
import java.util.Scanner;

public class NumberGuessingGame {


private static final int MAX_ATTEMPTS = 10;
private static final int MIN_NUMBER = 1;
private static final int MAX_NUMBER = 100;

public static void main(String[] args) {


Random random = new Random();
Scanner scanner = new Scanner(System.in);

int numberToGuess = random.nextInt(MAX_NUMBER - MIN_NUMBER + 1) +


MIN_NUMBER;
int attemptsLeft = MAX_ATTEMPTS;

System.out.println("Welcome to the Number Guessing Game!");


System.out.println("I'm thinking of a number between " + MIN_NUMBER + " and " +
MAX_NUMBER + ".");

while (attemptsLeft > 0) {


System.out.println("\nYou have " + attemptsLeft + " attempts left.");
System.out.print("Enter your guess: ");
int userGuess = scanner.nextInt();

if (userGuess < numberToGuess) {


System.out.println("Too low! Try again.");
} else if (userGuess > numberToGuess) {
System.out.println("Too high! Try again.");
} else {
System.out.println("Congratulations! You've guessed the number: " +
numberToGuess);
break;
}

attemptsLeft--;
}

if (attemptsLeft == 0) {
System.out.println("Sorry, you've run out of attempts. The number was: " +
numberToGuess);
}

scanner.close();
}
}

8.0 Output Of the Project:


9.0 Resources Required:

Name of Specifications Quantity Remarks


Sr.
Resource /
No.
Material
1 Computer RAM minimum 1
2GB, i3 -i5
preferable
Operating
2 Windows 10 1
System
3 Software JDK 1.8.0_241 1
4 Internet Google -
5 Book Java Programming 1

10.0 Skills Developed:


1. Communication
2. Leadership
3. Team management
4. Negotiation
5. Personal organization
6. Risk management
7. Critical thinking
8. Task management
9. Solving problem
10. Error handling

11.0 Applications of this Project:


12.0 Conclusion:

13.0 References:
• www.youtube.com
• www.google.com
• www.javatpoint.com

You might also like