The mean of a list of numbers is its arithmetic average. The median of a list is its middle value when the values are placed in order. For example, if an ordered list contains 1, 2, 3, 4, 5, 6, 10, 11, and 12, then the mean is 6, and their median is 5. Write an application that allows you to enter nine integers and displays the values, their mean, and their median
Q: Assume the following method is outside the class of KWArrayList class but has access to the methods…
A: In the above code given, there are two lists present, list1 and list2. Initially, a variable is…
Q: write a c++ code uisng linked list for quiz. In quiz game, questions are chosen in such a a way…
A: In quiz game,questions are chosen in such a away that they cover all fields of a typical quiz…
Q: Instructions Revise the MeanMedian2 class from Chapter 9 Exercise 2A so that the user can enter any…
A: - We need to code for the mean and median in unknown sized list.
Q: 4.15 LAB: Word frequencies - methods Write a program that reads a list of words. Then, the…
A: import java.util.Scanner; public class Main { public static int GetFrequencyOfWord(String[]…
Q: powerTwoList = input() powerTwolist = ast.literal_eval(powerTwoList) size = int(input()) 2. Find The…
A: Actually, function is a group of statements.
Q: • Returns False if two Food objects do not have all the same attributes • This method should not…
A: Python used to answer this question
Q: e the following method is outside the class of KWArrayList class but has access to the methods of…
A: It is defined as an object which contains elements of a similar data type. Additionally, The…
Q: Write a statement that creates a list with the following strings (in that order) and assigns it to a…
A: I use python language for solving this...
Q: in coral languge Write a program that first gets a list of 5 integers from input. Then, get another…
A: Actually, program is a executable program that runs on a computer.
Q: a dynamic arraylist for food menu where user can add new menu into list using JAVA that also can be…
A: It is defined as an object-oriented programming, platform-independent, and secure programming…
Q: Write a program that first gets a list of integers from input. The input begins with an integer…
A: Below is the complete solution with explanation in detail for the given question in Java Programming…
Q: Create the game of Hangman. In the game of Hangman, the computer chooses a word at random from a…
A: Please find below the solution in second & third step::-
Q: For this interactive assignment, you will create an application that grades the written portion of…
A: Because of indentation problem in python i attached screen shots of program for better…
Q: In Java: Write a program that reads an integer, a list of words, and a character. The integer…
A: Given: Write a program that reads an integer, a list of words, and a character. The integer…
Q: You can write a function that modifies a list but has no In red-green-blue color notation, we…
A: Answer for all true/false with explanation given below
Q: With Java FX, to display a comment that could span multiple lines, you should use a TextField Button…
A: Ans 1) With java FX, to display a command that could span multiple lines, you should use a : c)…
Q: Data structure & Algorithum java program 1) Add a constructor to the class "AList" that creates a…
A: The program is given below: import java.util.*; public class AList<T> implements…
Q: public class PasswordGeneratorAndStorage
A: Here is the answer which is mentioned below: When i ran this code, i did not had any problem,…
Q: The "key" list contains the correct answers * to an exam, like ["a", "a", "b", "b"]. The "answers" *…
A: package cmdLineInterpreter; import java.util.List; public class Command { private String action;…
Q: ARRAYLIST 1. Write a Java program to create a new array list, add some colors (string) and print out…
A: ArrayList is a dynamic and generic data type that can hold data type of Object. The ArrayList is in…
Q: Assume the variable text is a list containing one element - the string "luck". Which statement would…
A: Given text = ["luck"] python list does not have an exclusive function to prepend items to list.…
Q: Assume the following method is in class TestArrayList (outside the KWArrayList class). What does it…
A: The answer is...
Q: Assume the following method is within the KWLinkedList class, what does the following method do?…
A: ListIterator<E> iter1 = iterator( ); (iter1 is initialized with the first element of…
Q: Aquarium Fish - length: double - width: double - height: double fishes: Fish [ ] - name: String -…
A: If you want to run the code you can run it on online GDB compiler. I have bolded out the code for…
Q: Consider two lists of numbers called list1 and list2. A programmer wants to determine how many…
A: Option 3 is correct.
Q: ssume the following method is outside the class of KWArrayList class but has access to the methods…
A: In the given program ,when we consider so we saw that things. =============================== 1.…
Q: At the interactive prompt define a list named L that contains four strings or…
A: Given data is shown below: At the interactive prompt define a list named L that contains four…
Q: a. The mean of a list of numbers is its arithmetic average. The median of a list is its middle value…
A: Mean or arithmetic average: The mean of n- values is to sum of all the n -values and divide the sum…
Q: For this interactive assignment, you will create an application that grades the written portion of…
A: Here is the detailed explanation of the program
Q: A. Create an ArrayList object called course that will store strings and Add Items? B. Create a…
A: The ArrayList class, which is part of the java.util kit, is a resizable array.The distinction…
Q: Assume the following method is within the KWLinkedList class, what does the following method do?…
A: Given that assume the following method is within the KWLinkedList class. What does the following…
Q: A business that sells dog food keeps information about its dog food products in a linked list. The…
A: Answer: Algorithms Steps1:we have create Node in which that contains data and next field…
Q: detemine if the follow statement are true or False and why? screenshots show the ArrayBoundedStack…
A: Introduction: The ArrayBasedStack class is defined along with its attributes, constructors, and…
Q: The local driver's license office has asked you to create an application that grades the writ- ten…
A: According to the information given:- We have to follow the instruction to conduct the local driver's…
Q: For this interactive assignment, you will create an application that grades the written portion of…
A: We define main () where created array name corr_ans_list[] which has 20 correct list of answers in…
Q: Java Programming Define a class CollectionBooks. This class has a data member list of type Book…
A: import java.util.*;class Book { private String name; private int id; public Book() { } public…
Q: Assume the following method is within the KWLinkedList class, what does the following method do?…
A: LinkedList iterator is used to iterate all the elements in linked list using the loop. The program…
Q: Assume the following method is within the KWLinkedList class, what does the following method do?…
A: In java a linkedlist is a data structure used to store a list structure in which each element is…
Q: The mean of a list of numbers is its arithmetic average. The median of a list is its middle value…
A: Start enter 9 number by defining median `calculate median calculate mean and print it
Q: The local driver's license office has asked you to create an application that grades the written…
A: Below is the Python code for the above application, along with some example output. Refer to the…
Q: 2) Write a script AreaMenu that will print a list consisting of "rectangle" and "cylinder". It…
A: Write a script AreaMenu that will print a list consisting of "rectangle" and "cylinder".It prompts…
Q: Instructions: 1. This java program is for an application that stores the author (Writer) data of…
A: Instructions: 1. This java program is for an application that stores the author (Writer) data of…
Q: This part is a game that the user can play. The game starts with the following screen in a table…
A: Answer: HTML, JQuery and CSS codes - Save this code as .HTML file and open with any browser…
Q: IN JAVA. Any help is appreciated! Thank you! PART 1 : Automobiles Create a data class named…
A: Actually, the code has given below:
Q: python coding Driver’s License ExamThe local driver’s license office has asked you to create an…
A: correct_answers = {1: "B", 6: "A", 11: "B", 16: "C", 2: "D", 7: "B", 12: "C", 17: "C", 3: "A", 8:…
Q: Write a procedure, called count-to-1, that takes a positive integer n, and returns a list of the…
A: Write a procedure, called count-to-1, that takes a positive integer n, and returns a list of the…
Q: Assume the following method is outside the class of KWArrayList class but has access to the methods…
A: The function Unknown() recieves a list of KWArrayList class. It consists of three if-else statements…
Q: Given main() and an IntNode class, complete the IntList class by writing the append() and search()…
A: public class IntList { // Linked list nodes public IntNode headNode; public IntNode tailNode; public…
Q: The mean of a list of numbers is its arithmetic average. The median of a list is its middle value…
A: In the above code, it has been asked to print the mean and median of the 9 numbers, in the following…
Q: Write the method searchKey (char key), which search data ‘key’ in the list and return its index.
A: Use a for loop to iterate over the given list and return the index when key matches the element at…
The mean of a list of numbers is its arithmetic average. The median of a list is its middle value when the values are placed in order. For example, if an ordered list contains 1, 2, 3, 4, 5, 6, 10, 11, and 12, then the mean is 6, and their median is 5. Write an application that allows you to enter nine integers and displays the values, their mean, and their median.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- Extreme Fizz BuzzFizz Buzz is a classic Computer Science problem about Selection. For an integer x, print:• “Fizz” if x is only divisible by 3,• “Buzz” if x is only divisible by 5,• “FizzBuzz” if x is divisible by both 3 and 5,• the number x if it is not divisible by both 3 and 5.This problem is the extreme version of Fizz Buzz. You are given a list of K distinct integers A and a list of K characters S. Both lists are numbered from 1 to K. The integer Ai corresponds to the character Si. Denote B as the subset of A. There will be a rule for each possible subset: if an integerx is only divisible by all elements in B, print a string which is the concatenation of the corresponding character of each element in B, sorted by the index in ascending order. However, if B is an empty subset, print the first digit of x instead. Does it look complicated? Do not worry, as it is just a generalization of the regular Fizz Buzz. For example, if A = [3, 5] and S = [F, B], you will get the normal Fizz…You have a list of student ID’s followed by the course number (separated by a space) that the student is enrolled in. The listing is in no particular order. For example, if student 1 is in CS100 and CS200 while student 2 is in CS105 and MATH210 then the list might look like this:1 CS1002 MATH2102 CS1051 CS200Write a program that reads data in this format from the console. If the ID is −1 then stop inputting data. Use the HashMap class to map from an Integer (the student ID) to an ArrayList of type String that holds each class that the student is enrolled in. The declaration should look like this:HashMap<Integer, ArrayList<String>> students =new HashMap<Integer, ArrayList<String>>();After all data is input, iterate through the map and output the student ID and all classes stored in the vector for that student. The result should be a list of classes organized by student ID.in coral language Write a program that first gets a list of 5 integers from input. Then, get another value from the input, and output all integers less than or equal to that value. Ex: If the input is 50 60 140 200 75 100, the output is: 50 60 75 For coding simplicity, follow every output value by a space, including the last one. Then, output a newline. Such functionality is common on sites like Amazon, where a user can filter results.
- In this task you are asked to construct a table showing the sequence of numbersfrom 0 to a maximum value as specified by the user. Within the table, if the number in the cell is a highlighted (e.g., blue in thescreenshot below) when it is divisible by a number that is also specifiedbytheuser, known as the divisor. For example, the user could input for the maximumavalue of 100 and for the divisor a value of 23; this should result in the cellscontaining the values: 0, 23, 46, 69 and 92; being highlighted.public List<String> getLikes(String user) This will take a String representing a user (like “Mike”) and return a unique List containing all of the users that have liked the user “Mike.” public List<String> getLikedBy(String user) This will take a String representing a user (like “Tony”) and return a unique List containing each user that “Tony” has liked. create a Main to test your work. import java.io.BufferedReader;import java.io.FileReader;import java.io.IOException;import java.util.ArrayList;import java.util.Arrays;import java.util.HashMap;import java.util.HashSet;import java.util.List;import java.util.Map;import java.util.Set; public class FacebookLikeManager { public List<String> facebookMap; private Set<String> likesSets; public FacebookLikeManager() { facebookMap = new ArrayList<>(); likesSets = new HashSet<>(Arrays.asList("Mike","Kristen","Bill","Sara")); } public void buildMap(String filePath) {…*python coding Driver’s License ExamThe local driver’s license office has asked you to create an application that grades the written portion of thedriver’s license exam. The exam has 20 multiple-choice questions. Hereare the correct answers:1. B 6. A 11. B 16. C2. D 7. B 12. C 17. C3. A 8. A 13. D 18. B4. A 9. C 14. A 19. D5. C 10. D 15. D 20. AYour program should store these correct answers in a list. The program should read thestudent’s answers for each of the 20 questions from a text file and store the answers inanother list. (Create your own text file to test the application.) After the student’s answershave been read from the file, the program should display a message indicating whether thestudent passed or failed the exam. (A student must correctly answer 15 of the 20 questionsto pass the exam.) It should then display the total number of correctly answered questions,the total number of incorrectly answered questions, and a list showing the question numbers of the incorrectly…
- in java #6 - program that reads the name data from the files named firstNames.txt and lastNames.txtand produces a list of 1000 random names randomPeople.txtone complete name (firstname lastname) per lineAssume the following method is outside the class of KWArrayList class but has access to the methods of KWArrayList class public static void Unknown(KWArrayList<Integer> list1, KWarrayList<Integer> list2) { if (list1.size() == 0 || list2.size() ==0) return; int loop; if (list1.size() < list2.size()) loop= list1.size(); else loop= list2.size(); for (int i=0; i<loop; i++) list1.set(i,(Integer) list1.get(i) + (Integer) list2.get(i)) }Create an application that reads a sequence of up to 25 names and postal (ZIP) codes for persons. Put the data in an object that can have a first name (string), last name (string), and postal code (integer). Assume that each line of input will have two strings separated by a tab character, followed by an integer value. After the input has been read in, print the list to the screen in the appropriate manner.
- Given main(), complete the SongNode class to include the printSongInfo() method. Then write the Playlist class' printPlaylist() method to print all songs in the playlist. DO NOT print the dummy head node. Ex: If the input is: Stomp! 380 The Brothers Johnson The Dude 337 Quincy Jones You Don't Own Me 151 Lesley Gore -1 the output is: LIST OF SONGS ------------- Title: Stomp! Length: 380 Artist: The Brothers Johnson Title: The Dude Length: 337 Artist: Quincy Jones Title: You Don't Own Me Length: 151 Artist: Lesley Gore class SongNode { // Fields for song information and reference to the next node private String title; private int length; private String artist; private SongNode next; // Constructors for creating SongNode instances public SongNode() { title = ""; length = 0; artist = ""; next = null; } public SongNode(String title, int length, String artist) { this.title = title; this.length = length; this.artist =…In Java: When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. The input begins with an integer indicating the number of integers that follow. Assume that the list will always contain less than 20 integers. Ex: If the input is: 5 30 50 10 70 65 the output is: 20 40 0 60 55 For coding simplicity, follow every output value by a space, even the last one. Your program must define and call a method:public static int getMinimumInt(int[] listInts, int listSize) import java.util.Scanner; public class LabProgram {/* Define your method here */ public static void main(String[] args) {/* Type your code here. */}}A MyString Class and a JUMBLE ProgramWhen you play a JUMBLE, you are given a scrambled word that you mustunscramble. For instance, you may be given iedmx and you would be expected to unscramble it to mixed.Write an application that prompts for a list of words and displays four jumbled versions of each word so that you might choose one for creating your own JUMBLE.For example:How many words?3Enter the words:mixedcalendarthenOutput:Here is a list of possible JUMBLEs:mixed calendar theniedmx lendarca hentdixem alecdarn nethmedix randlace entheximd recandla tenhHint: Create a class called MyString that stores and manipulates strings. The oneargument constructor should accept a String argument. The methods shouldinclude:void printme(); // prints the String.andString MyString permute();// returns a permuted version of the String.// This can be done by exchanging random pairs of letters in the String.// If the length of your string is n, then perform 2n swaps