The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 305 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Could you please help me with this program using Java and Eclipse. Please comment on the code so I fully understand what is taking place.
Thank you
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.
o  Title,
o  Description
o  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.
Â
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly