Answer:
Here you go.Consider giving brainliest if it helped.
Explanation:
import java.io.*;//include this header for the file operation
import java.util.*;//to perform java utilities
import javax.swing.JOptionPane;//needed fro dialog box
class Driver{
public static void main(String args[]){
int wages[]=new int[15];//array to hold the wages
int index=0;
try{
//use try catch for the file operation
File file=new File("wages.txt");
Scanner sc=new Scanner(file);//pass the file object to the scanner to ready values
while(sc.hasNext()){
String data=sc.nextLine();//reads a wage as a string
String w=data.substring(1);//remove the dollar from the string data
wages[index++]=Integer.parseInt(w);//convert the wage to int and store it in the array
}
sc.close();//close the scanner
}catch(FileNotFoundException e){
System.out.println("Error Occurrred While Reading File");
}
//sort the array using in built sort function
Arrays.sort(wages);
//print the wages
System.out.println("Wages of 15 person in ascending order:");
for(int i=0;i<wages.length;i++){
System.out.print("$"+wages[i]+" ");
}
//call the increases wages method
wages=increaseWages(wages);//this method return the updated wages array
}
//since we can call only static methods from main hence increaseWages is also static
public static int[] increaseWages(int wages[]){
//increase the wages
for(int i=0;i<wages.length;i++){
wages[i]+=500;
}
//print the new wages
int sum=0;
System.out.println("\n\nNew wages of 15 person in ascending order:");
for(int i=0;i<wages.length;i++){
sum+=wages[i];//sums up the new wages
System.out.print("$"+wages[i]+" ");
}
//display the summation of the new wages in a dialog box
JOptionPane.showMessageDialog(null,"Total of new wages: "+sum);
return wages;
}
}
Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?
This was a really hard part to write, but it finally works.
I’m not sure what this does, but I don’t have time to troubleshoot it.
This segment returns a value that is used by the segment marked B.
Answer:
This segment returns a value that is used by the segment marked B.
Explanation:
just took assigment
Answer:
C
Explanation:
In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards.
a. lw $t5, 0($t0)
b. lw $t4, 4($t0)
c. add $t3, $t5, $t4
d. sw $t3, 12($t0)
e. lw $t2, 8($t0)
f. add $t1, $t5, $t2
g. sw $t1, 16($t0)
Answer:
b. lw $t4, 4($t0)
c. add $t3, $t5, $t4
Explanation:
Pipeline hazard prevents other instruction from execution while one instruction is already in process. There is pipeline bubbles through which there is break in the structural hazard which preclude data. It helps to stop fetching any new instruction during clock cycle.
Write an algorithm (pseudo-code) that takes an unsorted list of n integers and outputs a sorted list of all duplicate integers. There must be no duplicates in the output list, also the output list should be a sorted list. The algorithm must run in O(n) time. Show your analysis of the running time. Note: Assume that inputs are integer values from 0 to 255. (Hint: use the concept that being used in the separate chaining)
Answer:
brainliest if it did help you
Explanation:
Given array : A[0...n-1]Now, create a count array Cnt[0...n-1]then, initialize Cnt to zero
for(i=0...n-1)
Cnt[i]=0 ---------O(n) time
Linearly traverse the list and increment the count of respected number in count array.
for(i=0...n-1)
Cnt[A[i]]++; ---------O(n) time
Check in the count array if duplicates exist.
for(i=0...n-1){
if(C[i]>1)
output (i); -----------O(n) time
}
analysis of the above algorithm:
Algorithm takes = O(1 + n + n + n)
= O(n)
//java code
public class SortIntegers {
public static void sort(int[] arr) {
int min = arr[0];
int max = arr[0];
for (int i = 0; i < arr.length; ++i) {
if (arr[i] > max) {
max = arr[i];
}
if (arr[i] < min) {
min = arr[i];
}
}
int counts[] = new int[max - min + 1];
for (int i = 0; i < arr.length; ++i) {
counts[arr[i] - min]++;
}
for (int i = 0; i < counts.length; ++i) {
if (counts[i] > 1) {
System.out.print((i + min) + " ");
}
}
System.out.println();
}
public static void main(String[] args) {
sort(new int[] { 5, 4, 10, 2, 4, 10, 5, 3, 1 });
}
}
The Basic premise of____is that objects can be tagged, tracked, and monitored through a local network, or across the Internet.
The basic premise of
a. artificial intelligence
b. intelligent workspaces
c. the Internet of Things
d. the digital divide
Answer:
C.
Explanation:
Internet of things
The Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.
What is IoT?The term "Internet of things" refers to actual physical items that have sensors, computing power, software, and other innovations and can link to those other systems and gadgets via the Internet or other communication networks and share files with them.
As we know,
Using a local network or the Internet, things may be identified, tracked, and monitored is the fundamental tenet of the Internet of Things.
Thus, the Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.
Learn more about the IoT here:
https://brainly.com/question/25703804
#SPJ2
12. What separated Grand turismo from other racing games was its focus on ______.
a) Your audiences and females in particular
b) Fantasy graphics and visuals
c) Pure simulation and ultrarealistic features
d) All of the above
Answer:
c) Pure simulation and ultrarealistic features
Explanation:
The main difference between Grand Turismo and other racing games was its focus on Pure simulation and ultrarealistic features. The Grand Turismo series has always been a racing simulation, which was made in order to give players the most realistic racing experience possible. This included hyperrealistic graphics, force feedback, realistic car mechanics, realistic weather, and wheel traction among other features. All of this while other racing games were focusing on the thrill of street racing and modifying cars. Therefore, it managed to set itself apart.
Need help with 9.2 Lesson Practice edhesive asap please
Answer:
Can you add an attachment please
In this exercise we have to use the computer language knowledge in python, so the code is described as:
This code can be found in the attached image.
So the code can be described more simply below, as:
height = []
height.append([16,17,14])
height.append([17,18,17])
height.append([15,17,14])
print(height)
See more about python at brainly.com/question/26104476
Which tab can be used to change the theme and background style of a presentation?
O Design
O Home
O Insert
O View
Answer:
Design
Explanation:
seems the most correct one..
Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a non-negative integer between 1 and 20 that is passed as a parameter from the command line (e.g. ./fact.sh 5). The result should be echoed to the screen as a single integer (e.g. 120).
NOTE: Do not include any other output, just output the single integer result.
Submit your code to the auto-grader by pressing Check-It!
NOTE: You can submit as many times as you want up until the due date.
Answer:
hope this helps
Explanation:
Two character strings may have many common substrings. Substrings are required to be contiguous in the original string. For example, photograph and tomography have several common substrings of length one (i.e., single letters), and common substrings ph, to, and ograph as well as all the substrings of ograph. The maximum common substring length is 6. Let X = X122 . Im and Y = yıy2 - - • Yn be two character strings. Using dynamic programming, design an algorithm to find the maximum common substring length for X and Y using dynamic programming. Please follow the general steps for designing a dynamic programming solution as in Q1 (other than the actual programming part).
Answer:
Explanation:
The following function is written in Java. It takes two strings as parameters and calculates the longest substring between both of them and returns that substring length.
import java.util.*;
class Test
{
public static void main(String[] args)
{
String X = "photograph";
String Y = "tomography";
System.out.println(X + '\n' + Y);
System.out.println("Longest common substring length: " + longestSub(X, Y));
}
static int longestSub(String X, String Y)
{
char[] word1 = X.toCharArray();
char[] word2 = Y.toCharArray();
int length1 = X.length();
int length2 = Y.length();
int substringArray[][] = new int[length1 + 1][length2 + 1];
int longestSubstringLength = 0;
for (int i = 0; i <= length1; i++)
{
for (int j = 0; j <= length2; j++)
{
if (i == 0 || j == 0)
substringArray[i][j] = 0;
else if (word1[i - 1] == word2[j - 1])
{
substringArray[i][j]
= substringArray[i - 1][j - 1] + 1;
longestSubstringLength = Integer.max(longestSubstringLength,
substringArray[i][j]);
}
else
substringArray[i][j] = 0;
}
}
return longestSubstringLength;
}
}
16. The Nintendo Entertainment System (NES) saw its sales skyrocket as a result of the launch of which of the following games?
a) Pac-Man
b) Super Mario Bros
c) The Legend of Zelda
d) Popeye
Answer:
Super Mario bros
Explanation:
What does getfenv() do?
Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.
Explanation: What this does it goes thourgh line of code in a particular order.
This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.
Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.
Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.
Answer: ummm, who knows
Explanation:
Explain the five generations of computer
Answer:
1 First Generation
The period of first generation: 1946-1959. Vacuum tube based.
2 Second Generation
The period of second generation: 1959-1965. Transistor based.
3 Third Generation
The period of third generation: 1965-1971. Integrated Circuit based.
4 Fourth Generation
The period of fourth generation: 1971-1980. VLSI microprocessor based.
5 Fifth Generation
The period of fifth generation: 1980-onwards. ULSI microprocessor based.
The phrase "generation" refers to a shift in the technology that a computer is/was using. The term "generation" was initially used to describe different hardware advancements. These days, a computer system's generation involves both hardware and software.
Who invented the 5th generation of computers?The Japan Ministry of International Trade and Industry (MITI) launched the Fifth Generation Computer Systems (FGCS) initiative in 1982 with the goal of developing computers that use massively parallel computing and logic programming.
The generation of computers is determined by when significant technological advancements, such as the use of vacuum tubes, transistors, and microprocessors, take place inside the computer. There will be five computer generations between now and 2020, with the first one starting around 1940.
Earlier models of computers (1940-1956)Computers of the Second Generation (1956-1963)Computers of the Third Generation (1964-1971)Computers of the fourth generation (1971-Present)Computers of the fifth generationLearn more about generations of computers here:
https://brainly.com/question/9354047
#SPJ2
What should be the first tag in any HTML document? A. <head> B. <title> C. <html> D. <!DOCTYPE >
Answer:
C.
Explanation:
Suppose the program counter is currently equal to 1700 and instr represents the instruction memory. What will be the access of the next instruction if:
instr[PC] = add $t0, $t1, $t2
Answer:
C
Explanation:
omputer chip
sorry btw
When it comes to having certain sales skills as a hotel manager, being able to really hear, learn about, and show customers that the products/services you offer will meet their needs is a vital skill to have. When you show customers that you truly hear their needs, what sales skill are you practicing?
active listening
product knowledge
communication
confidence
Answer:
Communication
Explanation:
The ability to communicate clearly when working with customers is a key skill because miscommunications can result in disappointment and frustration. The best customer service professionals know how to keep their communications with customers simple and leave nothing to doubt.
Mohammed needs to ensure that users can execute a query against a table but provide different values to the query each time it is run. Which option will achieve this goal?
parameter queries
dynamic queries
query joins
static queries
Answer:
the answer is B
Explanation:
The variable strFirst's scope is _____.
Answer:
- the usernameMaker function
Explanation:
When you look at the code, you can see it's located alongside the usernameMaker. It it only utilized then, therefore being it's scope. For reassurance, it's also correct on Edge.
I hope this helped!
Good luck <3
Taran is concerned with the security of his macros in a database. Which security option could he use to provide protection?
digital signatures
hide database objects
start-up options
secure VBA code
Answer:security VBA code
Explanation: