Declare an ArrayList of doubles that can store 100 receipts. ArrayList( double ) receipts = new ArrayList( double ); ArrayList( double ) receipts = new ArrayList( double, 100 ); ArrayList, double receipts = new ArrayList, double(); ArrayList< double > receipts = new ArrayList< double >(); ArrayList< double > receipts = new ArrayList< double >[ 100 ]; ArrayList< double > receipts = new ArrayList[ 100 ]; ArrayList< double > receipts = new double[ 100 ]; ArrayList[ double ] receipts = new double[ 100 ];
Q: Java question: Please use words to describe exactly how the computer process doSomething(3) public v...
A: Complete Code Should Be like this import java.util.*;class abc { static void doSomething(int n){ ...
Q: Consider the following statements. I) The ARDEN's lemma can be used for Deterministic finite automat...
A: GIVEN:
Q: What are the arguments for and against unique delimiters for compound statements or code blocks? Exa...
A: GIVEN:
Q: Suppose there is a shared link (e.g. Ethernet bus) of 1 Mbps. How much time is needed (in microsecon...
A: Ethernet is basically a LAN technology which strikes a good balance between speed, cost and easy of ...
Q: . Encode the following using RLE : 1111111112222222333333333344411112222444555551111111
A: Given: 1111111112222222333333333344411112222444555551111111 Encode using RLE 1 occurs 9 times 2 oc...
Q: Consider the following code chunk: import randomx = 0while(x < 4):x = random.choice([1, 2, 3])pri...
A: import randomx = 0while(x < 4): x = random.choice([1, 2, 3])print(x) From this x = random.ch...
Q: Delete all properties in the LARGE_PROPERTY table for which the owner number is BU106.
A: DELETE is the command used to delete the record from a table in database
Q: C++ beginners.
A: Given:
Q: A psychiatrist had six adult women patients who suffered blurred ego boundaries. These patients were...
A: Cause used in plain English can either imply Sufficient condition as in heart attack caused death o...
Q: Write and execute a PYTHON program to find the sum N numbers using function.
A: Answer : program : def sum_n_numbers(); #accept input from users val = int(input("Enter N:"); sum ...
Q: c++
A: Here is the C++ program That will print the list after each sort: #include <iostream>using na...
Q: I need help to write a program in C++ that implements Huffman coding and decoding using the followin...
A: Sample Response: //C++ program to implements Huffman coding and decoding//Header files#include<io...
Q: part 1: ...
A: As multiple questions are posted, only first can be solved and kindly repost the questions that are ...
Q: For each of the following pieces of code, state the time complexity in terms of n using asymptotic n...
A: Lets see the solution.
Q: Explain how change in the project requirements can be accommodated? Which software development life ...
A: GIVEN: Explain how change in the project requirements can be accommodated? Which software develop...
Q: (Find the smallest n such that n2 12,000) Use a while loop to find the smallestinteger n such that n...
A: PROGRAM CODE: import java.util.*;public class Main{ public static void main(String[] args) { ...
Q: Create a simple C program for a library system. Here are the specifications of the library system. -...
A: Library system: Requirements We will specialise in the subsequent set of needs whereas coming up wi...
Q: Task 2: Implement the client side requirements (non-graphical user interface) and then provide code ...
A: It is defined as more powerful and more reliable than user devices. They also are constantly mainta...
Q: Question 1In your own words explain, when database system should not be used instead of filing syste...
A: When Database should be used instead of filing system: To avoid redundancy: Redundancy removed by ...
Q: Suppose a program builds and manipulates a linked list: What two special nodes would the program typ...
A: A linked List is a linear data structure where the elements are not stored in a contiguous location ...
Q: Write minimum test cases for statement coverage.
A: I1 = { < A,B,C > : A>B, A>C } I2 = { < A,B,C > : B>A , B>C } I3 = { < A,B...
Q: StayWell has increased the monthly rent of each large property by $150. Update the monthly rents in ...
A: Actually, database is a used to stores the data.
Q: Design an age calculator in Python GUI. only ask the user to enter DOB, the program should automatic...
A: Required: Design an age calculator in Python GUI. ask the user to enter DOB, the program should auto...
Q: What is a six sigma report?
A: Six Sigma is approach ,which creates improvement in business processes by advancing each sector of a...
Q: 1. Write an interactive file handling shell program. Let it offer the user the choice of copying, re...
A: Actually, program is a executable software that runs on a computer.
Q: 3. Write a note on the directory structure in the UNIX OS and its importance. –
A: Unix directory structure In computer science and particularly in Unix -like operating system the ...
Q: i want the anwer
A:
Q: Determine which of the following odd parity codes are in error:(a) 11110110 (b) 00110001 (c) 0101010...
A: Given: Determine which of the following odd parity codes are in error:(a) 11110110 (b) 00110001 (c) ...
Q: Create a Control Flow Graph for the given code.
A: Answer :-
Q: Create a java class person with following data members. Age: SHOULD BE VISIBLE TO ALL CLASSES. Nam...
A: The required code is given below:
Q: Project Description: We will program the gesture selection component of relational agent. The set of...
A: with open('a.txt') as file: # a.txt is in same directory as python file for line in file: ...
Q: 2. Write a complete Java program that provides two methods named sort(list) and filter(list). a. sor...
A: import java.util.ArrayList;import java.util.List;import java.util.Scanner;import java.util.stream.Co...
Q: Consider the following relations database schema. The primary key is underlined, and all attributes ...
A: Given: Find all the branch names with customers who have accounts of balance less than $2000 and the...
Q: The SQL like operator is case sensitive (in most systems), but the lower() function on strings can b...
A: 1)SELECT * FROM tablename WHERE CustomerName LIKE 'sci%' Result --> science 2) SELECT * FROM t...
Q: Write a Java program for all the concepts of Mutual Exclusion by using the following options.▪ Synch...
A: Concept of Mutual Exclusion: Communicate thread using sharing access to field and field will referen...
Q: Add to the LARGE_PROPERTY table a new character column named OCCUPIED that is one character in lengt...
A: Since the question did not specify the which DBMS tool (Oracle or SQL Server or MySQL has to be used...
Q: When is the output of an XNOR gate HIGH?
A: The truth table of XNOR gate is: B A Q 0 0 1 0 1 0 1 0 0 1 1 1 Where Q is the output.
Q: a program to calculate Item's sale price 1) Ask user to enter the name of item e.g t-shirt 2) Ask us...
A: code import java.util.Scanner; class Main{ public static void main(String args[]){ double dis,am...
Q: Q3: The following Boolean function Y=RA,B,C,D,E)= Em(0,1,2,5,7,8,11,12,13,14,16,20,21,22,23,25,27,28...
A: Solution:
Q: Q3) Using switch statement, write program c++ that displays the following menu for the food items av...
A: Program Approach:- Use one header file Declare 3 variable of type integer Use switch case for the m...
Q: Wite at least 5 different test cases using Equivalent partition testing technique to validate simple...
A: Equivalence Partitioning: Equivalence partitioning is additionally called “Equivalence category Part...
Q: Write a short note on UNIX Operating system? Identify and explain 6 utilities to create and manage f...
A: UNIX is an operating system which was first developed in the 1960s, and has been under constant deve...
Q: please use C and show how to create CSV file
A:
Q: Write minimum test cases for branch coverage.
A: Ans)
Q: 1. Use if - else - elif Read 3 numbers from the user and check the following. () If the 1st number i...
A: Given:
Q: A feature that distinguishes the J-K flip-flop from the D flip-flop is the(a) toggle condition (b) p...
A: GIVEN: A feature that distinguishes the J-K flip-flop from the D flip-flop is the(a) toggle conditio...
Q: I need help with an example of a traveling salesman problem. I have a 2D array. Where the vertices a...
A: Given: I need help with an example of a traveling salesman problem. I have a 2D array. Where the ver...
Q: (Python) Username and password creation exercies print("------------------------------------------...
A: Python: userName = input("Hello! Welcome to FaceSnap! \n\nUsername: ") #Ask's the User for Username ...
Q: Which of the following IEEE standards represent Ethernet? Select one: O a. 802.11 O b. 802.16 O c. 8...
A: As per our guidelines we can answer only one question. please post other question as another questio...
Q: Network Addresses Using the IP address and subnetmask shown write out the network address 188. 10.0....
A: In IPv4 representation We can determine Network ID of any IP address Using Subnet Mask, How? To do s...
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- classHighArrayApp { public static void main(String[] args) { intmaxSize=100;// array size HighArrayarr;// reference to array arr=newHighArray(maxSize);// create the array arr.insert(77);// insert 10 items arr.insert(99); arr.insert(44); arr.insert(55); arr.insert(22); arr.insert(88); arr.insert(11); arr.insert(00); arr.insert(66); arr.insert(33); arr.display();// display items intsearchKey=35;// search for item if(arr.find(searchKey)) System.out.println("Found " + searchKey); else System.out.println("Can’t find " + searchKey); arr.delete(00);// delete 3 items arr.delete(55); arr.delete(99); arr.display();// display items again }// end main() }// end class HighArrayApp // highArray.java // demonstrates array class with high-level interface // to run this program: C>java HighArrayApp //////////////////////////////////////////////////////////////// class HighArray { private long[] a; // ref to array a private int nElems; // number of data items…void showArray ( int a[ ], int size ); // shows the array in the format "int a [ ] = { 3, 7, 4, ... ,5, 6, 3} void showReverse ( int a[ ], int size ); // shows the array in reverse "int a [ ] = { 3, 6, 5, ... , 4, 7, 3 } " int lowest ( int a[ ], int size ); // finds and returns the lowest value in the array (should be 3) int highest ( int a[ ], int size ); // finds and returns the highest value in the array (should be 7) int sumArray ( int a[ ], int size ); // calculates and returns the sum of all values in the array float averageVal ( int a[ ], int size ); // calculates and returns the average of all values in the array int count5 ( int a[ ], int size ); // returns how many times the number 5 appears in the array int firstMinusLast ( int a[ ], int size ); // returns the difference b/w the First and Last Array Element void showBeforeIndex( int a [ ], int index); // shows all array values before a specific index void done…void shiftLeft(int array[], int size, int& numUsed, int index) { index = array[0]; for(int i = 1; i <= size - 1; i++) { array[i - 1] = array[i]; } array[size-1] = index; } void shiftRight(int array[], int size, int& numUsed, int index) { index = array[numUsed-1]; for(int i = numUsed - 2; i >= 0; i--) { array[i + 1] = array[i]; } array[0] = index; } how do i fix my shift right function.
- // TODOd: define a "board" member variable (private) as a 2D char array of BOARD_SIZE x BOARD_SIZE // initialize it with BLANKs var board =Array( BOARD_SIZE, { Array( BOARD_SIZE, { BLANK } )Path: p QUESTION 17 Display the value of the object pointed by cgPtr of type integer. T E E TTT Arial 3 (12pt) Path: p QUESTION 18 Declare and initialize array priceList with150.00, 235.00, 45.00, 23.75, 78.50. TTT Arial 3 (12pt) v T-E E- Path p Click Saue and Suhmitpublic int[] selectionSort(int[] array) {for (int i = 0; i < array.length - 1; i++) {int min = array[i];int minIndex = i;for (int j = i + 1; j < array.length; j++) {if (min > array[j]) {min = array[j];minIndex = j;}}if (minIndex == i) {array[minIndex] = array[i];array[i] = min;}}return array;}
- Define the difference between array and arraylist.Code Big Oh Notation my array = array(ï,[1,2,3,4,5|) for i in my_array print(i) 1. Code Big Oh Notation _print("Step 2") print(my_array[3]) 2. Code Big Oh Notation 3. print("Step 3") my_array.append(6) print(my array)Computer Science Part 2: Client Program with ArrayList Create a second client program. This program will contain an ArrayList of StudentGrades objects. The program will perform the following tasks: Create an instance of an ArrayList that will store three StudentGrades objects. Each element in the ArrayList represents student grades for a test (assessment). This means that each StudentGrades object stored by the ArrayList element represents the grades achieved by students for a single test. Prompt the user for the number of students in the class. The prompt text is: Enter the number of students in the course: [Keyboard Input] Add three new StudentGrades objects to the ArrayList. The StudentGrades objects should be populated with random values from 0 to 100. Use the enhanced for loop to print each of the StudentGrades objects to the console. Print a line containing the following text: “LAST ELEMENT BEFORE REMOVE:”. Print the value of the final element in the ArrayList under the heading.…
- $marks = array( "Sara" => array( "Programming" => 95, "DataBase" => 85, "Web" => 74, ), "Diana" => array( "Programming" => 78, "DataBase" => 98, "Web" => 66, ), "Amy" => array( "Programming" => 88, "DataBase" => 76, "Web" => 99, ), ); 1 : sort the array by the name of student from A-Z; 2 : search if Ram is exist :if exiset print the value; else : student does not exist 3 : calculate the avg of each student and print it as :the avg for Sara is : 84.66Array has both advantages and disadvantages.Main difference between an array and an ArrayList is that an ArrayList can store more data types an ArrayList can store more elements an ArrayList executes faster for retrieval and insertion an ArrayList takes care of the memory management automatically an ArrayList uses positions and an array uses indices