JAVA PROGRAMMING - Create a class whose main() holds an array containing 10 integers. Create two methods that accepts the array. The first method named lowest returns the lowest from the 10 numbers while the second method named highest returns the highest number from the list. Determine the highest and lowest number without sorting the numbers. Your output should contain the original list of numbers, the highest and the lowest number from the list. Supply the necessary values for the array
Q: Using Codeblock. Make a program that asks the user to enter the marks of a student in a subject. If ...
A: I have provided C CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT-------
Q: Make a recommendation for an architecture for a system (such as iTunes) that is used to sell and dis...
A: The objective is to state the architecture for a system (such as iTunes) that is used to sell and di...
Q: Explain how the size of the organization and the size of the program are factors that influence soft...
A: - We need to talk about how the size of an organisation and the size of the program influence softwa...
Q: Clock cycles on the CPU are defined.
A: The amount of the time between the two consecutive pulse in an oscillator in the computer's CPU is k...
Q: Based on Advanced Encryption Standard (AES), if the shared key is "Information Secu" and the plainte...
A: AES is implemented in software and hardware throughout the planet to encrypt sensitive data. it's es...
Q: In what situations do you think two- and three-dimensional arrays would come in handy?
A: The situations two- and three-dimensional arrays would come in handy are,
Q: Given below is the code for the controlling class with constructor overloading, analyse the code and...
A: public class DriverClass{ public static void main( String[] args ){ Number N1 = new Number...
Q: Distinguish the reasons why distributed software systems are more complex than centralized software ...
A: Difference between the distributed software system and centralized software system - Distribute...
Q: Explain how the convergence of computing, telecommunications, and media has resulted in the birth an...
A: Technological Disruption A disruptive technology is one that supplants an existing technology and fu...
Q: Who Is Responsible for Preventing Click Fraud?
A: What is Click Fraud? Click fraud is a type of internet advertising fraud that happens through pay-pe...
Q: Suppose I have a double matrix stored in an array of arrays. Write two nested enhanced for loops to ...
A: A 2D array is a collection of arrays. In C programming, a two-dimensional (2D) array is also known a...
Q: << o
A: 1.Add destructor: code: ~add() { cout<<"destructor"; } 2.Add copy constructor code: ...
Q: Write the code for a loop that outputs the following, as shown: 0 3 6 9 12 15 18 21 24 27 30
A: To write the python code for a loop.
Q: Explain why it is critical in the construction of secure systems to keep track of what users are doi...
A: Introduction : It is necessary to assess the significance of logging user behaviors in the creation ...
Q: 4. Remove the left recursion from the following production rule to obtain a new rule: A = A 'O'L'1'L...
A: We are given a grammar which has left-recursion and we are going to remove it using production rules...
Q: Write a code on the false position method , the program should check if the interval enclose at leas...
A: Task : Write the python code to find the root of the equation using the false position method.
Q: Task 1 In your methodology, create individual flowcharts for each property and discuss the property ...
A:
Q: can you help me how I install wordclod in cmd
A: Word Cloud is a data visualization technique used for representing text data in which the size of ea...
Q: (a) What are the three ideas that are useful in effective analysis of IT projects. Why is each idea ...
A: a)i)Project management- In this we manage project how it will reach its final stage. ii) Requirement...
Q: Computer science Describe the SSB synchronisation issue.
A: Introduction: PSS, SSS, and the physical broadcast channel make up the Synchronization signal block ...
Q: 7. Write a programme to make directory and change its permission so that only owner can execute it.
A: Program is in next step.
Q: editable source code: instructions are on the photo #include int main(void) { int a, b, c, d; ...
A: C Program: #include<stdio.h> /* Function getBest() of return type int with 4 parameters and re...
Q: Show all item num from the item table, and a matching quoted price from the order line table (show b...
A: I have Provided this answer with full description in step-2.
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: A hash map of size 15 has been constructed with Double-Hashing by applying h; (k;) = [ h(k;)+jd(k;)]...
A:
Q: 4- Name: FindMinInArray, Input: T (a sequence of n numbers T[1], T[2], ., T[n]), Output: min (the sm...
A: #include <iostream>using namespace std; void FindMinInArray(){ int n; cout<<"Enter...
Q: 2. Write a pseudo code for finding two smallest numbers in a list of positive integers. Trace your c...
A: Program Explanation The two lowest numbers are found using a Python program. At least two numbers a...
Q: Make a C program that will display the cube of a number using a while loop.
A: Use a while loop to iterate for 3 times in which we can multiply number to the result and obtain the...
Q: Is there a reason to use plain text protocols in the 21st century?
A: Lets see the solution.
Q: Let a be a primitive root mod p. Show that La(bib2) = La(b1) + La(b2) (mod p – 1).
A:
Q: Which of the following clauses are Horn Clauses? Select one or more: a. (¬B1 v ¬B2 ... v ¬Bn v C) O ...
A: Horn clause is clause with at most one positive, that is un negated, literal. A clause with at most ...
Q: How are truly distributed systems modeled?
A: A distributed system uses resources from different system located on multiple networks. Distributed ...
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: How do I rewrite this code so that when I print it the numbers come out like this (xxx)-xxx-xxxx or ...
A: Here is the approach :- First create one more empty string. Then iterate over the string of phone ...
Q: We want to compare two sensors based upon their detection levels and gain settings. The following ta...
A:
Q: pass def dialByName(names,numbers): '''Function to handle dial by name command which prompts the use...
A: The Answer is
Q: Describe a high-level programming language in your own words.
A: High-level programming language:- Many dialects of the importance level are intended for use by huma...
Q: Create a formal definition of hardware.
A: Introduction: Computer hardware refers to the essential components that enable a computer system to ...
Q: Examine the pros and disadvantages of enterprise-based systems in terms of maximising the use of inf...
A: Introduction: ICT ICT is an abbreviation that signifies Information Communications Technology.ICT in...
Q: What are the critical considerations when choosing an operating system for an embedded system?
A: The question is to find the critical considerations when choosing an operating system for an embedde...
Q: Define opera. When was the first opera performed? Who composed it?
A: Note: This is a multipart-based question. As per company guidelines, only the first three parts are ...
Q: Computer science What are the functions of the edit menu commands?
A: Introduction: The Edit menu is a graphical control element seen in most computer applications that w...
Q: Distinguish the reasons why distributed software systems are more complex than centralized software ...
A: Distributed software systems are more complex than centralized software systems, which are character...
Q: Make a C program that will display the factorial of a number. Note: Use a while loop.
A: The question is to write C code for the given problem.
Q: Which of the following statements are unsatisfiable? Select one or more: a. A- ¬A b. QA -Q O c. Bv ¬...
A:
Q: n=0; for del = 0.0:0.4 : pi n=n+1; pe(n)=1.2*sin(del); end disp(pe);
A: Here a Matlab code is given. In the question, the output of the Matlab question is asked. The code s...
Q: Homework: Write a piece of code to sort in ascending order a 16-bit(word) unsigned int array of size...
A: The answer as given below:
Q: What is the purpose of the edit menu commands?
A: The problem is based on the basic tools in microsoft office softwares.
Q: Define the term multicore microprocessor.
A: Introduction: Define the term multicore microprocessor.
Q: Write a MATLAB program that finds the sum for-25 to 5. (Increment by 5). By using (for loop)
A: The question is to write Matlab code for the given question.
JAVA
Create a class whose main() holds an array containing 10 integers. Create two methods that accepts the array. The first method named lowest returns the lowest from the 10 numbers while the second method named highest returns the highest number from the list. Determine the highest and lowest number without sorting the numbers. Your output should contain the original list of numbers, the highest and the lowest number from the list. Supply the necessary values for the array
Step by step
Solved in 3 steps with 1 images
- Java: Write a complete method to create an array of random integers. Method Specification The method takes in three integer parameters: the array size, the lower bound, and the upper bound. The method also takes in a boolean parameter. The method creates and returns an integer array of the specified size that contains random numbers between the lower and upper bound., using these rules: The lower bound is always inclusive. If the boolean parameter is true, the upper bound is also inclusive. If the boolean parameter is false, the upper bound is not inclusive (meaning it is exclusive). If any of the parameters are invalid, null is returned. Driver/Tester Program I have provided you with a driver/tester program that you can use to test your code before submitting. Paste your code into the placeholder at the top of the file. I strongly recommend running this program before you submit your homework. The program is designed to help you catch common errors and fix them before submitting.…Java: Write a complete method to create an array of random integers. Method Specification The method takes in three integer parameters: the array size, the lower bound, and the upper bound. The method also takes in a boolean parameter. The method creates and returns an integer array of the specified size that contains random numbers between the lower and upper bound., using these rules: The lower bound is always inclusive. If the boolean parameter is true, the upper bound is also inclusive. If the boolean parameter is false, the upper bound is not inclusive (meaning it is exclusive). If any of the parameters are invalid, null is returned. Driver/Tester Program I have provided you with a driver/tester program that you can use to test your code before submitting. Paste your code into the placeholder at the top of the file. Review the Homework FAQ page, which contains instructions and a video of how to use the provided file. If you aren't sure how to use the tester or have any…For Beginners Java: Write a program that ask the user to enter a list of positive scores until the user enters a negative score to terminate the input. You need to store these scores in an array. You can assume the maximum number of scores the user may enter is 50. However, you need to keep track of the actual number of scores entered. Write 2 methods: 1. calculateAverage(): this method takes the list of scores and return the average score. 2. countPerfectScores(): this method takes the list of scores and return the number of perfect scores (100). The main program reads the input and calls these methods and print the results. Please make sure you write a comment line to document what your method does.
- Part 1: In Java Write a program that uses a 2-D array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and highest and lowest temperatures of the year. Your program must consist of the following methods with their appropriate parameters: a.) getData: This method reads and stores the data in the 2-D array. b.) averageHigh: This method calculates and returns the average high temperature of the year. c.) averageLow: This method calculates and returns the average low temperature of the year. d.) indexHighTemp: This method returns the index of the highest temperature in the array. e.) indexLowTemp: This method returns the index of the lowest temperature in the array. Use the following input: High temp for each month: 30 40 45 60 70 90 89 95 79 90 70 40 Low temp for each month: 10 -10 20 30 50 75 85 79 50 80 30 201. Shift Left k Cells Use Python Consider an array named source. Write a method/function named shiftLeft( source, k) that shifts all the elements of the source array to the left by 'k' positions. You must execute the method by passing an array and number of cells to be shifted. After calling the method, print the array to show whether the elements have been shifted properly. Example: source=[10,20,30,40,50,60] shiftLeft(source,3) After calling shiftLeft(source,3), printing the array should give the output as: [ 40, 50, 60, 0, 0, 0 ]Blackjack is a card game where the goal is to reach a score of 21. Create a java version of this game with the following requirements. Extend the JPanel class and create an array of 52 cards. Add four sets of numbers from 1 to 10. Use J for Jack, Q for queen, K for king, and A for ace. Jack through king will have a value of 10, and the ace will have a value of 11. Deal two cards to the user and two cards to the computer. Do not show the value of the computer's first two cards to the user. Add buttons Hit, Stay, and Reset. If the user selects the "Hit" button, randomly select one of the cards from the array, and give it to the user. (After selecting a card, do not reuse this index during the rest of the game.) If the dealer has less than 21, "hit" the dealer, too. When the user selects the "Stay" button, add up the card values. The winner is the person who is closest to 21 without going over. Name the class Blackjack.java.
- A bit new to methods and need a little bit of help. Swap Method Your task is to write a public static method named swap that takes a single parameter which is an array of doubles. This method should swap the first and last element in the array and then return the adjusted double array. You can assume that all arrays passed into the method are a length of 2 or more. For example, the test data provided when passed into the swap method should go from: {8.34, 7.221, 10.643, 93.2} toIn java Write a program that uses a 2-D array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and highest and lowest temperatures of the year. Your program must consist of the following methods with their appropriate parameters:a.) getData: This method reads and stores the data in the 2-D array.b.) averageHigh: This method calculates and returns the average high temperature of the year.c.) averageLow: This method calculates and returns the average low temperature of the year.d.) indexHighTemp: This method returns the index of the highest temperature in the array.e.) indexLowTemp: This method returns the index of the lowest temperature in the array.Use the following input:High temp for each month: 30 40 45 60 70 90 89 95 79 90 70 40Low temp for each month: 10 -10 20 30 50 75 85 79 50 80 30 20Pseudocode for Java code Write the algorithm in pseudocode for a method that accepts three parameters: an integer array, an integer representing the number of valid values in the array, and an integer representing a factor. The method will count the number of valid values in the array that are multiples of the factor and will return the count. There is a Java operator that might be very helpful in solving this problem. Testing Above problem: Assuming that the first two parameters are an array containing 4, 10, 15, 12, 8, 20, 100, 25, 32, 7, 28, and 48 and the number 12, come up with three good test cases for the factor and the return value. factor numMultiples
- JAVA program Write a Java program that asks the user to enter an array of integers. The program should prompt the user for the number of elements in the array and then the elements of the array. The program should then call a method named minGap that accepts the array entered by the user as a parameter and returns the minimum 'gap' between adjacent values in the array. The main method should then print the value returned by the method. The gap between two adjacent values in an array is defined as the difference in value between the first element and the second element. For example, suppose the user entered the following array of integers {1, 3, 6, 5, 12} The first gap is 2 (3 - 1), the second gap is 3 (6 - 3), the third gap is 1 (6 - 5) and the fourth gap is 5 (12 - 6). Thus, the call of minGap(array) should return 1 because that is the smallest gap in the array. If you are passed an array with fewer than 2 elements, you should return 0. Use Math.abs()JAVA program Write a Java program that asks the user to enter an array of integers. The program should prompt the user for the number of elements in the array and then the elements of the array. The program should then call a method named minGap that accepts the array entered by the user as a parameter and returns the minimum 'gap' between adjacent values in the array. The main method should then print the value returned by the method. The gap between two adjacent values in an array is defined as the difference in value between the first element and the second element. For example, suppose the user entered the following array of integers {1, 3, 6, 5, 12} The first gap is 2 (3 - 1), the second gap is 3 (6 - 3), the third gap is 1 (6 - 5) and the fourth gap is 5 (12 - 6). Thus, the call of minGap(array) should return 1 because that is the smallest gap in the array. If you are passed an array with fewer than 2 elements, you should return 0.TableAA.java Write a program that will store a multiplication table in a 2-D array. The user will enter how many lines (rows) it will have. The table will be printed to the screen. (Make it look nice – consider using printf.) This program will contain a static method. This method will take in an integer (the user’s number) and it will return a 2-D array. The code inside of the method will create the array, fill it with all the appropriate values that one would expect in a multiplication table, and then return that filled array. In the main method, you will ask the user how many lines they want to see and then you will use your static method to get the array. Once you have the array back from the static method, use nested for loops to print it in table form. See samples on the following pages. Program only needs to run once. Add try/catches so the user can only enter positive integers (1 and higher).