Derive the three-dimensional transformation matrix for scaling an object by a scaling factor s in a direction defined by the direction cosines alpha , beta , gamma
Answer:
i dont know
Explanation:
i dont knoe im doing this for the points hehe
This lab was designed to teach you more about using Scanner to chop up Strings. Lab Description : Take a group of numbers all on the same line and average the numbers. First, total up all of the numbers. Then, take the total and divide that by the number of numbers. Format the average to three decimal places Sample Data : 9 10 5 20 11 22 33 44 55 66 77 4B 52 29 10D 50 29 D 100 90 95 98 100 97 Files Needed :: Average.java AverageRunner.java Sample Output: 9 10 5 20 average = 11.000 11 22 33 44 55 66 77 average = 44.000 48 52 29 100 50 29 average - 51.333 0 average - 0.000 100 90 95 98 100 97 average - 96.667
Answer:
The program is as follows:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String score;
System.out.print("Scores: ");
score = input.nextLine();
String[] scores_string = score.split(" ");
double total = 0;
for(int i = 0; i<scores_string.length;i++){
total+= Double.parseDouble(scores_string[i]); }
double average = total/scores_string.length;
System.out.format("Average: %.3f", average); }
}
Explanation:
This declares score as string
String score;
This prompts the user for scores
System.out.print("Scores: ");
This gets the input from the user
score = input.nextLine();
This splits the scores into an array
String[] scores_string = score.split(" ");
This initializes total to 0
double total = 0;
This iterates through the scores
for(int i = 0; i<scores_string.length;i++){
This calculates the sum by first converting each entry to double
total+= Double.parseDouble(scores_string[i]); }
The average is calculated here
double average = total/scores_string.length;
This prints the average
System.out.format("Average: %.3f", average); }
}
Write the following generic method that sorts an ArrayList of Comparable items. The sort method must use the compareTo method.
public static > void sort(ArrayList list)
Write a test program that:
1. prompts the user to enter 10 integers, invokes this method to sort the numbers, and displays the numbers in ascending order
2. prompts the user to enter 5 strings, invokes this method to sort the strings, and displays the strings in ascending (alphabetical) order
Answer:
Explanation:
The following code is written in Java, it prompts the user to enter 10 integers and saves them to an ArrayList. Then it prompts for 5 strings and saves them to another ArrayList. Then, it calls the sort method and adds the lists as parameters. Finally, it prints out both lists completely sorted in ascending order.
import java.util.ArrayList;
import java.util.Scanner;
class Division{
public static double division(double a, double b) throws Exception {
if(b == 0)
//throw new Exception("Invalid number.");
return (a / b);
return a / b;
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
ArrayList<Integer> mylist2 = new ArrayList<>();
for (int x = 0; x < 10; x++) {
System.out.println("Please Enter a Number: ");
int number = in.nextInt();
mylist2.add(number);
}
ArrayList<String> mylist = new ArrayList<>();
for (int x = 0; x < 5; x++) {
System.out.println("Please Enter a Word: ");
String word = in.nextLine();
mylist.add(word);
}
sort(mylist);
sort(mylist2);
for (String x: mylist) {
System.out.print(x + ", ");
}
System.out.println("");
for (int x: mylist2) {
System.out.print(x + ", ");
}
}
public static <E extends Comparable<E>> ArrayList<E> sort(ArrayList<E> list) {
E temp;
if (list.size()>1) // check if the number of orders is larger than 1
{
for (int x=0; x<list.size(); x++) // bubble sort outer loop
{
for (int i=0; i < list.size() - x - 1; i++) {
if (list.get(i).compareTo(list.get(i+1)) > 0)
{
temp = list.get(i);
list.set(i,list.get(i+1) );
list.set(i+1, temp);
}
}
}
}
return list;
}}
there are several application to assist you to surf through the internet mention three regarding computer
Answer:
E-mailweb browsingpeer-to peer servicesQuestion 20:
Which of the following scenarios involve computers making predictions based on the analysis of
patterns in large data sets?
Select two answers.
Astate education board analyzing demographic information and academic records to identify students at risk
of dropping out of school.
The federal government analyzing state spending data to identify which states spent the most on social
services
A video streaming service analyzing viewer's habits to suggest videos based on the viewing history of other
viewers.
An airline analyzing flight records to determine the routes it operates with the least bookings.
Answer:
A video streaming service analyzing viewer’s habits to suggest videos based on the viewing history of other viewers.
A state education board analyzing demographic information and academic records to identify students at risk of dropping out of school.
Explanation:
I just took the test and passed when you have multiple choice questions always pick ones that similar to each other and make sure it fit the question.
Animation timing is does not affect the
speed of the presentation
Select one:
True
False
Answer:
True
Explanation:
I think it's true.....
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This adjustment can be done by normalizing to values between 0 and 1, or throwing away outliers.
For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print('{:.2f}'.format(your_value))
Ex: If the input is:
5 30.0 50.0 10.0 100.0 65.0
the output is:
0.30 0.50 0.10 1.00 0.65
The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is divided by 100.0.
For coding simplicity, follow every output value by a space, including the last one
1 #include
2 #include
3 #include
4 using namespace std;
5
6 int main() {
7
8 /* Type your code here. */
9
10 return 0;
11 }
12
Answer:
5.23 LAB: Adjust values in a list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers.
Explanation:
Discuss the relationship of culture and trends?
The ____ character is allowable in a folder name. Select one: a. < b. : c. / d. -
Answer:
d. - is allowed in a folder name.
The code below assigns the 5th letter of each word in food to the new list fifth. However, the code currently produces errors. Insert a try/except clause that will allow the code to run and produce of list of the 5th letter in each word. If the word is not long enough, it should not print anything out. Note: The pass statement is a null operation; nothing will happen when it executes.
food = ["chocolate", "chicken", "corn
fifth = []
for x in food:
fifth.append(x[4])
Answer:
Answered below
Explanation:
foods = ["chocolate", "chicken", "corn"]
fifth_char = []
for food in foods:
"""Add a try statement to add fifth character to fifth_char list. If word is not long enough, the except part executes the the pass and nothing is printed.""'
try:
fifth_char.append(food[4])
except:
pass
#print out elements in new list
for c in fifth_char:
print(c)
g Write an UPDATE statement that changes the address for the row with vendor_id 4 so the suite number (Ste 260) is stored in vendor address instead of vendor address 1. Then, use SQL Developer to verify the change (you may need to click the Refresh button at the top of the Data tab to see the change). If this works correctly, go back to the tab for the UPDATE statement and click the Commit button to commit the change.
Answer:
UPDATE 'Vendors' SET 'address' = 'Ste 260' WHERE 'vendor_id' = 4
Explanation:
Required
Write an update statement
The question is incomplete as the table name is not given.
So, I will make the following assumptions.
Table name = Vendors
So, the update statement is:
UPDATE 'Vendors' SET 'address' = 'Ste 260' WHERE 'vendor_id' = 4;
The above statement queries the vendors table and changes the address of vendor_id 4 from the initial value to Ste 260
SOMEONE PLS HELP?!?!!
Answer:
B. To continuously check the state of a condition.
Explanation:
The purpose of an infinite loop with an "if" statement is to constantly check if that condition is true or false. Once it meets the conditions of the "if" statement, the "if" statement will execute whatever code is inside of it.
Example:
//This pseudocode will print "i is even!" every time i is an even number
int i = 0;
while (1 != 0) //always evaluates to true, meaning it loops forever
i = i + 1; // i gets incrementally bigger with each loop
if ( i % 2 == 0) //if i is even....
say ("i is even!"); //print this statement
What is a font?
O How the text for a paragraph appears
O A display of text characters in a specific style and size
O Text that has been made bold
O Artistic elements you can add to text
Complete the problem about Olivia, the social worker, in this problem set. Then determine the telecommunications tool that would best meet Olivia's needs.
PDA
VoIP
facsimile
Internet
Answer:
PDA is the correct answer to the following answer.
Explanation:
PDA refers for Programmable Digital Assistant, which is a portable organizer that stores contact data, manages calendars, communicates via e-mail, and manages documents and spreadsheets, typically in conjunction with the user's personal computer. Olivia needs a PDA in order to communicate more effectively.
Which of the following describes a codec? Choose all that apply.
a computer program that saves a digital audio file as a specific audio file format
short for coder-decoder
converts audio files, but does not compress them
Answer:
A, B
Explanation:
What does an operating system provide so you can interact with a device
Answer:
Operating system software provides the user interface for interacting with the hardware components, whereas application software enables you to accomplish specific tasks.
Explanation:
please give me brainlist and follow
An operating system provides graphical user interface, which enables the user to interact seamlessly with a computer device.
Graphical user interface (GUI) provides user-friendly visual representations to help the user to manage the human interaction with the device via the operating system.
Some graphical user interface tools include icons, menus, and mouse.
Thus, with visual representations of data and operating instructions, users are able to understand the operating system and interact easily with the computer device.
Read more about graphical user interface at https://brainly.com/question/16956142
Suppose you are choosing between the following three algorithms:
• Algorithm A solves problems by dividing them into five subproblems of half the size, recursively solving each subproblem, and then combining the solutions in linear time.
• Algorithm B solves problems of size n by recursively solving two subproblems of size n − 1 and then combining the solutions in constant time.
• Algorithm C solves problems of size n by dividing them into nine sub-problems of size n=3, recursively solving each sub-problem, and then combining the solutions in O(n2) time.
What are the running times of each of these algorithms (in big-O notation), and which would you choose?
Answer:
Algorithm C is chosen
Explanation:
For Algorithm A
T(n) = 5 * T ( n/2 ) + 0(n)
where : a = 5 , b = 2 , ∝ = 1
attached below is the remaining part of the solution
Consider the following recursive method, which is intended to display the binary equivalent of a decimal number. For example, toBinary(100) should display 1100100.
public static void toBinary(int num)
{
if (num < 2)
{
System.out.print(num);
}
else
{
/* missing code */
}
}
Which of the following can replace /* missing code */ so that toBinary works as intended?
a. System.out.print(num % 2);
toBinary(num / 2);
b. System.out.print(num / 2);
toBinary(num % 2);
c. toBinary(num % 2);
System.out.print(num / 2);
d. toBinary(num / 2);
System.out.print(num % 2);
e. toBinary(num / 2);
System.out.print(num / 2);
Answer:
D) toBinary(num / 2);
System.out.print(num % 2);
Explanation:
Use the drop-down menus to explain how to locate the Consolidate dialog box.
1. Select the ------------
tab on the ribbon.
2. Look in the ----------
group and select -----------
.
Answer:
data, data tools, consolidate
Explanation:
I just did it :)
Time-management techniques work most effectively when performed in which order?
prioritize tasks, reward system, study-time survey, project schedule
project schedule, study-time survey, reward system, prioritize tasks
reward system, prioritize tasks, project schedule, study-time survey
study-time survey, project schedule, prioritize tasks, reward system
Answer:
study-time survey, project schedule, prioritize tasks, reward system.
Explanation:
Time management can be defined as a strategic process which typically involves organizing, planning and controlling the time spent on an activity, so as to effectively and efficiently enhance productivity. Thus, when time is properly managed, it avails us the opportunity to work smartly rather than tediously (hardly) and as such making it possible to achieve quite a lot within a short timeframe. Also, a good time management helps us to deal with work-related pressures and tight schedules through the process of properly allocating the right time to the right activity.
Hence, time-management techniques work most effectively when performed in the following sequential order; study-time survey, project schedule, prioritize tasks, and designing (creating) a reward system.
Answer:
The Answer is:
D. study-time survey, project schedule, prioritize tasks, reward system
Explanation:
got it right on edge
5.27 LAB*: Program: Soccer team roster (Vectors)
This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balanced team.
(1) Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jersey numbers in one int vector and the ratings in another int vector. Output these vectors (i.e., output the roster). (3 pts)
Ex:
Enter player 1's jersey number:
84
Enter player 1's rating:
7
Enter player 2's jersey number:
23
Enter player 2's rating:
4
Enter player 3's jersey number:
4
Enter player 3's rating:
5
Enter player 4's jersey number:
30
Enter player 4's rating:
2
Enter player 5's jersey number:
66
Enter player 5's rating:
9
ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
...
(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing. (2 pts)
Ex:
MENU
a - Add player
d - Remove player
u - Update player rating
r - Output players above a rating
o - Output roster
q - Quit
Choose an option:
(3) Implement the "Output roster" menu option. (1 pt)
Ex:
ROSTER
Player 1 -- Jersey number: 84, Rating: 7
Player 2 -- Jersey number: 23, Rating: 4
...
(4) Implement the "Add player" menu option. Prompt the user for a new player's jersey number and rating. Append the values to the two vectors. (1 pt)
Ex:
Enter a new player's jersey number:
49
Enter the player's rating:
8
(5) Implement the "Delete player" menu option. Prompt the user for a player's jersey number. Remove the player from the roster (delete the jersey number and rating). (2 pts)
Ex:
Enter a jersey number:
4
(6) Implement the "Update player rating" menu option. Prompt the user for a player's jersey number. Prompt again for a new rating for the player, and then change that player's rating. (1 pt)
Ex:
Enter a jersey number:
23
Enter a new rating for player:
6
(7) Implement the "Output players above a rating" menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value. (2 pts)
Ex:
Enter a rating:
5
Answer:
Explanation:
The following code is written in Java and loops five times asking for the desired inputs from the user and saves that information in two Vectors named jerseyNumber and ratings. Then creates a while loop for the menu and a seperate method for each of the options...
import java.util.Scanner;
import java.util.Vector;
class Brainly {
static Scanner in = new Scanner(System.in);
static Vector<Integer> jerseyNumber = new Vector<>();
static Vector<Integer> ratings = new Vector<>();
public static void main(String[] args) {
for (int x = 0; x < 5; x++) {
System.out.println("Enter player " + (x+1) + "'s jersey number:");
jerseyNumber.add(in.nextInt());
System.out.println("Enter player " + (x+1) + "'s rating:");
ratings.add(in.nextInt());
}
boolean reloop = true;
while (reloop == true) {
System.out.println("Menu");
System.out.println("a - Add player");
System.out.println("d - Remove player");
System.out.println("u - Update player rating");
System.out.println("r - Output players above a rating");
System.out.println("o - Output roster");
System.out.println("q - Quit");
char answer = in.next().charAt(0);
switch (answer) {
case 'a': addPlayer();
break;
case 'd': removePlayer();
break;
case 'u': updatePlayer();
break;
case 'r': outputRating();
break;
case 'o': outputRoster();
break;
case 'q': System.exit(0);
reloop = false;
break;
}
}
}
public static void addPlayer() {
System.out.println("Enter player's jersey number:");
jerseyNumber.add(in.nextInt());
System.out.println("Enter player's rating:");
ratings.add(in.nextInt());
}
public static void removePlayer() {
System.out.println("Enter Jersey number:");
int number = in.nextInt();
for (int x = 0; x < jerseyNumber.size(); x++) {
if (jerseyNumber.get(x) == number) {
jerseyNumber.remove(x);
ratings.remove(x);
}
}
}
public static void updatePlayer() {
System.out.println("Enter Jersey number:");
int number = in.nextInt();
System.out.println("Enter new Rating:");
int rating = in.nextInt();
for (int x = 0; x < jerseyNumber.size(); x++) {
if (jerseyNumber.get(x) == number) {
ratings.set(x, rating);
}
}
}
public static void outputRating() {
System.out.println("Enter Rating:");
int rating = in.nextInt();
for (int x = 0; x < ratings.size(); x++) {
if (ratings.get(x) >= rating) {
System.out.println(jerseyNumber.get(x));
}
}
}
public static void outputRoster() {
for (int x = 0; x < jerseyNumber.size(); x++) {
System.out.println("Player " + (x+1) + " -- Jersey number: " + jerseyNumber.get(x) + ", Rating: " + ratings.get(x));
}
}
}
Write a recursive method called permut that accepts two integers n and r as parameters and returns the number of unique permutations of r items from a group of n items. For given values of n and r, this value P(n, r) can be computed as follows:
n!/(n - r)!
For example , permut (7, 4) should return 840.
Answer:
Following are the code to the given question:
public class Main//defining a class Main
{
static int permut(int n, int r)//defining a method permut that holds two variable
{
return fact(n)/fact(n-r);//use return keyword to return calcuate value
}
static int fact(int n)//defining a fact method as recursive to calculate factorials
{
return n==0?1:n*fact(n-1);//calling the method recursively
}
public static void main(String[] abs)//main function
{
//int n=7,r=4;//defining integer variable
System.out.println(permut(7,4));//use print method to call permut method and print its values
}
}
Output:
840
Explanation:
Following is the explanation for the above code.
Defining a class Main.Inside the class two methods, "permut and fact" were defined, in which the "permut" accepts two values for calculating its permutated value, and the fact is used for calculates factorial values recursively. At the last, the main method is declared, which uses the print method to call "permut" and prints its return values.Which range of values would result in 10 elements stored in an array?
1-11
0-9
0-10
2-12
Answer:
0-9
Explanation:
count 0 as 1
len(0,1,2,3,4,5,6,7,8,9)=10
To use cache memory main memory are divided into cache lines typically 32 or 64 bytes long.an entire cache line is cached at once what is the advantage of caching an entire line instead of single byte or word at a time?
Answer:
The advantage of caching an entire line in the main memory instead of a single byte or word at a time is to avoid cache pollution from used data
Explanation:
The major advantage of caching an entire line instead of single byte is to reduce the excess cache from used data and also to take advantage of the principle of spatial locality.
The vulnerabilities common to the software development process, including buffer overflows, race conditions, input validation attacks, authentication attacks, authorization attacks, and cryptographic attacks, and how we might mitigate these by following secure coding guidelines. Besides protecting O S software on hosts, there is a need to protect applications that run on these devices. Aspects of application security includes all except:____.
A. Application development security.
B. Secure coding techniques.
C. Code testing.
D. Requirement Assessment.
Answer:
Aspects of application security includes all except:____.
D. Requirement Assessment.
Explanation:
The requirement assessment is carried out during the initial development stage to meet the user's requirements. This assessment does not necessarily deal with application security. However, the other three aspects are security-related. They focus on the areas where application security is mostly required to reduce errors and technical weaknesses of a software, including authentication, privacy, access control, data segregation, and error handling.
Explain the paging concept and main disadvantages of pipelined
approaches? Compare the superscalar and super pipelined approaches
with block diagram?
Answer:
PAGINACIÓN En la gestión de memoria con intercambio, cuando ... Debido a que es posible separar los módulos, se hace más fácil la modificación de los mismos. ... Ventajas y Desventajas de la segmentación paginada
Explanation:
PLEASE HELP there are TWO ANSWERS
Select all the correct answers.
Which two data types can be used to store the sentence "Click to open."?
character
string
float
Boolean
array
Answer:
boolean is correct
Explanation:
Answer:
its string and array
Explanation:
Edmonton gang
Specialized high-capacity second storage devices designed to meet organizational demands
1 CD DEVICES
2. FLASH DRIVES
3. PLATTERS
4. MASS STORAGE DEVICES
Answer:
CD devices
Explanation:
Answer:
Mass storage devices
Explanation:
I don't think I can really explain it, that is just the definition of it.
Elimination:
CD and flash drives aren't high-capacity
Platters aren't really storage devices, they are a part of hard drives
Design a program that asks the User to enter a series of 5 numbers. The program should store the numbers in a list then display the following data: 1. The lowest number in the list 2. The highest number in the list 3. The total of the numbers in the list 4. The average of the numbers in the list
Answer:
The program in Python is as follows:
numbers = []
total = 0
for i in range(5):
num = float(input(": "))
numbers.append(num)
total+=num
print("Lowest: ",min(numbers))
print("Highest: ",max(numbers))
print("Total: ",total)
print("Average: ",total/5)
Explanation:
The program uses list to answer the question
This initializes an empty list
numbers = []
This initializes total to 0
total = 0
The following loop is repeated 5 times
for i in range(5):
This gets each input
num = float(input(": "))
This appends each input to the list
numbers.append(num)
This adds up each input
total+=num
This prints the lowest using min() function
print("Lowest: ",min(numbers))
This prints the highest using max() function
print("Highest: ",max(numbers))
This prints the total
print("Total: ",total)
This calculates and prints the average
print("Average: ",total/5)
Acróstico sobre mouse