JAVA
Q: Bruno gives his son P100 on one day, P50 on the second day, P25 on third day and so on. What will be...
A:
Q: what is the concept of nondeterministic finite automata
A: A finite automata is a self propelling machine which follows a pre-defined sequence of operations. I...
Q: Consider the following Binary Tree: 10 5 12 20 15 25 What is the height of the node with the value 1...
A: Part(a) The number of edges from the node to the deepest leaf determines a node's height. To determ...
Q: Enter user name to view: msmouse 1) username_fullname.py For lab, adapt the starter file to create a...
A: Here is the approach : Create functions for every work like view user , add user , edit user , dele...
Q: DMA and cache memory are contrasted.
A: Introduction: DMA is an abbreviation for Direct Memory Access. It is a technology in which I/O devic...
Q: Explain insulin pump control systems with neat diagrams of hardware and activity model.
A: Explanation: In medical research, an insulin pump system is necessary to control the body's insulin...
Q: What exactly is a system model? What factors should be considered when constructing basic models?
A: Introduction: System model : A system model comprises a description of each process and how they int...
Q: write a for loop equivalent to the stated while loop int count =23; while (count<100) { system.o...
A: Lets see the solution in the next steps
Q: Explain what SRAM is and how it is often used.
A: INTRODUCTION: RANDOM ACCESS MEMORY: Random Access Memory (RAM) is a kind of computer data storage th...
Q: What exactly do you mean by "best fit"?
A: Introduction: First fit: The first fit allocates the first hole which is big enough. So, that sea...
Q: Question) Modify the following MATLAB script so that it results the below graph. Note: pay attention...
A: Code: x=-8:1:8;y=3*x.^2+4*x-2;z=5*x.^2+3*x+5;plot(x,y,'r-o',x,z,'-.')xlabel('x')ylabel('y\&z')ti...
Q: Consider the following TLB for with 6-bit VPNS and 8-bit PFNS: VPN PFN valid prot 54 184 1wx 42 197 ...
A: Since 8-bit processor has 8 bit address size and size of page number is 6 bit, hence number of bits ...
Q: What is Null String? Please ans me quickly
A: Null string means it doesn't store any value in the variable. For making string null use null keywor...
Q: What can we do with hardware to improve the performance of a single processor ?
A: Introduction: Data may be processed more effectively using a hard disc with a bigger cache. The Vide...
Q: LAN design homework StrtUP has big plans for the future. Plans that unfortunately require fundin...
A: What is Network ? A network is made up of two or more computers that are l...
Q: describe the state of a semaphore
A: Please refer below for your reference:
Q: You have been given an HTML file called registrationForm.html which creates an HTML form to collect ...
A: Brower output of the registrationForm.html document Please find below the code:
Q: Write a single-line MATLAB expression that can be used to compute t cos (35°) V3n + log!35 3π+
A: Consider the given expression :
Q: In the context of cryptography, what are the differences between a cipher that uses symmetric keys a...
A: cryptography: An Cryptography is an important method for protecting information and communications ...
Q: Given: F(X,Y,Z)=(X+Y)Z' + {(X'+Z') Y}' . Use boolean algebra method to derive its simplified Sum of ...
A: INTRODUCTION: Boolean algebra is a branch of mathematics that deals with logical value operations a...
Q: 21. Write a Python program to find the sum of the digits at unit places of all the elements in the g...
A: Write a Python program to find the sum of the digits at unit places of all the elements in the given...
Q: write a script that will ask a string input from a user and displays the string. tip. you can use fp...
A: Step-1: StartStep-2: Declare variable str and take input from user with message 'What is your string...
Q: between ℙ1 X, ℙ X and FX. 3-Give an example of a set derived from another set using set comprehens...
A: As per guidelines, we can only solve one question at a time. Hence resubmit the question for further...
Q: B3. Answer the 4 Draw the circuit of the following equation. F=A•C+(BOC) b. Write the equation direc...
A: Here in this multi part question.in the first one we have given a boolean expression and we have ask...
Q: Python question How would this term will translate into python coding
A: import math a=1.606276 * math.pow(10,-19)print(a)
Q: Using said principles (st
A: Step 1: first we take an alphanumeric string as a password.Step 2: first check that this string shou...
Q: defined the struct studentTypeto implement the basic properties of a student. Define the class stude...
A: Write code to define struct studentTypeto implement the basic properties of a student after that def...
Q: What is data visualization, and how does it work?
A: Find the answer given as below :
Q: a) A queue is an Abstract Data Type (ADT). Basic operations of queue are ENQUEUE, DEQUEUE, PEEK/FRON...
A: 3) A)
Q: What is the overall running time of the following code snippet? for(i=0; i<n; i++) for(j=i; j<n;j++)...
A: Time complexity can be defined as the amount of time taken to run the algorithm.
Q: Write a loop that reads positive integers from standard input, printing out those values that are gr...
A: I am attaching the complete working code in c++. Please go through it.
Q: Consider a 16-bit binary floating point number representation system: + SE E EEEE m m. m. m. m The f...
A: Below is the answer to above question. I hope this will be helpful to you...
Q: Create a program that allows the user to enter a string. Your task is to separate the vowels and con...
A:
Q: Compute the selector sets. Make a table. For each of production A a: give the first set of o; if a 6...
A: Here we find all first and follow and also mention that is LL1 or not? =============================...
Q: What are the two Windows apps that make use of the RDP protocol and port 33899?
A: Introduction: Application of RDP protocol and port 33899 in windows
Q: the steps of Counting Sort (second version that doesn’t use array B as given in the lectures) for th...
A: the c program is an given below :
Q: technolog
A: Evolution of database technology. Flat files were popular from the 1960s until the 1980s. A flat-f...
Q: make each line of the following mips assembly program into a hex machine code slt $14,$9,$11 ...
A: slt $14,$9,$11 R-type instruction op rs rt rd shamt function 000000 $9 $11 $14 00000 slt 6bit...
Q: In your view, of the added to the U.S. C 1865 and 1920 (13th
A: given - In your view, of the seven amendments added to the U.S. Constitution between 1865 and 1920 (...
Q: What is the need for two modes (user and kernel)?
A: Note: As per our guidelines we are supposed to answer only one question. Kindly repost other questi...
Q: For each of the following simulation applications identify one discrete and one continuous-change st...
A: arrow_forward Step 1 Before identifying which variables are discrete and which are continuous, let i...
Q: Write a function square in RISC-V that takes in an integer n ad returns its square. If n is not posi...
A: Write a function square in RISC-V that takes in an integer n ad returns its square.If n is not posit...
Q: Create a program that allows the user to enter a number, a mathematical operator, and another number...
A: The normal code goes into a try block.The exception handling code goes into the catch block
Q: Write an application that will take - 5 digit integer from user and calculate the sum of all digits ...
A: Program Explanation:- Using the header file. Using the namespace standard input/output function. De...
Q: Why are Strings in Java referred to as Immutable?
A: - We need to talk about the immutability of strings in java.
Q: What is the difference between stack and heap memory?
A: Difference between heap memory and Stack Memory: Stack memory allocation takes place on contiguous ...
Q: Write a program which should consists of a user defined function "Task ()" [Function returns no valu...
A: It is defined as a common fixture in programming languages that is used as a main tool of programmer...
Q: 7. Explain the following briefly: a. What is an /O bound job? b. What is CPU bound? c. Suppose there...
A: Given: Answer the questions.
Q: 3. a) A stack is an Abstract Data Type (ADI). Basic operations of stack are PUSH, POP, PEEK/TOP. Imp...
A:
Q: When five switches are utilized on a small LAN and each switch links to numerous computers on the LA...
A: Introduction: Modern switches may switch traffic across many ports at the same time. A Local Area Ne...
Array Elements = 50, 60, 70, 80, 90, 100
Search each element
Search for index 7: Output should be out of bound exception
USE JAVA
Step by step
Solved in 2 steps with 1 images
- code: public class PasswordGeneratorAndStorage {/*** Adds an application to the applications ArrayList. If index is -1, add application* to the end of applications. Else is index is within the size of applications, add* application at that index in applications. Otherwise, return. However, if applications * or application is null, return.* * @param applications* @param application* @param index*/public static void addApplication(ArrayList<String> applications, String application, int index) {// TODO: FILL IN BODY}/*** Generates a random password of length passwordLength and adds it to the end of* passwords if index is -1, or adds it to the index of passwords if index is within the* size of passwords (similar to how the addApplication adds an application). To generate* the random password, use rand to generate a random int within the size of characters. You* can then use this int to grab the char at that index in characters and concatenate that* to your String password variable.…This set method removes an element and raises an exception if the element is notfound.a. removeb. discardc. deleted. eraseDuplicate Set This function will receive a list of elements with duplicate elements. It should add all of the duplicate elements to a set and return the set containing the duplicate elements. A duplicate element is an element found more than one time in the specified list. The order of the set does not matter. Signature: public static HashSet<Object> duplicateSet(ArrayList<Object> list) Example: INPUT: [2, 4, 5, 3, 3, 5] OUTPUT: {5, 3}
- h) A new element can be added in a const array in Javascript. True/False(Java) (data structure) write an entire generic hashing program with a custom hashcode function and a Test class all classes should be generic and the program should have these methods : 1. rehash (to rehash when the array is 0.75 full) 2. rehash insert ( to insert items from the old array to the new larger one) 3. put (to insert into the hashtable) 4.getAll(to get all the items on the table you should override toString) 5. delete (to delete an item from the table) 6. custom hashcode function for T typeJava Program This assignment requires one project with two classes. Class Employee Class Employee Attributes (all private): id: String lastName: String firstName: String salary: int Executable Class create an array of Employee objects. create an ArrayList of Employee objects from that array. use an enhanced for loop to print all employees as shown in the sample output. create a TreeMap that uses Strings for keys and Employees as values. this TreeMap should map Employee ID numbers to their associated Employees. process the ArrayList to add elements to this map. print all employees in ID # order as shown, but do so using the TreeMap's forEach method and a lambda expression
- ****************************Instructions***************************** Add a "copy constructor" to your dynamic-array student. Remember, the prototype looks like: Classname(const classname& otherObject); Update your test program to use the copy constructor. e.g., CourseTypeList list2(list1); ********************************************************************* Submit: Updated test program, implementation and header files (.cpp and .h) for CourseListType and CourseType zipped into a single file. //courseTypeList.h #ifndef COURSELISTTYPE_H_INCLUDED#define COURSELISTTYPE_H_INCLUDED #include <string>#include "courseType.h" class courseTypeList { public:void print() const;void addCourse(std::string);courseTypeList(int n);~courseTypeList(); private:int NUM_COURSES;int courseCount;courseType *courses;}; #endif // COURSELISTTYPE_H_INCLUDED =============================================== //courseTypeList.cpp #include <iostream>#include <string>#include…Question 7: Write a method for the ArrayBoundedStack class that creates and returns a stack copy of this. (Hint: use topIndex and elements) Use following method signature: public ArrayBoundedStack<T> copy()Storing an ArrayList 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 Implement two comparator classes to sort student objects by name and by rollno (roll number). Implement your own selection sort method and place your code in a separate Java source file. Do not use a sort method from the Java collections library.
- Lab 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 class//Need help fixing some issues with a project. PLEASE read below Write a Java program that implements both Linear Search and Binary Search. The program will take a collection of objects (generic type data) as input and print the number of comparisons needed to find a target element within that collection. You will create the following two Java classes:1. SearchCombo.java : Code for both linearSearch and binarySearch will be in this class. You may take help from the textbook Chapter 9, Section 9.1. However, note that the design requirements are different from the textbook code.•Both search methods must use the Comparable<T> interface and the compareTo() method.•Your program must be able to handle different data types, i.e., use generics.•For binarySearch, if you decide to use a midpoint computation formula that is different from the textbook, explain that formula briefly as a comment within your code. 2. Tester.java : This class will contain the main() method. The user will be…yourList[8]. listi: 88888 Enter 5 integers: 9 8 After filling listi: 98756 list2: 98256 Enter 3 elements: 1 19 First three elements of listi: 1 2 3 list3: 00000000 list3: 7 0 54 8 15 88 8 Press any key to continue... program to test the class myArray. Should be gali. Not to copied one plz.