Answered step by step
Verified Expert Solution
Question
1 Approved Answer
low Help 22.md.pdf a a Q Search 7 Exercise A.4 [4%] Write a class called Checkerboard that opens a JFrame that displays a checkerboard
low Help 22.md.pdf a a Q Search 7 Exercise A.4 [4%] Write a class called Checkerboard that opens a JFrame that displays a checkerboard pattern (8 x 8 squares in alternating colours). Exercise A.5 [7%] In this Exercise you will create multiple methods in one class called ExerciseA5. Exercise A.5A [2%] Write three methods called union, difference and intersection. All methods should receive two HashSet as parameter and return void. In the methods compute the union, difference and intersection (depending on the name of the method) and print the result. Exercise A.5B [2%] Create a text file with ten words in a random non-alphabetical order. Write a method called displayWords that receives a String as a parameter that contains the name of this file and returns void. Store all the words individually in a List and print the List in alphabetical order. Exercise A.5C [2%] Write a method called calcNumberFrequencies that returns void and has no parameters. This method should prompt the user to enter integers via the command line. The integers should be entered in one line and read into a variable of you choice after the user presses the enter key. Compute the frequency of occurence for each integer that was entered and store how often each integer occurred in a Map data structure. Print this Map to the command line. Exercise A.5D [1%] Add a main method to ExerciseA5 and call all the methods written in Exercises 5A to 5C. Exercise A.6 [5%] Write a class called DrawLines that draws lines following keypresses. This class should open a JFrame. Start out in the middle and draw a line in the direction of the arrow key the user presses. AUG 8 3 > A C
Step 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