Q2. Write a java program to perform the following task: a) Create a collection ArrayList for Customer class b) Add 5 elements into ArrayList c) Display the element at index 4 d) Display all the elements in the ArrayList using for-each loop e) Remove the values at index 2 f) Add “cst2” in location 2. g) Check if st2 existing inside the collection.
Q: Question: The store owner sends a binary bitstream to the store manager after a request from the…
A: Convert the given bit stream to Base64 The owner sends this bitstream to the manager: 00100 10001…
Q: Q.3.4 Using a flow diagram, demonstrate how input validation of usernames/passwords should be…
A: Validation of username/password <!doctype html> <html> <body> <form>…
Q: What is system software?
A:
Q: 29. Write a method that will receive 3 integers and return the smallest integer. public static int…
A: Conditions in java: Conditions, which are also referred to as condition queues or condition…
Q: Are interrupts desired or undesired or both? illustrate your answer with examples?
A: Below I have provided the solution to the given question
Q: Consider the following disk characteristics: Average seek time = 8 msec Average rotational delay = 3…
A: Given data of the problem is: Average seek time = 8 msec Average rotational delay = 3 msec Maximum…
Q: In the following sections, the points of knowledge learned in detail form the context of knowledge,…
A: Concurrency control is a feature of a database management system (DBMS) that allows several users to…
Q: Which tables are lookup tables? Category Category, AddressType, PhoneType PhoneType, AddressType…
A: What is a Lookup table?: => An array or matrix of data that includes items that are…
Q: What is software model?
A:
Q: 2-way cache Block size: 2
A: The answer is
Q: Explain the difference between deterministic finite automaton and pushdown automaton
A: A deterministic finite automaton (or DFA) is a finite state machine that accepts or rejects strings…
Q: Please help with both.
A: Hellon studnet
Q: 5. Write a script that will print the following multiplicat 1 24 369 4 8 12 16 5 10 15 20 25
A: MATLAB: Here we we will use logic that for each i=1 to 5, print i, i*2, i*3,.... till i*i.…
Q: 3. Two 7-digit integers (leading zeros allowed) are considered to be equivalent if one can be…
A:
Q: . Given the XML document NKU_Programs function that prints the contents of ne Program elements in a…
A: From our question, it is understood is that our task is to convert the XML file you have given here…
Q: NIST defines the term cryptoperiod as the time span during which a specific key is authorized for…
A: According to the information given:- We have to define the crypto period as the time span during…
Q: Are interrupts desired or undesired or both? illustrate your answer with examples?
A: The above question that is interrupt is desired or undesired or both is answered below step with…
Q: Which of the following are present in C but not in Assembly? A. A distinction between 32-bit numbers…
A: Q):: Which of the following are present in C but not in Assembly? A):: D.)Option D A…
Q: NOTE: For this question, create all the assets for your solution in a package named quest Name your…
A: I attached your answer below.
Q: What is software Quality?
A: Question: What is Software Quality? Answer: It is defined as the ability of the software to…
Q: Primary key identifies a unique tuple of a relation, true or false?
A: Primary key is a specific choice of a minimal set of attributes that uniquely specify a tuple in a…
Q: In order to pursue the research, which of the following is priorly required? a. Formulating a…
A: Introduction Research methodology: A research methodology is a technique to illustrate how an…
Q: In Kerberos, when Bob receives a ticket from Alice, how does he know it is genuine?
A:
Q: Write an assembly program (Data and Code) that read and swap two numbers, and output them after…
A: Answer: We have done code in Assembly Language and also attached the codes well as output
Q: Q6: Assume that EBX and ECX have the following values: EBX: FF FF FF 75 ECX: 00 00 01 A2 Find the…
A: Answer: Initial Value of EBX=FF FF FF 75 Initial value of EBX=00 00 01 A2
Q: What is the difference between an SSL connection and an SSL session?
A:
Q: Consider this scenario: A nurse in the hospital has been assigned to provide daily care to her…
A: Please find the answer below :
Q: Suppose a python program mycode.py contains the following main guard. if __name__ == "__main__":…
A: Introduction : __main__: The is the main python program part where the excutable code is need to…
Q: You are hired to write a program for Abang Mat, who is a satay seller. He sells TWO (2) types of…
A: Use of C Programming: The C programming language is a machine-independent programming…
Q: Create a small script to use raw_input() built-in function to take a string input from the user,…
A: raw_input function: The raw_input method in Python is used to get user-provided data. To instruct…
Q: DISCUSS REQUIREMENTS ELICITATION ANALYSIS.
A:
Q: Unified Modeling Language (UML) Instructions: Create a UML diagram for a Dog class. You can get some…
A: Uml benefits:- 1. The right decisions are made before you have given a poorly written code. 2.…
Q: HTTPS is increasing in popularity and is rapidly replacing HTTP as a security protocol for web…
A: HTTPS is increasing in popularity and is rapidly replacing HTTP as a security protocol for web…
Q: Write a SQL statement to create the following tow tables: Students table STD_ID STD_NAME COURSE_NO…
A: Solution: Given,
Q: java language Create a new main file Create an array of size 3. The array must be of class mammal.…
A: Answer:
Q: Task 1 Count the number of vowels in a phrase using recursion only. You can think of this problem as…
A: import java.util.Scanner; public class CountVowels { public static void main(String[]…
Q: (a) Read data from one array called array and sort elements in ascending order. (b) Sum up two…
A: Here is the java code of above problem. See below steps for code.
Q: Question 3 Students are required to create 5-character long passwords to access the library. The…
A: Q:: 3)
Q: Java programming 1. a) Write a Java code which gives the value of (1+(1/n))^n for n= 2,4,...,2^14.…
A: Program a public class ProgramA { public static void main(String args[]) { double value = 0;…
Q: Bad things may happen in C. Consider the following code: int x [2] = { 12, -1}; long *y = (long *)…
A: Answer:
Q: plot of the function r = 3 cos² (+0 for 0≤ 0 ≤ 2π
A: Solution: Given,
Q: Question 1: Mark T or F in front of the following statements. 1. A compound statement is a single…
A: A compound statement : A compound as the name suggest is the type of statement that consist of more…
Q: Q3: Lecture Hall Dan holds his CSC108 lectures in a rectangular N X M lecture hall. In other words,…
A: Take N and M as input and create a N*M lecture hall according to the given seats. Take no of…
Q: Definition, purpose, and importance of SDG11.
A: The question has been answered in step2
Q: Question 1 Write a c program that allows to calculate z = Ix-yl with x, y, z declared as integer and…
A: Question 1 : In question 1, we have to declare three variables named as x, y, and z and find the…
Q: python help Implement function four_letter() that takes as input a list of words (i.e., strings)…
A: Python:- Python is a popular programming language for computers that are used to create software and…
Q: • Define a two dimensional list with NxN elements. This list should be filled with random numbers…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: The 1988 version of X.509 lists properties that RSA keys must satisfy to be secure. given current…
A: Answer: We need to write the what are the condition for the better security how much key to secure…
Q: can you also not use [n] like c[1],c[2].. as it is not taught to me make it as basic as possible
A: As per the given question, we should not use arrays to solve the given problem. That's why I am…
Q: Which of the following scenarios reflects the durability property? 1. A fairly large update…
A: A database management system (or DBMS). It is essentially just a computer-based data storage system.…
Q2. Write a java program to perform the following task:
- a) Create a collection ArrayList<String> for Customer class
- b) Add 5 elements into ArrayList
- c) Display the element at index 4
- d) Display all the elements in the ArrayList using for-each loop
- e) Remove the values at index 2
- f) Add “cst2” in location 2.
- g) Check if st2 existing inside the collection.
Step by step
Solved in 7 steps with 10 images
- 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.…1) What is one main disadvantage of an ArrayList? 2) Write a Java statement to create an ArrayList called list to hold 25 integers. 3) What is the type of the ArrayList defined in question number 2? 4) Write a for loop to initialize the objects in the ArrayList created in question number 2 above to -1.Arrays: create an array of a given type and populate its values. Use of for loop to traverse through an array to do the following : to print the elements one by one, to search the array for a given value. ArrayList: create an ArrayList containing elements of a given type . Use some of the common ArrayList methods to manipulate contents of the ArrayList. Write methods that will take an ArrayList as its parameter/argument ; and/or return an ArrayList reference variable as its return type. Searching for an object in an Array: Loop through the ArrayList to extract each object and to check if this object’s attribute has a given value. Explain how and why interfaces are used in Java Collection Framework. Explain the major differences between a Stack and a Queue. Be able to use stack and queue methods. What is meant by O(N) notation? Express the complexity of a given code using the O(N) notation.
- 1. An array is a container that holds a group of values of a 2. Each item in an array is called an 3. Each element is accessed by a numerical 4. The index to the first element of an array is 0 and the index to the last element of the array is the length of the 5. Given the following array declaration, determine which of the three statements below it are true. int [] autoMobile = new int [13]; i. autoMobile[0] is the reference to the first element in the array. ii. autoMobile[13] is the reference to the last element in the array. ii. There are 13 integers in the autoMobile array. 6. In java new is a which is used to allocate memory 7. Declare a one-dimensional array named score of type int that can hold9 values. 8. Declare and initialize a one-dimensional byte array named values of size 10 so that all entries contain 1. 9. Declare and initialize a one-dimensional array to store name of any 3 students. 10. Declare a two-dimensional array named mark of type double that can hold 5x3…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 SuhmitFor any element in keysList with a value greater than 50, print the corresponding value in itemsList, followed by a comma (no spaces). Ex: If the input is: 32 105 101 35 10 20 30 40 the output is: 20,30, 1 #include 2 3 int main(void) { const int SIZE_LIST = 4; int keysList[SIZE_LIST]; int itemsList[SIZE_LIST]; int i; 4 6 7 8 scanf("%d", &keysList[0]); scanf ("%d", &keysList[1]); scanf("%d", &keysList[2]); scanf("%d", &keysList[3]); 10 11 12 13 scanf ("%d", &itemsList[0]); scanf ("%d", &itemsList[1]); scanf("%d", &itemsList[2]); scanf ("%d", &itemsList[3]); 14 15 16 17 18 19 /* Your code goes here */ 20 21 printf("\n"); 22 23 return 0; 24 }
- X42: frontPiece Given an int array of any length, return a new array of its first 2 elements. If the array is smaller than length 2, use whatever elements are present. Examples: frontPiece ({1, 2, 3}) -> {1, 2} frontPiece ({1, 2}) -> {1, 2} Your Answer: Feedback Your feedback will appear here when you check 1 public int[] frontPiece(int[] nums) 2 { your answer. 3 4 }Write the statement that declares and instantiates an array of type double using the identifier temperatures that will hold 30 values. Edit View Insert Format Tools Table 12pt v Paragraph v :Recipe Program - Java ONLYI am looking to create a program that is a recipe holder. It needs to include at a minimum: At least 1 loop An Array or ArrayList At least 3 Java classes Use of methods The program would allow the user to (as part of a menu selection): Add a recipe Include ingredient list Instructions List all recipes that are in the program (array) Display a single recipe Search Recipes (option to view recipe selected) For example, searching for peanut butter cookie would bring up the recipe or multiple if the same name. The user could then select one of them to view the recipe. Search Recipes with a single ingredient (option to view recipe selected) For example: search for coconut and it would bring up coconut cream pie and German chocolate cake. The user could then select one of them to view the recipe. Close application Also need the program in a UML diagram.
- javascript Define a function, myIncludes, that accepts two parameters: an array and a searchValue. myIncludes should return true if the searchValue is an element in the array. Otherwise, myIncludes should return false. example myIncludes([10, 20, 30], 20); // => true myIncludes(['apples', 'bananas', 'citrus'], 'pears'); // => false3. A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements. PROCEDURE isIncreasing(numberList) Tue 61 Line 1: Line 2: { Line 3: count 2 Line 4: REPEAT UNTIL(count > LENGTH(numberList)) Line 5: } IF(numberList[count] =. a. b. Lines 10 and 11 should be interchanged. d. In line 3, 2 should be changed to 1. 3.8. Grade Book A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to a student, based on the average of his or her four test scores: Test Score Letter Grade 90–100 A 80-89 B 70-79 C 60-69 D 0-59 Write a class that uses a String array or an ArrayList object to hold the five students' names, an array of five characters to hold the five students' letter grades, and five arrays of four doubles each to hold each student's set of test scores. The class should have methods that return a specific student's name, the average test score, and a letter grade based on the average. Demonstrate the class in a program that allows the user to enter each student's name and his or her four test scores. It should then display each student's average test score and letter grade. Input Validation: Do not accept test scores less than zero or greater than 100.