a.
Explanation of Solution
Program:
File name: “MeanMedian.java”
//Import necessary header files
import javax.swing.*;
//Define a class named MeanMedian
class MeanMedian
{
//Define a main method
public static void main(String[] args)
{
//Declare an array of nine integers
int[] nums = new int[9];
//Declare the variables and initialize the values
String entry;
String list = "You entered: ";
int a, b;
int temp;
int midPos;
int total = 0;
double mean;
//For loop to be executed until a exceeds 9
for(a = 0; a < nums.length; ++a)
{
//Prompt the user to enter a number
entry = JOptionPane.showInputDialog(null,
"Enter number " + (a + 1));
nums[a] = Integer.parseInt(entry);
//Compute the total
total += nums[a];
//If a equals zero
if(a == 0)
//Find the list
list += nums[a];
//Else a not equals zero
else
//Find the list
list += ", " + nums[a];
}
//Print the result
System...
b.
Explanation of Solution
Program:
File name: “MeanMedian2.java”
//Import necessary header files
import javax.swing.*;
//Define a class named MeanMedian2
class MeanMedian2
{
//Define a main method
public static void main(String[] args)
{
//Declare an array of 20 integers
int[] nums = new int[20];
//Declare the variables and initialize the values
int num = 0;
String entry;
String list = "You entered: ";
int a, b;
int temp;
double median;
int total = 0;
double mean = 0;
final int QUIT = 9999;
int size = 0;
/*For loop to be executed until a exceeds 20 and does not enter QUIT*/
for(a = 0; num != QUIT && a < nums.length; ++a)
{
//Prompt the user to enter a number or QUIT
entry = JOptionPane.showInputDialog(null,
"Enter number " + (a + 1) + " or " + QUIT + " to quit");
num = Integer.parseInt(entry);
//If the user does not enter QUIT
if(num != QUIT)
{
//Assign the value
nums[a] = num;
//Find the total
total += nums[a];
//If a equals zero
if(a == 0)
//Find the list
list += nums[a];
//Else
else
//Find the list
list += ", " + nums[a];
}
}
//Print the result
System.out.println("size is " + a);
//If the user does not enter QUIT
if(num != QUIT)
//Find the size
size = nums...
Trending nowThis is a popular solution!
- solve and show the tree on paperarrow_forwardI need help to resolve the following activityarrow_forwardModern life has been impacted immensely by computers. Computers have penetrated every aspect of oursociety, either for better or for worse. From supermarket scanners calculating our shopping transactionswhile keeping store inventory; robots that handle highly specialized tasks or even simple human tasks,computers do much more than just computing. But where did all this technology come from and whereis it heading? Does the future look promising or should we worry about computers taking over theworld? Or are they just a necessary evil? Provide three references with your answer.arrow_forward
- What are the steps you will follow in order to check the database and fix any problems with it? Have in mind that you SHOULD normalize it as well. Describe in full, consider the following:• Taking the database offline is not allowed since people are connected to it.• Personal data might be bridged and not secured. Provide three refernces with you answerarrow_forwardYou are called by your supervisor to go and check a potential data bridge problem. What are the stepsyou will follow in order to check the database and fix any problems with it? Have in mind that youSHOULD normalize it as well. Describe in full, consider the following:• Taking the database offline is not allowed since people are connected to it.• Personal data might be bridged and not secured. Provide three refernces with you answerarrow_forward(A) A cellular system has 12 microcells with 10 channels per cell. The microcells are split into 3 microcells, and each microcell is further split into 4 picocells. Determine the number of channels available in system after splitting into picocelles.arrow_forward
- Question 8 (10 points) Produce a relational schema diagram that corresponds to the following ER diagram for a Vacation Property Rentals database. Your relational schema diagram should include primary & foreign keys. Upload your relational schema diagram as a PDF document. Don't forget that the relation schemas for "Beach Property" and "Mountain Property" should each have primary keys. FYI: "d" in this notation denotes a subclass. Figure 2: ER Diagram for Question 8 id first RENTER name middle last address phone email 1 signs N id begin date RENTAL AGREEMENT end date amount N street address books city id 1 state address num. rooms PROPERTY zip code base rate type propertyType blocks to beach activity "B" "M" BEACH PROPERTY MOUNTAIN PROPERTYarrow_forwardNotes: 1) Answer All Question, 2) 25 points for each question QI Figurel shows the creation of the Frequency Reuse Pattern Using the Cluster Size K: (A) illustrates how i and j can be used to locate a co-channel cell. huster 3 Cluster Cluster 2 X=7(i=2,j1)arrow_forwardYou are called by your supervisor to go and check a potential data bridge problem. What are the stepsyou will follow in order to check the database and fix any problems with it? Have in mind that youSHOULD normalize it as well. Describe in full, consider the following taking the database offline is not allowed since people are connected to it and how personal data might be bridged and not secured.Provide three references with you answer.arrow_forward
- You are called by your supervisor to go and check a potential data bridge problem. What are the stepsyou will follow in order to check the database and fix any problems with it? Have in mind that youSHOULD normalize it as well. Describe in full, consider the following:• Taking the database offline is not allowed since people are connected to it.• Personal data might be bridged and not secured. Provide three refernces with you answerarrow_forwardYou are called by your supervisor to go and check a potential data bridge problem. What are the stepsyou will follow in order to check the database and fix any problems with it? Have in mind that youSHOULD normalize it as well. Describe in full, consider the following:• Taking the database offline is not allowed since people are connected to it.• Personal data might be bridged and not secured. Provide three refernces with you answer from websitesarrow_forwardModern life has been impacted immensely by computers. Computers have penetrated every aspect of oursociety, either for better or for worse. From supermarket scanners calculating our shopping transactionswhile keeping store inventory; robots that handle highly specialized tasks or even simple human tasks,computers do much more than just computing. But where did all this technology come from and whereis it heading? Does the future look promising or should we worry about computers taking over theworld? Or are they just a necessary evil? Provide three references with your answer.arrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning