Question: I am working on a assignment about Java Programming, but I am stucked in Task 3, and I need to code a Weapon pickedAtRandom() method,

I am working on a assignment about Java Programming, but I am stucked in Task 3, and I need to code a Weapon pickedAtRandom() method, I have already make a array of alltheweapons to initialize all the weapons, and now I need to pick a random weapon for Task4, but I don't know how to code it, also this assignment cannot use any other packages and just need to use EasyGraphics, EasyPanel, EasyReader and EasyWriter packages.

This is the image about the Weapon.java that I need to modify without adding new methods or packages:

I am working on a assignment about Java Programming, but I am

This is the guideline:

stucked in Task 3, and I need to code a Weapon pickedAtRandom()

Task 3 The program will not be able to do anything until it has decided who the murderer was, where the murder happened and what the weapon was. The class called Scenario. java deals with this using the following method. publicvoidsetAtRandom(){attackedWith=Weapon.pickedAtRandom();attacker=Suspect.pickedAtRandom();attackedin=RoompickedAtRandom(); This tasks consists of writing the three pickedAtRandom() methods for the three classes Weapon, Suspect and Room. If you do this with well written methods that demonstrate the techniques identified in the marking scheme you can expect to get another 27% (9\% for each method) so 59% in all and your output but when you run Assignment3. java the output will not have chaged. You need to ask the user to guess the answer. That is the next task

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!