Answer:
25 35
Explanation:
First if checks if num is greater than 25, it is so it prints 25 with a space after and adds 10 to num (num is now 35)
Then it checks if num is greater than 30, it is, so it prints 35 with a space after and adds 5 to num (num is now 40)
Lastly, it checks if num is greater than 45, it is not, so the program terminates with output: "25 35 " (note the space at the end)
In java I need help on this specific code for this lab.
Problem 1:
Create a Class named Array2D with two instance methods:
public double[] rowAvg(int[][] array)
This method will receive a 2D array of integers, and will return a 1D array of doubles containing the average per row of the 2D array argument.
The method will adjust automatically to different sizes of rectangular 2D arrays.
Example: Using the following array for testing:
int [][] testArray =
{
{ 1, 2, 3, 4, 6},
{ 6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
must yield the following results:
Averages per row 1 : 3.20
Averages per row 2 : 8.20
Averages per row 3 : 13.20
While using this other array:
double[][] testArray =
{
{1, 2},
{4, 5},
{7, 8},
{3, 4}
};
must yield the following results:
Averages per row 1 : 1.50
Averages per row 2 : 4.50
Averages per row 3 : 7.50
Averages per row 4 : 3.50
public double[] colAvg(int[][] array)
This method will receive a 2D array of integers, and will return a 1D array of doubles containing the average per column of the 2D array argument.
The method will adjust automatically to different sizes of rectangular 2D arrays.
Example: Using the following array for testing:
int [][] testArray =
{
{ 1, 2, 3, 4, 6},
{ 6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
must yield the following results:
Averages per column 1: 6.00
Averages per column 2: 7.00
Averages per column 3: 8.00
Averages per column 4: 9.00
Averages per column 5: 11.00
While using this other array:
double[][] testArray =
{
{1, 2},
{4, 5},
{7, 8},
{3, 4}
};
must yield the following results:
Averages per column 1: 3.75
Averages per column 2: 4.75
My code is:
public class ArrayDemo2dd
{
public static void main(String[] args)
{
int [][] testArray1 =
{
{1, 2, 3, 4, 6},
{6, 7, 8, 9, 11},
{11, 12, 13, 14, 16}
};
int[][] testArray2 =
{
{1, 2 },
{4, 5},
{7, 8},
{3,4}
};
// The outer loop drives through the array row by row
// testArray1.length has the number of rows or the array
for (int row =0; row < testArray1.length; row++)
{
double sum =0;
// The inner loop uses the same row, then traverses all the columns of that row.
// testArray1[row].length has the number of columns of each row.
for(int col =0 ; col < testArray1[row].length; col++)
{
// An accumulator adds all the elements of each row
sum = sum + testArray1[row][col];
}
//The average per row is calculated dividing the total by the number of columns
System.out.println(sum/testArray1[row].length);
}
} // end of main()
}// end of class
However, it says there's an error... I'm not sure how to exactly do this type of code... So from my understanding do we convert it?
Answer:
Explanation:
The following code is written in Java and creates the two methods as requested each returning the desired double[] array with the averages. Both have been tested as seen in the example below and output the correct output as per the example in the question. they simply need to be added to whatever code you want.
public static double[] rowAvg(int[][] array) {
double result[] = new double[array.length];
for (int x = 0; x < array.length; x++) {
double average = 0;
for (int y = 0; y < array[x].length; y++) {
average += array[x][y];
}
average = average / array[x].length;
result[x] = average;
}
return result;
}
public static double[] colAvg(int[][] array) {
double result[] = new double[array[0].length];
for (int x = 0; x < array[x].length; x++) {
double average = 0;
for (int y = 0; y < array.length; y++) {
average += array[y][x];
}
average = average / array.length;
result[x] = average;
}
return result;
}
Need to compress this IPv6 Address
ad93:a0e4:a9ce:32fc:cba8:15fe:ed90:d768
I can't underatnd your question
SORRY
Use the drop-down menus to describe how to add a data bar to a report.
1. Open the table in view.
2. Click the column of the desired numerical field.
3. Click the conditional tab Format, then .
4. In the Rules Manager dialog box, click .
5. Select to “compare to other records,” and determine whether you want the value and bar to show at the same time.
6. Adjust the desired length of the bar and the color. Click OK.
7. Once satisfied with your rule, click and then OK.
Answer:
1. layout
3. conditional formatting
4. new rule
7. apply
Explanation:
just did it on edge
Question 1
1 pts
The pressure of the electrons in a wire is measured in units called
volts
amperes
watts
ohms
The largely instinct 3.5 inch floppy disc uses which connector
Answer:
Option A, Volts
Explanation:
Volts is the unit of pressure of the electrons in a wire. One Volt is the required pressure to allow flow of one unit of current in a circuit against a resistance of one ohm.
Hence, option A is correct
Think of an aspect of HTML that you found challenging to master. Why is that aspect of HTML important? What are some future situations that you could use it in?
Answer:
html is a thing that u can to create an website business that u can make money on it
Consider the following code snippet:
public static void print(E[] a)
{
for (int i = 0; i < a.length; i++)
{
System.out.println(a[i] + " ");
}
}
int[] a = {3,6,5,7,8,9,2,3};
print(makeArray(a));
Assume that the method call to print(makeArray(a)) works correctly by printing the int array a. Which of the following headers for the makeArray method will make this possible?
I public static Integer[] makeArray(int[] a)
II public static E[] makeArray(int[] a)
III public static Integer[] makeArray(E[] a)
I and III only
I only
I and II only
II and III only
What does it mean when the syntax ? extends D is used?
Any subclass of D may be used.
Any superclass of D may be used.
Any subclass or superclass of D may be used.
This indicates a wildcard with an upper bound.
Consider the following code snippet that declares the GraduateStudent class:
public GraduateStudent extends Student { . . .}
Which of these statements are false?
a. I GraduateStudent is a subclass of Student
b. II Stack is a subclass of Stack
c. III Stack is a subclass of Stack
d. II only
e. III only
f. II and III only
g. I only
Answer:
Explanation:
1) I and II only ... This is because the makeArray parameter must be an int[] since that is what the a array that is being passed actually is. The return type should be E[] only but since that is not an option, it could work with Integer[] if the E class allows.
2) Any superclass of D may be used. Although this is not complete, extends allows for a subclass to access any variables and methods within the superclass D but not directly access another superclass of D.
3) I only ... GraduateStudent is a subclass of Student
SHORT ANSWERS:
Q.1 List some causes of poor software quality?
Q.2 List and explain the types of software testing?
Q.3 List the steps to identify the highest priority actions?
Q.4. Explain the importance of software quality?
Answer:
Hard drive Microsoft have the highest priority actions
Briefly explain how Riboflavin deficiency lead to disease state.
Answer:
Severe riboflavin deficiency can impair the metabolism of other nutrients, especially other B vitamins, through diminished levels of flavin coenzymes [3]. Anemia and cataracts can develop if riboflavin deficiency is severe and prolonged [1]. The earlier changes associated with riboflavin deficiency are easily reversed.
Which of the following characteristics differentiates PCM from BWF audio
file formats?
metadata storage
.wav file extension
uncompressed audio file format
compressed audio file format
Answer: A
Explanation:
Answer:
A
Explanation:
what is the weather in Ireland?
Answer:
Year-round, Irish weather as a whole tends to stick with what it knows: Mildly crisp weather, around 270 days of rain, with sunshine and wind. Although slight fluctuations occur dependent on the month and season, the average yearly temperature is around 50 degrees Fahrenheit.
Answer:
hi
Explanation:
The climate of Ireland is mild, humid and changeable with abundant rainfall and a lack of temperature extremes. ... January and February are the coldest months of the year, and mean daily air temperatures fall between 4 and 7 °C (39.2 and 44.6 °F) during these months.
have a nice day
I love Ireland very much
Reusing existing software to create a new software system or product can be a cost-efficient approach to development in many software projects. It may not be cost-efficient in all projects. As a software engineer, you can determine if it is the best approach for your project only if you know, and can estimate, the associated costs. Which of the following costs is NOT one of the costs typically considered when estimating the cost of reuse?
A. The purchase or license cost of COTS software, where applicable
B. Modification and/or configuration costs associated with making reusable software meet system requirements
C. The cost associated with finding analyzing, and assessing software for reuse
D. Legal costs associated with defending against charges of copyright infringement
E. Integration costs associated with mixing reusable software and other software (either new or reused)
Answer:
D. Legal costs associated with defending against charges of copyright infringement
Explanation:
When estimating the cost of reusing software you are planning to obtain the necessary licences that are required for your project which will prevent copyright infringement claims from taking place.
outline four advantages of digital
cameras over analogue cameras
Answer:
Explanation:
A digital camera refers to a camera whereby the photographs are being captured in digital memory. An analogue camera refers to the traditional camera that typically sends video over cable.
The advantages of digital cameras over analogue cameras include:
1. Massive Storage Space:
There is a large storage space for photos and thus helps to prevent limitations to film. There are memory cards that can store several images.
2. Multiple functions:
The digital camera performs several functions like face detection, night and motion detection This makes capturing of images more fun and brings about better images.
3. Video Camera:
Digital cameras can also capture moving pictures while analog camera typically captures images that are still. Digital camera is vital as it can be used for live streaming.
4. Smaller and Lighter:
Digital cameras are usually smaller and lighter which makes them more portable and easy to carry about.
write a c++ program that accept student information
Answer:
Structure
This program stores the information (name, roll and marks entered by the user) of a student in a structure and displays it on the screen.
To understand this example, you should have the knowledge of the following C++ programming topics:
C++ StructuresC++ StringsIn this program, a structure(student) is created which contains name, roll and marks as its data member. Then, a structure variable(s) is created. Then, data (name, roll and marks) is taken from user and stored in data members of structure variable s. Finally, the data entered by user is displayed.This structure has three members: name (string), roll (integer) and marks (float).
Then, a structure variable s is created to store information and display it on the screen.
Do you think renewable energy can power the world? If so, why?
Answer:
yes
Explanation:
Because it is a new safer and more energy efficient way of producing energy
Explain with examples:
What are the reasons of a successful and unsuccessful software project?
Answer:
A good starting point is by addressing some of the key reasons software projects fail.
Explanation:
Not Enough Time. ...
Insufficient Budget. ...
Poor Communication. ...
Never Reviewing Project Progress. ...
Inadequate Testing. ...
Testing in the Production Environment. ...
Lack of Quality Assurance. ...
Not Conforming to Industry Standards.
User involvement, management support, reasonable requirements, and accurate projections are some of the most frequent aspects that contribute to software project success.
What is a software project?A software project is the entire process of developing software, from gathering requirements to testing and maintenance, carried out in accordance with execution techniques over a predetermined amount of time to produce the desired software output.
Some of the most frequent factors that influence the success of software projects are user interaction, management support, fair needs, and realistic estimates.
Application bug or error, environmental conditions, infrastructure or software failure, virus, hacker, network/hardware failure, and operator error are the main causes of software project failure.
According to the study, project success and failure are most heavily influenced by the degree of customer/user interaction, software process management, and estimation and timeline.
Thus, these are the reasons of a successful and unsuccessful software project.
For more details regarding software project, visit:
https://brainly.com/question/3818302
#SPJ2
If you notice that a worksheet displays columns A, B, C, E, and F, what happened to column D?
Answer:
HUDSU
Explanation:WGSDBHEUIWDBWJJ
Consider the following recursive method.
public static String doSomething(String str)
{
if (str.length() < 1)
{
return "";
}
else
{
return str.substring(0, 1) + doSomething(str.substring(1));
}
}
Which of the following best describes the result of the call doSomething(myString) ?
A
The method call returns a String containing the contents of myString unchanged.
B
The method call returns a String containing the contents of myString with the order of the characters reversed from their order in myString.
C
The method call returns a String containing all but the first character of myString.
D
The method call returns a String containing only the first and second characters of myString.
E
The method call returns a String containing only the first and last characters of myString.
Answer:
A
The method call returns a String containing the contents of myString unchanged.
Explanation:
what materials can I find at home and make a cell phone tower
Answer:
you cant
Explanation:
You simply cant make a tower from materials found in a household
Write a SELECT statement that displays each product purchased, the category of the product, the number of each product purchased, the maximum discount of each product, and the total price from all orders of the item for each product purchased. Include a final row that gives the same information over all products (a single row that provides cumulative information from all your rows). For the Maximum Discount and Order Total columns, round the values so that they only have two decimal spaces. Your result
Answer:
y6ou dont have mind
Explanation:
what name is given to the method used to copy a file onto a CD
Answer: Burn or Write
Explanation:
Burn is a colloquial term meaning to write content to a CD , DVD , or other recordable disc. DVD and CD drives with recording capabilities (sometimes called DVD or CD burner s) etch data onto the disks with a laser .
What is the command to launch each of the following tools? Local Group Policy Local Security Policy Computer Management console Local Users and Groups console Resultant Set of Policy (RSoP)
Answer:
The command for
Local Group Policy is GPedit.msc
Local Security Policy is SecPol.msc
Computer Management console is Compmgmt.msc
Local Users and Groups console is Lusrmgr.msc
Resultant Set of Policy is RSOP.msc
Explanation:
The command for
Local Group Policy is GPedit.msc
Local Security Policy is SecPol.msc
Computer Management console is Compmgmt.msc
Local Users and Groups console is Lusrmgr.msc
Resultant Set of Policy is RSOP.msc
What is the benefit of making an archive folder visible in the Outlook folder list?
This makes the folder available on the Office 365 website.
The folder can be password protected to increase security.
Archived items in the folder are accessible within the Outlook client.
Archived items in the folder can be shared with other Outlook users.
Answer:
a
Explanation:
Which of the follwing are examples of meta-reasoning?
A. She has been gone long so she must have gone far.
B. Since I usually make the wrong decision and the last two decisions I made were correct, I will reverse my next decision.
C. I am getting tired so I am probably not thinking clearly.
D. I am getting tired so I will probably take a nap.
Answer: B. Since I usually make the wrong decision and the last two decisions I made were correct, I will reverse my next decision.
C. I am getting tired so I am probably not thinking clearly
Explanation:
Meta-Reasoning simply refers to the processes which monitor how our reasoning progresses and our problem-solving activities and the time and the effort dedicated to such activities are regulated.
From the options given, the examples of meta reasoning are:
B. Since I usually make the wrong decision and the last two decisions I made were correct, I will reverse my next decision.
C. I am getting tired so I am probably not thinking clearly
Joseph learned in his physics class that centimeter is a smaller unit of length and a hundred centimeters group to form a larger unit of length called a meter. Joseph recollected that in computer science, a bit is the smallest unit of data storage and a group of eight bits forms a larger unit. Which term refers to a group of eight binary digits? A. bit B. byte O C. kilobyte D. megabyte
Answer:
byte
Explanation:
A byte is made up of eight binary digits
Write the Java classes for the following classes. Make sure each includes 1. instance variables 2. constructor 3. copy constructor Submit a PDF with the code The classes are as follows: Character has-a name : String has-a health : integer has-a (Many) weapons : ArrayList has-a parent : Character has-a level : Level (this should not be a deep copy) Level has-a name : String has-a levelNumber : int has-a previousLevel : Level has-a nextLevel : Level Weapon has-a name : String has-a strength : double Monster is-a Character has-a angryness : double has-a weakness : Weakness Weakness has-a name : String has-a description: String has-a amount : int
Answer:
Explanation:
The following code is written in Java. It is attached as a PDF as requested and contains all of the classes, with the instance variables as described. Each variable has a setter/getter method and each class has a constructor. The image attached is a glimpse of the code.
What is the creative strategy for music application.
Answer:
The City of Vancouver has allocated $300,000 to support the growth and development of the Vancouver Music Strategy, developed to address current gaps in the music ecosystem that support: Creating a sustainable, resilient, and vibrant music industry.
Explanation:
1 There are several applications to assist you to surf through the internet, mention
three (3 marks)
Which technologies combine to make data a critical organizational asset?
Answer: Is in the image I attached below of my explanation. Hope it helps! Have a wonderful day! <3
Explanation: Brainliest is appreciated, I need 2 more for my next last rank please!
A processor has word-addressable memory with all instructions of length 1 word (which is equal to 4 bytes). At a given point in time, the current instruction being executed has an operand field with the value 7C30. At this time, suppose the Program Counter contains the address 49A072, the register R3 contains the value 5600, and the register R4 contains the value 3A. All addresses and values above are in hex. For each of the following addressing modes, find the effective address of the operand:______.
a) Direct mode
b) PC-relative mode
c) Displacement mode with base register R3 and displacement given by the operand field
d) Indexed mode with index register R4 and base address given by the operand field
Answer:
i dont
Explanation:
know im lazy to do it but it looks easy just put some effort into it youg ot it!
What is the difference between an information system and a computer application?
Answer:
An information system is a set of interrelated computer components that collects, processes, stores and provides output of the information for business purposes
A computer application is a computer software program that executes on a computer device to carry out a specific function or set of related functions.