Write a java program called ShoppingList.java, which prompts the user to enter a set of grocery items, and stores them in a list using the Java ArrayList Collection class. It then displays the list and asks the user to type in each item when they put it in their shopping cart and remove it from the list. It should work as follows:
Q: In order for wireless systems to be developed to enable the Internet of Things, explain why public-k...
A: Introduction: The Internet of Things (IoT) is a distributed system made up of interconnected smart i...
Q: Create a C++ program that will check if the string or group of text is a palindrome or not. For exa...
A: PROGRAM EXPLANATION Include the header file. Define the main function. Take a string as input from ...
Q: What are the various purposes of the following categories of application software? Enterprise resou...
A: Introduction: In a nutshell, application software, or app, is software that performs specified funct...
Q: ks of plaintext (P1 to PN) are being encrypted in CFB mode into ciphertext (C1 to CN). Assume that t...
A: Lets see the solution.
Q: This question is on heapsort. (a) We aim to construct a max heap based on an array A. When we call h...
A: maxHeapify(array, size, k) set k as largest leftChild = 2k + 1 rightChild = 2k + 2 if lef...
Q: Write a program that computes the GCD of two positive numbers a and b. The program should handle non...
A: The python code has the following steps: First two numbers a and b are inputted and then both are c...
Q: Please describe the relationship between bias, variance, underfitting, and overfitting. Support your...
A: The Answer is given below step.
Q: Write the Java statement for the following. Declare an array of integer named numbers allocating...
A: Write the Java statement for the following. Declare an array of integer named numbers allocating ...
Q: Describe the security dimensions and security levels that must be taken into consideration while dev...
A: Introduction: Software is a collection of instructions, data, or programmes that enable computers to...
Q: Write the Java statement for the following. Declare an array of String named jleague with values “C...
A: Your java program is given below as you required with an output.
Q: Lets the user enter courses and prints them out correctly at the end Catches there being six courses...
A: Program is very easy to construct here is the approach First create the empty list and create the v...
Q: What do you understand by the deadlock? What do you understand by deadlock detection and recovery?
A: Deadlock:- A Deadlock is what is happening where a bunch of cycles is in hanging tight for state or ...
Q: Please help with C++, CANNOT use array or vector CAN ONLY USE BELOW #include #include #include ...
A: #include <iostream>#include <fstream>#include <string> #include <cstdlib>#in...
Q: Describe the differences between a request for proposal (RFP) and a request for quote (RFQ) (RFQ)
A: Introduction: Vendors or suppliers must provide actionable information in response to the official p...
Q: Define the MIDI protocol.
A: Introduction: MIDI is an abbreviation for Musical instrument digital interface. It is essentially a ...
Q: What is the significance of activity sequencing for projects and why is it important? Compare and co...
A: Activity sequencing refers to a dual process of dependencies identification among the scheduled acti...
Q: umber of cores in a new generation of processors doubles. How much additional off-chip memory bandwi...
A: Assume that every 18 months, the number of cores in a new generation of processors doubles. How much...
Q: Define the term system. Give an example of an IT system and list its boundary, environment, inputs, ...
A:
Q: Which of the following describes the * ?image below Pe
A: Task flow and User flow: User flow and task flow find in the interaction process of UX design proce...
Q: ysis and de
A: given - Establish a clear understanding of systems analysis and design, as well as the function of a...
Q: Explain why the intangibility of software systems creates unique challenges for software project man...
A:
Q: pplicatio
A: given - Create a binary interface for your application.
Q: The new Chief Executive Officer (CEO) of a large company has announced a partnership with a vendor t...
A: The process of establishing an index of approved software applications or executable files that are ...
Q: Code a C program that accepts a real number and print is it odd or even
A: #include <stdio.h> int main() { int num; printf("Enter a number:"); scanf("%d",&n...
Q: The on-board train protection system may use a periodic procedure to gather data from a trackside tr...
A: In this problem, we will discuss about on board train protection system and how it is scheduled to c...
Q: A palindrome is a word or a phrase that is the same when read both forward and backward. Examples ar...
A: Python program to check whether the given word is palindrome or not In a function, first, compare th...
Q: Describe the many types of computing applications and the characteristics of each.
A: An application, often known as an application program or application software, is a computer softwar...
Q: Code a C program that will prompt the user to input x-y coordinate of a point in a Cartesian plane. ...
A: #include <stdio.h> void main(){ int x, y; printf("Enter the values for X and Y\n"); ...
Q: Q2. Write a C program to find the result of the following series by using power function. The progra...
A: You haven't done anything wrong. Your answers match the correct answers of the given sum. The answer...
Q: prints "Updated slot number X" where X is the slot number user entered. I can't this part to work. ...
A: Please try the given the code in following step to update the slot number and name as well. Removed ...
Q: Activities: I. Write the proper method declaration/ method call for the following (Java Programming)...
A: Answers: 1. public static void CS(){ // statement } 2. CS(); 3. public static int IT(){//statement r...
Q: A NOT gate allows only one of its two input values to pass.
A: Let's understand NOT gate : A not gate is single input single output gate which means it takes one v...
Q: Given an array of size n and an integer k. Find any subset of the array whose elements sum to k. Wri...
A: Program Explanation- Our role is to A list and an integer is sent to Subset. Make a new dictionary ...
Q: Create a JavaScript Arrow function that meets the following requirements: _missingSpace(string) • ...
A: Introduction Create a JavaScript Arrow function that meets the following requirements: _missingSpa...
Q: 4. What are the different binary codes? Briefly describe each.
A: Answer the above questions are as follows:
Q: please code in python Write a function that receives a string as an input and returns the most freq...
A: When it is required to find the most frequent character in a string, an empty dictionary is created,...
Q: To utilise computers at college, do you need to develop a set of remote access policies?
A: Introduction: A document that discusses and specifies permitted ways of remotely connecting to the i...
Q: How would you address the potential for misleading sharing?
A: Introduction: In frameworks with suitable, lucid stores at the size of the smallest asset block cont...
Q: This is a Decision Tree Classification Model Using Entropy Information Gain. What is the depth of th...
A: 4
Q: nge each of instance variables (mutator); • A method toString that converts a stu
A: The program is written in java.
Q: c) Explain steps of fingerprint recognition
A: Fingerprint recognition refers to the automated method of identifying or confirming the identity of ...
Q: How can data visualisation make use of the following five graphical data features in order to emphas...
A: Data visualization is a graphic representation of organized or unstructured data that displays infor...
Q: What is the best way to create a String constant that has exactly 5 exclamation marks? Python is a p...
A: Given To know about the best way to create a String constant that has exactly 5 exclamation marks.
Q: can you make ER Diagram with Crow`s foot method about library system. The rule: 1. A member can bor...
A: An entity may be a representation of a category of object. It are often an individual , place, thing...
Q: lity to all compute
A: The single greatest hazard to all computer systems and networks is malware and social engineering at...
Q: Twisted pair cable (Ethernet) has how many pairs of wires? What is the name of the port on a compute...
A: Actually, computer is a electronic device which takes input and gives output.
Q: Read in 20 numbers, each of which is between 20 and 50, inclusive. As each number is read, validate ...
A: #include<iostream>using namespace std;int main(){ int arr[20], tot, i; cout<<"Ente...
Q: Write a description of the eight most important concepts in computer architecture.
A: EXPLANATION AND ANSWER: The Eight Great Ideas in Computer Architecture are as follows: Design for Mo...
Q: Your organization aims to transition away from the use of desktop apps in favor of obtaining the sam...
A: The hazards that may develop are as follows: Security Management of Errors Scalability Connectivity ...
Q: What is the minimum number of characters in an ICD-11 code?
A: What is the minimum number of characters in an ICD-11 code
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images
- Python write a program in python that plays the game of Hangman. When the user plays Hangman, the computer first selects a secret word at random from a list built into the program. The program then prints out a row of dashes asks the user to guess a letter. If the user guesses a letter that is in the word, the word is redisplayed with all instances of that letter shown in the correct positions, along with any letters correctly guessed on previous turns. If the letter does not appear in the word, the user is charged with an incorrect guess. The user keeps guessing letters until either: * the user has correctly guessed all the letters in the word or * the user has made eight incorrect guesses. one for each letter in the secret word and Hangman comes from the fact that incorrect guesses are recorded by drawing an evolving picture of the user being hanged at a scaffold. For each incorrect guess, a new part of a stick-figure body the head, then the body, then each arm, each leg, and finally…Computer Science JAVA #7 - program that reads the file named randomPeople.txt sort all the names alphabetically by last name write all the unique names to a file named namesList.txt , there should be no repeatsgetListRowIndices Method public static java.util.ArrayList<java.lang.Integer> getListRowIndices(int[][] array, int rowLength) This method returns an ArrayList with the indices of rows of the two-dimensional having a length that corresponds to rowLength. You may only use one auxiliary method. The method should create an ArrayList that is passed to the auxiliary in order to place the indices (if any). If no indices are found, an empty (size of 0) ArrayList will be returned. You can assume the array parameter will not be null and every row of the two-dimensional array has an array with a size of at least 0. Your implementation must be recursive and you may not use any loop construct. Do not use ++ or -- in any recursive call argument. It may lead to an infinite recursion. For example, use index + 1, instead of index++. Parameters: array - rowLength - Returns: ArrayList<Integer>
- in java language Write a program in which you create an object of type ArrayList named BZ and then add 3 elements in this object and then copy the elements of the object in another object QZ and then cancel the elements of the object BZ and then write the necessary print statements to show it?JAVA: Write an application that accepts up to 20 Strings, or fewer if the user enters the terminating value ZZZ. Store each String in one of two lists: one list for short Strings that are 10 characters or fewer, and another list for long Strings that are 11 characters or more. After data entry is complete, prompt the user to enter which type of String list to display, either S for short or L for long and then output the correct list. For this exercise, you can assume that if the user does not request the list of short strings, the user wants the list of long strings. If a requested list has no Strings, output The list is empty. Prompt the user continuously until a sentinel value, ZZZ, is entered to quit the program. An example of the program is shown below: Enter a string or ZZZ to quit >> Green Enter a string or ZZZ to quit >> Green eggs Enter a string or ZZZ to quit >> Green eggs and ham Enter a string or ZZZ to quit >> I do not like green eggs and ham Enter…Write a hangman game that randomly generates a word and prompts the user to guess one letter at a time, as shown in the sample run. Eachletter in the word is displayed as an asterisk. When the user makes a correct guess, the actual letter is then displayed. When the user finishes a word, display the number of misses and ask the user whether to continue playing. Create a list to store the words, as follows:# Use any words you wishwords = ["write", "that", "program", ...]
- For JAVA Write a Java program using ArrayLists that repeatedly asks user to enter numbers. Your program should print the entered numbers and average of these numbers. If the user enters ”u”, your program should delete the last entered number from the ArrayList. If the user enteres ”r”, the program should remove all elements from the list. If the user enters ”q”, the program should terminate. Please see the example below. Hint: You can convert Strings like ”1” to integers with the following code: String str = "1"; int one = Integer.parseInt(str); OUTPUT MUST BE: Enter a number 1 Elements in arraylists:1 Average is:1.0 2 Elements in arraylists:1 2 Average is:1.5 3 Elements in arraylists:1 2 3 Average is:2.0 u Elements in arraylists:1 2 Average is:1.5 u Elements in arraylists:1 Average is:1.0 4 Elements in arraylists:1 2 Average is:2.5 5 Elements in arraylists:1 4 5 Average is:3.33333335 r ArrayList is empty 1 Elements in arraylists:1 Average is:1.0 q ByeLab Goal : This lab was designed to teach you more about sorting data with the built-in java sorts. Lab Description : Take a list of words and output the list in ascending order. Use Arrays.sort().Sample Data : abc ABC 12321 fred alexandera zebra friendly acrobatics 435 TONER PRinTeRb x 4 r s y $123 ABC abc 034 dog cat sally sue bob 2a2Sample Output : word 0 :: 12321word 1 :: ABCword 2 :: abcword 3 :: alexanderword 4 :: fred word 0 :: 435word 1 :: PRinTeRword 2 :: TONERword 3 :: aword 4 :: acrobaticsword 5 :: friendlyword 6 :: zebra word 0 :: $word 1 :: 4word 2 :: bword 3 :: rword 4 :: sword 5 :: xword 6 :: y word 0 :: 034word 1 :: 123word 2 :: 2a2word 3 :: ABCword 4 :: abcword 5 :: bobword 6 :: catword 7 :: dogword 8 :: sallyword 9 :: sue I need a code class and a runner classIn this programming challenge, you will create a simple trivia game for two players. The program will work like this: • Read the contents of the trivia.txt file into an ArrayList . • Starting with player 1, each player gets a turn at answering one trivia question. (For instance, if there are 10 questions, 5 for each player.) When a question is displayed, four possible answers are also displayed. Only one of the answers is correct, and if the player selects the correct answer, he or she earns a point. • After answers have been selected for all of the questions, the program displays the number of points earned by each player and declares the player with the highest number of points the winner, same as the sample execution. You are to design a Question class to hold the data for a trivia question. The Question class should have String fields for the following data: • A trivia question • Possible answer 1 • Possible answer 2 • Possible answer 3 • Possible answer 4 • The number of the…
- Computer Science Write a program in the Java language that includes: 1. A class for books, taking into account the encapsulation and getter, setter. 2. Entering books by the user using Scanner 3. LinkedList class for: (Adding a new book - Inserting a book- Searching for a book using the ISBN Number - Viewing all books,delete book). 4. Serial number increases automatically with each book that is entered. 5. Printing the names of books is as follows: Serial - ISBN - Name - PubYear - Price - Notes. 6-Design a main menu that includes: • Add Book • Insert Book • Delete Book • Search . Display . ExitIn the C programming language Suppose you are given an array of integers. You want to insert a number x to the array and rearrange so that all the elements are less than or equal to x are before x, and the elements after x are greater than x. For example, suppose the list is {3, 2, 7, 0 1, 5}and x is 4, since3, 2, 0, and 1,are less than or equal to 4,7and 5 are greater than 4, the new array is {3, 2, 0, 1, 4, 7, 5}.The new array has the length of n+1 where n is the length of the input array. Example input/output #1: Enter the length of the array: 10 Enter the elements of the array: 3 5 14 03 92 8 11 Enter the number for insertion: 3 Output: 3 1 0 3 2 3 5 4 9 8 11 Example input/output #2: Enter the length of the array: 8 Enter the elements of the array: 5013 4 1 7 3 5 Enter the number for insertion: 6 Output: 5 0 4 1 356 13 7 1) Name your program arrays.c 2) Include the rearrange( ) function to rearrange the array: void rearrange(int *a, int n, int insert, int *b); a…Create a Java program that will store 10 student objects in an ArrayList, ArrayList<Student>. A student object consists of the following fields: int rollno String name String address