Write a void function SelectionSortDescendTrace() that takes an integer array and sorts the array into descending order. The function should use nested loops and output the array after each iteration of the outer loop, thus outputting the array N-1 times (where N is the size). Complete main() to read in a list of up to 10 positive integers (ending in -1) and then call the SelectionSortDescendTrace() function. If the input is:
Answer:
Explanation:
The following program is written in Java. The main method asks the user to enter 10 different integer values. These values are saved to an integer array and passed to the SelectionSortDescendTrace() method. This method sorts the array in descending order while printing the entire array after every outer loop cycle. The program was tested and the output can be seen in the attached image below.
import java.util.*;
class Brainly {
// Main Method
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int[] myArr = new int[10];
for (int i = 0; i < 10; i++) {
System.out.print("Enter an integer: ");
myArr[i] = in.nextInt();
System.out.print('\n');
}
SelectionSortDescendTrace(myArr);
}
public static void SelectionSortDescendTrace(int[] myArr) {
int temp;
for (int i = 0; i < myArr.length; i++)
{
for (int j = 0; j <myArr.length; j++)
{
if (j != myArr.length - 1)
{
if (myArr[j] < myArr[j + 1])
{
temp = myArr[j];
myArr[j] = myArr[j + 1];
myArr[j + 1] = temp;
}
}
}
System.out.println(Arrays.toString(myArr));
}
}
}
Give examples of applications that access files by each of the following methods:
+ Sequentially.
+ Random.
Answer:
Explanation:
Usually, applications would have the capability of using either one of these options. But for the sake of the question here are some that usually prefer one method over the other.
Any program that targets an API usually uses Sequential access. This is because API's contain all of the data as objects. Therefore, you need to access that object and sequentially navigate that object to the desired information in order to access the data required.
A music application would have access to an entire folder of music. If the user chooses to set the application to randomly play music from that folder, then the application will use a Random Access method to randomly choose the music file to load every time that a song finishes.
explain the working principle of computer? can anyone tell
Answer:
input process and output hehe
Arrays are commonly used to store data items. Arrays can be managed in ways that fill, iterate over, add to, and delete items from the array. Why is it useful to store multiple pieces of information?
Answer:
mark me brainlist
Explanation:
Type the correct answer in the box. Spell all words correctly.
Which testing requires coding the test cases into a scripting language?
testing requires coding the test cases into a scripting language.
Answer:
sorry I forgot it
Explanation:
because I am now in a last position
Write a program that takes a date as input and outputs the date's season. The input is an integer to represent the month and an integer to represent the day. Ex: If the input is: 4 11 the output is: spring In addition, check if both integers are valid (an actual month and day). Ex: If the input is: 14 65 the output is: invalid The dates for each season are: spring: March 20 - June 20 summer: June 21 - September 21 autumn: September 22 - December 20 winter: December 21 - March 19
Answer:
Explanation:
The following program is written in Java. It is a function that takes in the two parameters, combines them as a String, turns the combined String back into an integer, and uses a series of IF statements to check the parameters and determine which season it belongs to. Then it prints the season to the screen. The code has been tested with the example provided in the question and the output can be seen in the attached image below.
class Brainly {
public static void main(String[] args) {
getSeason(4, 65);
getSeason(4, 11);
}
public static void getSeason(int month, int day) {
String combined = String.valueOf(month) + String.valueOf(day);
int combinedInt = Integer.parseInt(combined);
if ((month > 0 && month < 12) && (day > 0 && day < 31)) {
if ((combinedInt >= 320) && (combinedInt <= 620)) {
System.out.println("The Season is Spring");
} else if ((combinedInt >= 621) && (combinedInt <= 921)) {
System.out.println("The Season is Summer");
} else if ((combinedInt >= 922) && (combinedInt <= 1220)) {
System.out.println("The season is Autumn");
} else {
System.out.println("The Season is Winter");
}
} else {
System.out.println("Invalid date");
}
}
}
Explain the purpose of the open() and close() operations.
Answer:
The open() operation notifies the system that the named file is about to become active. The close() operation notifies the system that the named file is no longer in active use by the user who issued the close operation.
Discuss the OSI Layer protocols application in Mobile Computing
Answer:
The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the functions of a networking system. The OSI model characterizes computing functions into a universal set of rules and requirements in order to support interoperability between different products and software.
In order to print multiple worksheets, what needs to happen before printing?
Answer:
Explanation:
Click the File tab.
Click Print, or press the control p keyboard command.
On the Print screen, select the printer and other settings.
Click Print.
You have n warehouses and n shops. At each warehouse, a truck is loaded with enough goods to supply one shop. There are m roads, each going from a warehouse to a shop, and driving along the ith road takes d i hours, where d i is an integer. Design a polynomial time algorithm to send the trucks to the shops, minimising the time until all shops are supplied.
Following are the steps of the polynomial-time algorithm:
Split the routes according to their categorizationAssuming that mid = di of the middle road, low = road with the least di, and high = road with the highest di, we may do a binary search on the sorted list.All shops must be approachable only using these roads for every road, from low to mid.Check if all shops can be reached from[tex]\bold{ low \ to\ mid+1}[/tex] using only these roads.There is a solution if every shop can be reached by road only up to [tex]\bold{mid+1}[/tex], but not up to mid.You can [tex]\bold{set \ low = mid+1}[/tex] if all businesses aren't accessible using both [tex]\bold{mid\ and\ mid+1}[/tex] roads.If every shop could be reached using both mid and mid+1, then set high to mid-1.With these layouts of businesses and roads, no response can be given because [tex]\bold{ low > high}[/tex]You can do this by [tex]\bold{set\ mid = \frac{(low + high)}{2}}[/tex]The new low, mid, and high numbers are used in step (a).In a minimum amount of time, this algorithm will determine the best strategy to supply all shops.
Learn more:
polynomial-time algorithm: brainly.com/question/20261998
What is the importance of using Onedrive in Windows 10 and how knowledge of it will have an impact in today's workplace?
The importance of one drive in windows 10 is that it helps the user to synchronize files in their computer.
Onedrive is a cloud storage system that is useful for the storage of files in a secured manner. A person can easily access their files whenever they want to.
In todays workplace a knowledge of onedrive has a great impact because
Onedrive offers an unlimited access to files whenever they are neededThe files can be available and accessed from anywhereIt helps with the organization of files in the work place.One drive allows for this to be done even when offline. When online, there is an automatic synchronization of the made changes.
Read more at https://brainly.com/question/17163678?referrer=searchResults
Learn more:
brainly.com/question/24369537
A _______ read inputs the first data item from a file. It typically appears immediately before the loop that processes the data from the file and inputs the remaining data from the file.
Answer:
the answer is priming read
Explanation:
hope it helps u
g Add a throw statement to the processNumbers function that throws the message "An element in the list is not a number." if one of the elements in toProcess is not a number. Hint: The function isNaN() returns true if the parameter is not a number.
Answer and Explanation:
function processNumbers(alist){
var Ourarray= new array(alist);
Ourarray.foreach(
if(isNaN()){
Console.log( "An element in the list is not a number."};
break;
}
}
processNumbers(alist)
From the above, we have defined a function that takes an array parameter(the following array variable will make sure of that). We test each element in the array using foreach array function. The for each function runs the if statement and if isNan is true for each of the elements in the array.
26. The
operator will cause a record to
be selected only if two or more
conditions are satisfied
In MS access
Answer:
AND
The AND operator will cause a record to be selected only if two or more
conditions are satisfied.
Discuss the DMA process
Answer:
Direct memory access (DMA) is a process that allows an input/output (I/O) device to send or receive data directly to or from the main memory, bypassing the CPU to speed up memory operations and this process is managed by a chip known as a DMA controller (DMAC).
Explanation:
A defined portion of memory is used to send data directly from a peripheral to the motherboard without involving the microprocessor, so that the process does not interfere with overall computer operation.
In older computers, four DMA channels were numbered 0, 1, 2 and 3. When the 16-bit industry standard architecture (ISA) expansion bus was introduced, channels 5, 6 and 7 were added.
ISA was a computer bus standard for IBM-compatible computers, allowing a device to initiate transactions (bus mastering) at a quicker speed. The ISA DMA controller has 8 DMA channels, each one of which associated with a 16-bit address and count registers.
ISA has since been replaced by accelerated graphics port (AGP) and peripheral component interconnect (PCI) expansion cards, which are much faster. Each DMA transfers approximately 2 MB of data per second.
A computer's system resource tools are used for communication between hardware and software. The four types of system resources are:
I/O addresses Memory addresses. Interrupt request numbers (IRQ). Direct memory access (DMA) channels.DMA channels are used to communicate data between the peripheral device and the system memory. All four system resources rely on certain lines on a bus. Some lines on the bus are used for IRQs, some for addresses (the I/O addresses and the memory address) and some for DMA channels.
A DMA channel enables a device to transfer data without exposing the CPU to a work overload. Without the DMA channels, the CPU copies every piece of data using a peripheral bus from the I/O device. Using a peripheral bus occupies the CPU during the read/write process and does not allow other work to be performed until the operation is completed.
With DMA, the CPU can process other tasks while data transfer is being performed. The transfer of data is first initiated by the CPU. The data block can be transferred to and from memory by the DMAC in three ways.
In burst mode, the system bus is released only after the data transfer is completed. In cycle stealing mode, during the transfer of data between the DMA channel and I/O device, the system bus is relinquished for a few clock cycles so that the CPU can perform other tasks. When the data transfer is complete, the CPU receives an interrupt request from the DMA controller. In transparent mode, the DMAC can take charge of the system bus only when it is not required by the processor.
However, using a DMA controller might cause cache coherency problems. The data stored in RAM accessed by the DMA controller may not be updated with the correct cache data if the CPU is using external memory.
Solutions include flushing cache lines before starting outgoing DMA transfers, or performing a cache invalidation on incoming DMA transfers when external writes are signaled to the cache controller.
Answer:
See explanation
Explanation:
DMA [tex]\to[/tex] Direct Memory Access.
The peripherals of a computer system are always in need to communicate with the main memory; it is the duty of the DMA to allow these peripherals to transfer data to and from the memory.
The first step is that the processor starts the DMA controller, then the peripheral is prepared to send or receive the data; lastly, the DMA sends signal when the peripheral is ready to carry out its operation.
e) Point out the errors( if any) and correct them:-
class simple
{
inta,b,c;
double sumNumber
{
int d = a + b + c;
double e = d/5.6;
return e;
}
void show Number()
{
a = 10, b = 20, c=5;
System.out.println(d);
double f = sumNumber(a,b,c);
System.out.print(e);
}
}
Explanation:
double e-d/5.6;is wrong it should return to c
Instructions
Create a multimedia project that contains the text element and all the contents that you have studied about that element
Answer:
iiiio888887776558777u765
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….
a. Margin
b. View
c. LayOut
d. Paragraph
Office 92 sering disebut juga dengan….
a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah
B.View
Office 92 sering disebut juga dengan
A.Office 3.0
Components of micro computer with diagram
Answer:
CPU, Program memory, Data memory, Output ports, Input ports and Clock generator.
Explanation:
There are six basic components of a microcomputer which includes CPU, Program memory, Data memory, Output ports, Input ports and Clock generator. CPU is the central processing unit which is considered as the brain of the computer. It is the part of a computer that executes instructions. Data memory is the place where data is stored that is present in the CPU.
what are the functions of language in logic?
Answer:
Three basic functions of language: Informative, Expressive, and Directive Language
Informative language. Simply put, informative language can be looked at as though it is either right or wrong, or true or falseExpressive languageDirective languageChất xơ có nhiều trong thực phẩm nào?
Answer: rau củ quả đều có lượng chất xơ nhiều hơn so với các loại thực phẩn khác
Explanation:
Select the scenario that describes a top-down approach to data warehouse design.
Cathy’s Cards and Gifts, which has three stores, creates data marts for its sales, marketing, and delivery departments to study the possibility of establishing a new store.
Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.
Cynthia’s Florals, which is dealing with debt, creates new data marts for the service, delivery, and sales departments to develop a strategy to stay in business.
Connor’s Meat Market, which just opened, creates data marts to track the sale of each of the following meats: beef, pork, lamb, and fish.
Answer:
Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.
The scenario defines a top-down approach to data warehouse design as "Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed".
What is a top-down approach to data warehouse design?In the "Top-Down" method system, a data warehouse exists defined as a subject-oriented, time-variant, non-volatile, and integrated data storage for the entire business data from various sources exist validated, reformatted, and saved in a normalized (up to 3NF) database as the data warehouse.
Therefore, the correct answer is option b) Crawford's Fabrics, which wants to expand its operations, combines data from the purchasing and sales departments into a central database, to be divided into new data marts as needed.
To learn more about warehouse design
https://brainly.com/question/25885061
#SPJ2
T
N
O
?
You can insert only the row
only to
True or false
false
Explanation:
good luck bro
have a great day
Answer:
false
Explanation:
Mobile computing is growing in importance each and every day, and the IT manager must take that into account. Do some web research and develop a one-page description of the five most important things about HCI of mobile computing that the IT manager should know.
Answer:
phone grows everyday 82 percent
Explanation:
Where does change management play a major role in transforming a client
business into a data-driven, intelligent enterprise?
To manage a modern IT environment characterized by hybrid complexity and exponential data growth — and to make that same IT a driver of growth and innovation for the business — you need to build intelligence into every layer of your infrastructure.
Change management plays a major role in transforming a client business into a data-driven, intelligent enterprise in: data culture and literacy.
Data culture and literacy refer to all the processes involved in analyzing and understanding data within the framework of an organization.
The employees within such organizations are trained to read and understand data. It becomes a part of the organization's culture.
So data culture and literacy should be used when trying to transform a client business into a data-driven, intelligent enterprise.
Learn more about data culture here:
https://brainly.com/question/21810261
explain computer coding in an understandable manner
Answer:
Coding is simply how we communicate with computers. Code tells a computer what actions to take, and writing code is like creating a set of instructions
Explanation:
Computer coding empowers kids to not only consume digital media and technology, but to create it. Instead of simply playing videogame or envision what their own website, or app might look like and they'll have the outlet for the expression
Alexis received an email message from an unknown sender that included an attachment.
If she opens the attachment, what kind of malicious software might be activated, and what are the consequences?
Opening the attachment would release a worm, which would infect her system with a virus.
Opening the attachment would release a worm, which would infect her system with spyware.
Opening the attachment would release an active worm, which would infect her system with adware.
Opening the attachment would release a passive worm, which would infect her system with adware.
Answer:
Opening the attachment would release a worm, which would infect her system with a virus.
Answer: B. Opening the attachment would release a worm, which would infect her system with a virus.
Write a program named lastname_firstname_cities.py that works with information about large cities. Your program will open the cities.txt downloadfile. Each line in the file has the name of a city, its country, and its population. The first few lines of the file look like this:
Answer and Explanation:
Open your text editor and open new file. Save new file file as lastname_firstname_cities.py. The program will open the file cities.txt downloadfile hence :
dfile= open(cities.txt, "r")
If we write this into our lastname_firstname_cities.py file it will open our cities.txt downloadfile in read mode and text mode(by default unless we specify binary mode which is for images)
I connected to an external hard drive to transfer some photos from my vacation. When I try to drag the photo, it bounces right back and does not transfer. What is the likely cause of this issue?
a. hard drive is full
b. photos were taken in a different country
c. USB port is broken
d. the file structure of the 2 hard drives are not compatible
The answer is D, What is the likely cause of this issue is that the file structure of the two hard drives are not compatible.
The file structure or file system, of a hard drive, tells the disk how to read, write and store information on the drive. Some file systems do not allow the disk to store any files and often do not display error messages. If we try to drag a file onto a hard drive with this kind of file structure, the action would simply not be performed. This can be fixed by formatting the disk partition into a new file system.
Option B states that the issue may be that the photos were taken in a different country. This is not the cause of the problem because regardless of where the pictures are taken, they are all stored in common formats such as:
JPEGPNGJFIFAny external hard drive capable of storing images will have the ability to receive files in these formats as well as many other image formats. For this reason, option B is False.
The question states that you were able to connect the external Hard drive and drag files onto it, though unsuccessfully. This tells us that the USB port is working as intended, if it were not working, it would not display the Hard drive onto the computer and we would not be able to drag files to it. Therefore, option C is false
Insufficient Hard drive storage space is a common issue in not being able to transfer files between hard drives. However, if this were the case, the user would be shown a message displaying the error. The message may look like:
"Insufficient space on the disk.""The Disk is full.""Not enough memory to complete this action"The exact wording may vary depending on the operating system in use. Since the question states that the files simply "bounces back" without an error message displaying, we can infer that option A is false.
For more help with Hard drive issues see: https://brainly.com/question/14254444?referrer=searchResults
What do you do if your computer dies/malfunctions? Reboot (Restart) Shut Down Recovery CD and Recover your system Call a person to fix it
Answer:
Restart
Explanation:
Simply I may restart my pc if it dies/malfunctions. I'll not restart immediately, I'll wait for an hour and do restart my computer. If it doesn't work then maybe I'll Call a person to fix it.