top of page
Search

# CMSC 5823 – Object Oriented Programming Project 1 – Dice Roller

Updated: Aug 16, 2023

Dice Roller - Java Solution

For this assignment, you will be required to write Java software that meets the requirements of the dice roller story, passes all the acceptance criteria, and meets the technical requirements listed.

## To turn in this assignment, you must demo your program during lab.

Project Plan

Main Story

Project 1.1

Project 1.2

Acceptance Criteria

Technical Requirements

Objectives

Project Plan

Main Story

As a game player, when I need to roll some dice, I want to view total of the faces on the specified number of dice using the specified number of faces so that I can use the total in my game playing.

Project 1.1

1. 50 points

2. Problem Domain Objects

3. Tests

4. AC 1-3 for Problem Domain services

5. Turn in during lab:

a. Source Code

b. Object Model

c. Demo test results

Project 1.2

1. 50 points

2. Problem Domain Objects

3. User Interface Objects

4. Tests

5. AC 4-8 for Problem Domain services

6. Turn in during lab:

a. Source Code

b. Java Docs

c. Object Model

d. Demo test results

Acceptance Criteria

1. AC #1

a. Given: I am ready to roll.

b. When: I enter the number of dice and the number of faces .

c. Then: I can view the value of each face rolled and the total of all faces rolled.

2. AC #2

a. Given: I have specified the number of faces on the die.

b. When: I roll the die.

c. Then: The value of the result is between 1 and the number of faces specified.

3. AC #3

a. Given: I have rolled the dice 100 times.

b. When: I calculate the frequency of each face value.

c. Then: The frequency of each possible face value is the same.

4. AC #4

a. Given: I am ready to roll.

b. When: I start the program.

c. Then: I can view a screen with fields for entry of number of faces and number of

dice, and a button to click to roll.

5. AC #5

a. Given: I am ready to roll.

b. When: I enter the number of dice and the number of faces and click roll.

c. Then: I can view the value of each face and the total of all faces rolled.

6. AC #6

a. Given: I have specified the number of faces on the dice and the number of dice to

roll and have rolled the dice.

b. When: I view the total.

c. Then: The total is equal to sum of the faces displayed for each dice.

7. AC #7

a. Given: I have specified the number of faces and rolled the dice.

b. When: The number specified is not greater than 0.

c. Then: An error message is displayed, and the total is set to 0.

8. AC #8

a. Given: I have specified the number of dice and rolled the dice.

b. When: The number specified is not greater than 0.

c. Then: An error message is displayed, and the total is set to 0.

Technical Requirements

1. Write program in Java using Eclipse IDE.

2. Do incremental development.

3. Create UML Object Model.

4. Create Java Docs for the software.

5. Apply Abstraction by creating objects that represent the real-world items.

6. Apply Encapsulation by creating objects in a PD model.

7. Apply Reuse by using the same PD objects with different UIs.

8. Apply Separation of Concerns by putting UI Classes and PD Class in separate packages.

9. Apply Separation of Concerns for error checking by not doing I/O in PD classes.

10. Apply Polymorphism by using the same method name for the dice and collection of dice for rolling the dice.

11. Output the results of tests.

Objectives

1. The student will demonstrate the use of these CS Principles by the successful

completion of the software for this project.

a. Encapsulation

b. Abstraction

c. Polymorphism

d. Re-use

e. Separation of Concerns

2. The student will demonstrate the use of these CS Skills by the successful completion of the software and documentation for this project.

a. UML OO Modeling in Visual Paradigm

b. OOP Programming in Java in Eclipse

c. Incremental Development

3. The student will demonstrate the application of this CS Knowledge by the successful completion of the software and documentation for this project

a. UML

i. Class diagrams

b. OOP Concepts/Modeling

i. Classes - Chapter 5 – Classes

ii. Attributes

iii. Methods (messages)

iv. Separation of Concerns

c. Java

i. Arrays of Objects

ii. Iterators - Chapter 16

iii. Basic Swing - Chapter 6 – UI

iv. Exception Handling - Chapter 10

v. Packages

d. Eclipse

i. Use

ii. Packages

iii. Debugging

iv. Java Docs

e. Problem Specification

i. Stories

ii. Acceptance Criteria

f. Iterative Development

i. Small stories

g. Book

i. Chapter 5 – Classes

ii. Chapter 6 – UI

iii. Chapter 7 – Arrays of Objects

iv. Chapter 10 – Exceptions

v. Chapter 16 – Iterators

For Perfect and Plagiarism Free Solution:

+91 - 995 314 1035

Solution Includes: Plagiarism and AI report with 100% Accuracy.