Answer:
Hello Dear!...Explanation:
The information-processing cycle consists of four basic operations: input, processing, output, and storage.
Hope that helps you Buddy..
Buhbye!
Take care!
Write one line of code to declare a 'Path' reference variable named: pathobject4 AND create the object by calling the 'Paths' class method get and passing it: C:/programs/values.dat Write one line of code to declare a Scanner reference variable named: my_input AND create the object passing the constructor the variable: fileobject3
Answer:
Explanation:
Using Java as the programming language of choice, the exact implementation of what is asked in the question would be the following, it would also need the file location to be exact and the imports in order to work.
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
class Test
{
public static void main(String[] args)
{
Path paths = new Paths("C:/programs/values.dat");
Scanner my_input = new Scanner(fileobject3);
}
}
Using a loop and indexed addressing, write code that rotates the members of a 32-bit integer array forward one position. The value at the end of the array must wrap around to the ?rst position. For example, the array [10,20,30,40] would be transformed into [40,10,20,30].
//begin class definition
public class Rotator{
//main method to execute the program
public static void main(String []args){
//create and initialize an array with hypothetical values
int [] arr = {10, 20, 30, 40};
//create a new array that will hold the rotated values
//it should have the same length as the original array
int [] new_arr = new int[arr.length];
//loop through the original array up until the
//penultimate value which is given by 'arr.length - 1'
for(int i = 0; i < arr.length - 1; i++ ){
//at each cycle, put the element of the
//original array into the new array
//one index higher than its index in the
//original array.
new_arr[i + 1] = arr[i];
}
//Now put the last element of the original array
//into the zeroth index of the new array
new_arr[0] = arr[arr.length - 1];
//print out the new array in a nice format
System.out.print("[ ");
for(int j = 0; j < new_arr.length; j++){
System.out.print(new_arr[j] + " ");
}
System.out.print("]");
}
}
Sample Output:[ 40 10 20 30 ]
Explanation:The code above is written in Java. It contains comments explaining important parts of the code. A sample output has also been provided.
what are the events?
Answer:
a thing that happens or takes place, especially one of importance.
Whatever programming language you use will ultimately need to be translated into binary in order for the computer to understand it.
a. True
b. False
Answer:
Javascript:
function translate(what) {
if (what) {
return 1;
} else if (!what) {
return 0;
}
}
translate(true);
Explanation:
True is 1;
False is 0;
StringReverser
Given the following code that creates a Scanner and gets a String from the user, finish the code so that the program will:
Output the provided String, input, backwards
Note that the answer should be one phrase - the reverse of input.
The use of an additional method is optional.
SAMPLE OUTPUT
======================
Enter a word or phrase:
this is a test
REVERSED:
tset a si siht
Answer:
Explanation:
The following code is written in Java, it uses the scanner import to take in a string from the user. Then it uses the string builder import to use the input string and reverse it. Finally outputting the reversed string. The output can be seen in the attached picture below.
import java.util.Scanner;
class Brainly
{
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a string: ");
String answer = in.nextLine();
StringBuilder sb=new StringBuilder(answer);
sb.reverse();
System.out.println("Reversed: \n" + sb.toString());
}
}
What is meant by a balanced budget?
A. inflows are greater than outflows
B. inflows are less than outflows
C. inflows are equal to income
D.inflows are greater than or equal to outflows.
Answer:
D.inflows are greater than or equal to outflows.
Explanation:
A budget is a financial plan used for the estimation of revenue and expenditures of an individual, organization or government for a specified period of time, often one year. Budgets are usually compiled, analyzed and re-evaluated on periodic basis.
A balanced budget is a type of budget in which inflows are greater than or equal to outflows. Thus, when cash inflows (income) is greater than or equal to cash outflows (expenses), a budget is said to be balanced.
The first step of the budgeting process is to prepare a list of each type of income and expense that will be integrated or infused into the budget.
This ultimately implies that, before preparing a budget, it is of utmost importance to know total income (inflows) and expenses (outflows).
The final step to be made by the management of an organization in the financial decision-making process is to make necessary adjustments to the budget.
In conclusion, the benefits of having a budget is that it aids in setting goals, earmarking revenues and resources, measuring outcomes and planning against contingencies. It is typically used by individuals, government, organizations or companies due to the fact that, it's tied directly to the strategy and tactics of a company on an annual basis. Also, it is used to set a budget for marketing efforts while anticipating on informations about the company.
In the following cell, we've loaded the text of Pride and Prejudice by Jane Austen, split it into individual words, and stored these words in an array p_and_p_words. Using a for loop, assign longer_than_five to the number of words in the novel that are more than 5 letters long. Hint: You can find the number of letters in a word with the len function.
Answer:
Explanation:
Since the array is not provided, I created a Python function that takes in the array and loops through it counting all of the words that are longer than 5. Then it returns the variable longer_than_five. To test this function I created an array of words based on the synapse of Pride and Prejudice. The output can be seen in the attached picture below.
def countWords(p_and_p_words):
longer_than_five = 0
for word in p_and_p_words:
if len(word) > 5:
longer_than_five += 1
return longer_than_five