Step 3. Test your program. Below is an example of what the program output should look like. Your output will be different because the 10 random numbers will not be the same as the example. Use the Snip It tool in Windows or a similar tool on the Mac to cut and paste the Eclipse Console output window into the same Word document as the algorithm in Step 1. C7_Project (2) [Java Application] C:\Program Files\Java\jre1.8.0_131\bin\javaw.exe (Mar 26, 2019, 11:24:20 AM) The largest value is 100 The unsorted list is: 64 24 25 The sorted list is: 3 5 24 48 71 100 5 81 3 48 64 71 81 100
Q: Please explain the answer Question 4) Assume Σ = {a, b}. Design a DFA that recognizes the language…
A: Design a DFA that recognizes the language L, where L contains all strings starting with aaa
Q: Hi code in Java thank you. You are mapping a faraway planet using a satellite. The planet’s surface…
A: The Java program to find the minimum number of islands possible in single integer is represented in…
Q: . Why do you think that the drop probability P of a RED gateway does not simply increase linearly…
A:
Q: = P1*1 P2*₂. -Prk. et g = gcd(k₁, k2.... k) and m, = k₁/g. he function F is defined as: F(n) = P11…
A: Here, If p is top, then φ § = p – 1 and φ (pa) = p a * (1 – 1/p) for any a.here,If m and n are…
Q: Write a C++ program to achieve the following requirements using an online platform, a screenshot is…
A: I have provided the answer based on C++ Programming. Detailed comments are included for a better…
Q: discusses the advantages and cons of using prototypes for requirements elicitation.
A: Question is about using prototypes during requirement elicitation.
Q: n
A: Rooted tree. A rooted tree is a tree in which one vertex has been designated the root. The edges of…
Q: e relationship between the object-oriented programming paradigm and design patterns has to be…
A: In the given question object oriented is itself a paradigm for programming. Other programming…
Q: Write a Python program sentences.py that prompts for multiple sentences. The program should write…
A: Python Reverse each word in a sentence
Q: (De Morgan’s Laws) In this chapter, we discussed the logical operators &&, ||, and !.…
A: According to De Morgan's Law, !(condition1 && condition2) = (!condition1 || !condition2)…
Q: Below is the interface for the Date class: it is our "contract" with you: you have to implement…
A: Note: we have provided required method/constructor according to comment provided . you can include…
Q: For your application, explain the benefits of interfaces over abstract classes.
A: Solution:: Modern C++ collector/makers usually create very inefficient code when virtual functions…
Q: Which built-in function is similar to IIF, and instructs Access to run through multiple expressions…
A: Answer the above questions are as follows
Q: Reduce the following Boolean expressions to the indicated number of literals: 4) A’B(D’ + C’D) +…
A:
Q: Consider the following process scheduling scenario: Process name Arrival time Processing time 6 4 1…
A: The working hand calculation and respective explanation are provided in the photos attached below.
Q: Describe 6 essential features that should be included in a tool to support change management…
A: Answer the above question are as follows
Q: a) Write an appropriate Python arithmetic expression for each of the following: 1. A=√(ab) x (b-c) ×…
A: I have provided the answer based on Python Programming. Detailed comments are included for a better…
Q: 7. there are 35 blocks on a disk. Given the information below, show the storagelocation of the files…
A: - We need to see for the contiguous memory allocation here.
Q: computer technology What are the main differences between interfaces and abstract classes?
A: Abstract classes can have constants, members, method stubs(method without a body) and defined…
Q: What is a downgrade attack, and how can you fight back against it?
A: Introduction: Downgrade attack: It's a type of computer system or communication protocol…
Q: Write a C++ program to print the text "C++ Programming." in the output along with the quotes.…
A: #include <iostream> using namespace std; int main() { cout<< "\"C++ Programming\""; }
Q: Create a method that takes a one-dimensional array of integers then sort them in a descending order…
A: Below I have provided the answer based on the C# Programming. Refer to the comments for a better…
Q: Could you perhaps provide us a more thorough explanation of how metrics are used to the software…
A: A software development process is a process of dividing software development work into smaller,…
Q: a) What is the concept of Error Detection and Correction in Computer Networks?
A: NOTE: AS PER BARTLEBY GUIDELINES IF THERE ARE MULTIPLE QUESTION THEN WE ARE ALLOWED TO SOLVED ONE…
Q: a-Write down the State Table of this Moore machine b- Find out the next state and output equations.…
A:
Q: Design the wireframes and storyboard, interactivity diagram, object dictionary, and any necessary…
A: The storyboard/wireframe, interactivity board, object dictionary, and code are given below
Q: Based on the undirected Graph G: es e₁ e10 es е6 e10 V4 e6 e3 V4 e9 e11 e3 eg e7 e11 e₂ e12…
A: - We have to work with the graphs provided.
Q: 2. Trace the following flowchart for value (number=131): www number X T Output messages A Engine xox…
A: TRACE TABLE : NUMBER X T Output message 131 0 131 No Output 121 1 131…
Q: The chef has N marks. Each marker has a cap. For each valid i, the ith tag has color ai And…
A: Input - Output Description: First input contains a single integer T denoting the number of test…
Q: Q1) Write a program to read 10 temperatures in an array from the keyboard then compute and print the…
A: I have provided the answer based on C++ Programming. Detailed comments are included for a better…
Q: sample tupl Explain why?
A: SummaryThen we learn about the violations that can do in the database due to any changes made to the…
Q: dangers of using a credit card to transmit money
A: Untrained staff As a busy small business owner, you may not even realize that you and your staff…
Q: 4. The following is the memory configuration at a given point in time where dynamic partitioning…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: (Calculating the Product of Odd Integers) Write a program that calculates and prints theproduct of…
A: We want to utilise a loop to calculate the product of odd numbers between 1 and 15.
Q: Using pumping lemma prove that the language A = {yy | y E {0,1}* } is not regular.
A: Given language is, A={yy | y∈{0, 1}* } Pumping Lemma for Regular languages states that, If L be an…
Q: where n = 1G (i.e., 4 x n uniquely addressable locations-n: row, 4:2 width) what in the tal om? Sh
A: the answer is
Q: What is a shift reduce parser? Explain in detail the conflicts that may occur during shift reduce…
A: Please refer below for your reference: According to company guidelines we are restricted to answer…
Q: Analyze the advantages and disadvantages of cloud security from a security perspective. The switch…
A: Answer : Advantages of cloud security : 1) It helps to recovery of data if any thing happen with…
Q: Under what circumstances use of the staged representation of the CMMI? would you recommend the
A:
Q: a) Describe the differences between k-nearest neighbour and k-means clustering. For each approach,…
A: “Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: 7- Simulation tests all the logic a. Gate speed b. Functions c. Tools 8- EDA test bench creation…
A: Simulation is the process of representing the electric circuit in the programmatic form, where all…
Q: Given two integers as user inputs that represent the number of drinks to buy and the number of…
A: Start Input purchase Input restore Call the function and print the updated inventory Stop
Q: List the main security challenges unique to cloud computing along with the solutions that have been…
A: Introduction: Cloud computing alludes to a large number of innovative assets that are given "as a…
Q: What is the name of the programming approach where you start with a simple, unfinished functional…
A: The question has been answered in step2
Q: Let IP address 200 210 56.76/28 find the subnet mask, subnet id broadcast address and also find…
A: Introduction: Subnet mask: Number that distinguishes/separates host and network address Subnet…
Q: Suppose a TCP Vegas connection measures the RTT of its first packet and sets BaseRTT to that, but…
A: Introduction TCP Reno and TCP Tahoe models can choose the congestion in the network when there is…
Q: Write a java program to check if a list of integers contains only odd number. Please do it using…
A: I have provided JAVA CODE along with CODE SCREENSHOT and 2 OUTPUT SCREENSHOTS-------------
Q: 5. Given the following "Super Simple CPU" program: LDI 6 SUB ONE ADD TWO DONE STO ONE STP DAT 1 DAT…
A: I have provided the answer based on Pseudo Programming. Detailed comments are included for a better…
Q: : Congestion Notification (ECN) as define equires one bit to indicate whether the e are FCN canable…
A: Introduction: Below Explicit Congestion Notification (ECN) as defined in RFC 3168 requires one bit…
Q: The text states that additive increase is a necessary condition for a congestion-control mechanism…
A:
Write a Java program with a single-dimension array that holds 10 integer numbers and identify the maximum value of the 10 numbers. Next sort the array using a bubble sort and display the array before and after sorting.
Step by step
Solved in 3 steps with 1 images
- Define an array to be a 121 array if all elements are either 1 or 2 and it begins with one or more 1s followed by a one or more 2s and then ends with the same number of 1s that it begins with. Write a method named is121Array that returns 1 if its array argument is a 121 array, otherwise, it returns 0. There is one additional requirement. You should return 0 as soon as it is known that the array is not a 121 array; continuing to analyze the array would be a waste of CPU cycles. If you are programming in Java or C#, the function signature isint is121Array(int[ ] a) If you are programming in C or C++, the function signature isint is121Array(int a[ ], int len) where len is the number of elements in the array a. Examples a is then function returns reason {1, 2, 1} 1 because the same number of 1s are at the beginning and end of the array and there is at least one 2 in between them. {1, 1, 2, 2, 2, 1, 1} 1 because the same number of 1s are at the beginning and end of…Using the following two string arrays, output the first item from the first array with the first item from the second array on the same line (OUTPUT: red Ford). Then, output the second item from each array and output the result. Do this for all four items. String[] firstArray = {“red”, “blue”, “yellow”, “black”}; String[] secondArray = {“Ford”, “Honda”, “GM”, “Toyota”};Create a game similar to Hangman named GuessAWord in which a player guessesletters to try to replicate a hidden word. Store at least eight words in an array, andrandomly select one to be the hidden word. (The statements needed to generate arandom number are shown in the Exercises in the “Decision Making” and “Looping”chapters.) Initially, display the hidden word using asterisks to represent each letter.Allow the user to guess letters to replace the asterisks in the hidden word until theuser completes the entire word. If the user guesses a letter that is not in the hiddenword, display an appropriate message. If the user guesses a letter that appears multipletimes in the hidden word, make sure that each correct letter is placed. Figure 6-27shows typical games in progress in a console-based application and in a GUIapplication. In the GUI application, the user has successfully guessed e, and is about toguess r. Hint: If you create the GUI version of the game, you might want to include…
- In java, please read the text file as array. Then, replace the null with 0 and calculate the sum of the new students in ABC University.Example of text file: (university,year,total_students,new_students,new_staff,ABC, 2000, 3457, , ,ABC, 2001, 3675,218, ,EFG, 2000, 2389,602, ,EFG, 2001, 2785,396, 65,)write java statement to shift the content of each cell of an integer array one place to the right, except for the content of the last cell, which should be moved into the cell with subscript 0. Thus for example, if the array looks like this: 0 1 2 3 4 5 2 9 3 7 then the array will be changed to look like this: 0 1 2 3 4 7 5 2 9 3I need help with this Java problem as it's explained in the image below: Image attached can not edit only the code below: public class ShoppingList{ public void add(Item item){ // *** Student task #1 *** /* Requirements: 1. if null item is not allowed: do nothing if null 2. if the list is full, double the array size-dynamic array allocation 3. No duplicated items-all items' names must be unique. If an item with the same name already exists in the list, simply add quantity to the existing item in the list 4. insert the item to the array to maintain sorted-items are sorted based on item names. *** Enter your code below *** */ } public void remove(Item item){//remove all items with the same name. // *** Student task #2 *** /* Requirements: 1. If item not found(item name), display the item does not exists in the list otherwise, remove the item…
- Please don't change anything. Put your code in line 7, 11 and 13. Write a method named getSquares which takes an integer array and returns a new integer array of the same length where each element is the square of the corresponding element in the input array. For example, if the input array is {2, 4, 5} the output would be {4, 16, 25}.Write a static method blur(double[][]picture) that you could use on a part of a picture file to obscure a detail such as a person’s face or a license plate number. This method computes the weighted averages of the values in picture and returns them in a new two-dimensional array. To find a weighted average of a group of numbers, you count some of them more than others. Thus, you multiply each item by its weight, add these products together, and divide the result by the sum of the weights. For each element in picture, compute the weighted average of the element and its immediate neighbors. Store the result in a new two dimensional array in the same position that the element occupies in picture. This new array is the one the method returns. The neighbors of an element in picture can be above, below, to the left of, and to the right of it, either vertically, horizontally, or diagonally. So each weighted average in the new array will be a combination of up to nine values from the array…In this project you will generate a poker hand containing five cards randomly selected from a deck of cards. The names of the cards are stored in a text string will be converted into an array. The array will be randomly sorted to "shuffle" the deck. Each time the user clicks a Deal button, the last five cards of the array will be removed, reducing the size of the deck size. When the size of the deck drops to zero, a new randomly sorted deck will be generated. A preview of the completed project with a randomly generated hand is shown in Figure 7-50.
- Write a program that creates a two dimensional array with 4 rows and 3 columns that contains the below numbers. Let the computer prompt you to enter these numbers. 8 6 1 7 3 0 2 5 9 5 6 7 After that, calculate and print the total and average of these values.Create a new program named compTask1.py and add comments and code to answer the fol ○ Why doesn’t np.array((1, 0, 0), (0, 1, 0), (0, 0, 1,dtype=float) create a two dimensional array? Write it the correctway. (Help here)○ What is the difference between a = np.array([0, 0, 0]) and a =np.array([[0, 0, 0]])?○ A 3 by 4 by 4 is created with arr = np.linspace(1, 48,48).reshape(3, 4, 4). Index or slice this array to obtain the following(help here, here and here):■ 20.0■ [ 9. 10. 11. 12.]■ [[33. 34. 35. 36.] [37. 38. 39. 40.] [41. 42. 43. 44.] [45. 46. 47. 48.]]■ [[5. 6.], [21. 22.] [37. 38.]]■ [[36. 35.] [40. 39.] [44. 43.] [48. 47.]]■ [[13. 9. 5. 1.] [29. 25. 21. 17.] [45. 41. 37. 33.]]■ [[1. 4.] [45. 48.]]■ [[25. 26. 27. 28.], [29. 30. 31. 32.], [33. 34. 35. 36.], [37. 38. 39. 40.]]Hint: use flatten (help here) and reshape.Create an ArrayList, Named it Husnain that can hold Integers, and fill each slot with a different random value from 1-50. Display those values on the screen, and then prompt the user for an integer to search through the ArrayList, and if the item is present, say so. It is not necessary to display anything if the value was not found. If the item is in the ArrayList multiple times, it's okay if the program prints the message more than once