Graphics:
Program 1: Main Idea: In this program, we want to use if/else or else if statements to make decisions and loops to generate our data.
This is a graphical program
- Simulate a survey and see what comes from it. You are to generate 5000 numbers between 1-100. Based on the number returned, we are going to figure out what type of media a user is interested in.
The ranges are:
1. 0-24 (inclusive)(include 24) - Traditional TV
2. 25-49(inclusive)(include 49) - Netflix
3. 50-74 (inclusive) (include 74) - Amazon Prime
4. 75-100 (inclusive) (include 100) - Sling
- Keep track of how many there are of each and print these out at the end in the panel.
- Based on the results, you should display the winner of this simulated survey. You should have a separate class that you instantiate 4 times for each of the TV types. This class should have the following properties.
- Title,
- Description
- Picture
- The highest total should determine which TV type should appear. The program is a graphical program that displays all the information. Display nothing in the console
Remember you should have a different class for your Frame, your Panel, and your TVType class. You can use an ArrayList for this program if you want.