Answered step by step
Verified Expert Solution
Question
1 Approved Answer
just write the code in javaScript by fixing the following code please. Following the instruction Objectives: 1. You will get some experience with using a
just write the code in javaScript by fixing the following code please. Following the instruction
Objectives: 1. You will get some experience with using a debugger and fixing bad code. 2. You will write some unit tests to test the provided code. 3. Set up a GitHub account if you do not have one, 4. You will learn about the Observer pattern. Preparation Read Deitel, Appendix E (Using the Debugger), and Appendix F. https://en.wikipedia.org/wiki/Observer pattern (Links to an external site.) https://www.tutorialspoint.com/design pattern/observer pattern.htm (Links to an external site.) Additional Preparation You will need to use an IDE this assessment. If you are using Eclipse, then JUnit 5 is installed. I will start a discussion thread with what I did to install these components into Java. Write Unit Tests All Students: Write unit tests using JUnit for the DiceBag class. Write the following unit tests: Add an Order Die to the DiceBag. Verify that the Order Die object is in the DiceBag! Test the toString() method of the DiceBag class. Verify that the returned string is correct! Add 3 blue Order Die object and add 2 red Order Die objects. Verify that those 5 Order Die objects are in the DiceBag! . Fix the Code! Use the Java debugger to find bugs in the given code. Document the bugs that you found. HW Report The first draft of my code for the DiceDraw app will be in the following code. You will create the hw6 package in your IDE, and move the code files into the hwo package. Make sure that the application compiles and runs. I package hw6; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ThreadLocalRandom; // This class holds the dice(or tokens) to be drawn. // public class DiceBag { private ListStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started