Your program Assignment This game is meant for tow or more players. In the same, each player starts out with 50 points, as each player takes a turn rolling the dice; the amount generated by the dice is subtracted from the player's points. The first player with exactly one point remaining wins. If a player's remaining points minus the amount generated by the dice results in a value less than one, then the amount should be added to the player's points. (As a alternative, the game can be played with a set number of turns. In this case the player with the amount of pints closest to one, when all rounds have been played, sins.) Write a program that simulates the game being played by two players. Use the Die class that was presented in Chapter 6 to simulate the dice. Write a Player class to simulate the player. Enter the player's names and display the die rolls and the totals after each round. I will attach the books code that must be converted to import javax.swing.JOptionPane; Example: Round 1: James rolled a 4 Sally rolled a 2 James: 46 Sally: 48 OK

Answers

Answer 1

Answer:

The code is given below in Java with appropriate comments

Explanation:

//Simulation of first to one game

import java.util.Random;

public class DiceGame {

  // Test method for the Dice game

  public static void main(String[] args) {

      // Create objects for 2 players

      Player player1 = new Player("P1", 50);

      Player player2 = new Player("P2", 50);

      // iterate until the end of the game players roll dice

      // print points after each iteration meaning each throw

      int i = 0;

      while (true) {

          i++;

          player1.rollDice();

          System.out.println("After " + (i) + "th throw player1 points:"

                  + player1.getPoints());

          if (player1.getPoints() == 1) {

              System.out.println("Player 1 wins");

              break;

          }

          player2.rollDice();

          System.out.println("After " + (i) + "th throw player2 points:"

                  + player2.getPoints());

          if (player2.getPoints() == 1) {

              System.out.println("Player 2 wins");

              break;

          }

      }

  }// end of main

}// end of the class DiceGame

// Player class

class Player {

  // Properties of Player class

  private String name;

  private int points;

  // two argument constructor to store the state of the Player

  public Player(String name, int points) {

      super();

      this.name = name;

      this.points = points;

  }

  // getter and setter methods

  public String getName() {

      return name;

  }

  public void setName(String name) {

      this.name = name;

  }

  public int getPoints() {

      return points;

  }

  public void setPoints(int points) {

      this.points = points;

  }

  // update the points after each roll

  void rollDice() {

      int num = Die.rollDice();

      if (getPoints() - num < 1)

          setPoints(getPoints() + num);

      else

          setPoints(getPoints() - num);

  }

}// end of class Player

// Die that simulate the dice with side

class Die {

  static int rollDice() {

      return 1 + new Random().nextInt(6);

  }


Related Questions

Violations of security policies are considered to be a(n) __________ issue upon which proper disciplinary actions must be taken.
law enforcement
employer-employee
executive-staff
implementation

Answers

Answer:

Violations of security policies are considered to be a(n) law enforcement issue upon which proper disciplinary actions must be taken.

Explanation:

The security policies are considered as law enforcement issue, which may include the rules and regulations of the society decided by the government. These rules and regulations are necessary to maintain the norms of society.

The issue comes under the law enforcement are cyber crime, women rights security in working environment of the organization, use of technology that may cause threats for the society.

To enforce these law to maintain the security in the society, department of law and enforcement has been established such as Police department, Some intelligence agencies. They takes proper disciplinary action under the law enforcement to maintain the security in society against violation of rules.

what is the maximum number of charters of symbols that can be represented by UNicode?

Answers

Answer: 16 bit

Explanation:

Which of the following can be used to copy a file into OneDrive from the File Explorer window? Select all that apply.

A. select the file or folder
B. on the home tab in the clipboard group, click the copy button
C. navigate to the folder you want to move the file to and click the paste button

Answers

Final answer:

To copy a file to OneDrive from File Explorer, select the file, click the 'Copy' button in the Clipboard group under the Home tab, navigate to the OneDrive folder, and click 'Paste'. All the options are correct.

Explanation:

To copy a file into OneDrive from the File Explorer window, you would typically follow these steps:

Select the file or folder you wish to copy.On the Home tab in the Clipboard group, click the Copy button.Navigate to the OneDrive folder where you want to place the file.Click the Paste button to copy the file into the selected OneDrive folder.

All of the actions listed - selecting the file or folder (A), clicking the copy button on the home tab in the clipboard group (B), and navigating to the folder you want to move the file to and clicking the paste button (C) - are steps in the process of copying a file to OneDrive.

Macronutrients include carbon, phosphorous, oxygen, sulfur, hydrogen, nitrogen and zinc. (T/F)

Answers

Answer:

The answer to your question is False

Explanation:

Macronutrients are complex organic molecules, these molecules give energy to the body, promote the growing and the good regulation of the body. Examples of macromolecules are Proteins, carbohydrates, and Lipids.

Micronutrients are substances that do not give energy to the body but they are essential for the correct functioning of the body. Examples of micronutrients are Vitamins and Minerals.

If someone’s boss wanted to send a message to an employee that contains both a video and a Word processing document, which Internet service would be the most appropriate for her to use?\

Answers

Answer:

Email.

Explanation:

Email or electronic mail is a digital messaging platform that sends digitised data through the internet to a specific or group of specified receivers.

It uses the IMAP protocol to download copies of received data from the server to the client's computer and the POP protocol to store the data only on the server, with a copy sent to the client.

The email environment provides an attachment tool to add video, image or audio files to text documents on the message to be sent across.

A data file "parttolerance.dat" stores on one line, a part number, and the minimum and maximum values for the valid range that the part could weigh. Write a script "parttol" that will read these values from the file, prompt the user for a weight, and print whether or not that weight is within range. For example, IF the file stores the following:>> type parttolerance.dat123 44.205 44.287Here might be examples of executing the script:>> parttolEnter the part weight: 44.33The part 123 is not in range>> parttolEnter the part weight: 44.25The part 123 is within range

Answers

Final answer:

The script 'parttol' reads a data file with part numbers and weight tolerances, prompts for a weight input, and assesses if it's within range, providing feedback on part validity.

Explanation:

The question involves writing a script parttol for reading a data file named parttolerance.dat which contains part numbers and their respective weight tolerance ranges. The script should then prompt the user for a weight input and determine if that weight is within the range specified for a part number.

Here's a pseudocode outline for the parttol script:

Open and read the contents of parttolerance.dat.Extract the part number, minimum, and maximum weight values.Prompt the user to enter a weight.Check if the entered weight is within the range.Print a message indicating whether the part is within range.

The execution of this script provides feedback to the user about the validity of the part's weight, thereby ensuring quality control in a manufacturing or engineering context.

___________ is the term used to describe the time taken from when a packet is sent to when the packet arrives at the destination. This is commonly referred to as "ping time" in various places such as online gaming.

Answers

Answer:

Packet delay

Explanation:

In measuring the efficiency of a network, one of the many factors to consider is packet delay. Packet delay is the total time taken for a data packet to travel from its source network to its destination. It is sometimes called latency.

High packet delay or latency are caused by, but not limited to, the following:

(i) The distance between the source network and the destination network

(ii) The size of the packet being transferred

(iii) The time taken to forward data - packet switching delay.

Which of the following is a best practice for a strong password policy?
O Users must reuse one of the last five passwords.
O Passwords may be reset only after 30 days.
O Passwords must meet basic complexity requirements.
O Organizational Unit policy should be enforced over Domain policy.

Answers

Answer:

Passwords must meet basic complexity requirements.

Explanation:

Password should contain:

Uppercase lettersLowercase lettersdigits (0 through 9)special characters like @#$%^&*minimum length of 8

Passwords should not contain:

user's name or surnamebirth year/datenot similar to previous passwordaccount/identity number

What is the output of the following query? SELECT INSERT ('Knowledgeable', 5, 6, 'SUPER');

Answers

Answer:

The above query gives an error.

Explanation:

The query gives an error because is not the correct syntax of the select or inserts query.The syntax of the select query is as follows: "select Attributes_1_name, Attributes_2_name,...., Attributes_n_name from table_name;".The syntax of the insert query is : "insert into table_name (column_1_name, column_2_name,...,column_n_name) values (column_1_value, column_2_value,...,column_n_value);".The syntax of the insert and select query is : "insert into table_name (select Attributes_1_name, Attributes_2_name,...., Attributes_n_name from table_name);".But the above query does not satisfy any property which is defined above. Hence it gives a compile-time error.

When information is modified by individuals not authorized to change it you have suffered a:_____a. Loss of confidentiality b. Loss of integrity c. Loss of functionality d. Loss of availability

Answers

Answer:

b. Loss of integrity

Explanation:

Integrity: It is the information protection technique which ensures that the information is not modified by the unintended individuals.

Do you believe that OOP should be phased out and we should start working on some alternative(s)? Provide your answer with Yes or No.

Give your opinion with two solid reasons to support your answer.

Answers

Answer:

I don't think so. In today's computer era, many different solution directions exist for any given problem. Where OOP used to be the doctrine of choice, now you would consider it only when the problem at hand fits an object-oriented solution.

Reason 1: When your problem can be decomposed in many different classes with each many instances, that expose complex interactions, then an OO modeling is justified. These problems typically produce messy results in other paradigms.

Reason 2: The use of OO design patterns provides a standardized approach to problems, making a solution understandable not only for the creator, but also for the maintainer of code. There are many OO design patterns.

What is it called to persist in trying to multitask can result in this; the scattering bits of one’s attention among a number of things at any given time?
Select one:
a. attention
b. multi tasking
c. continuous partial attention
d. none of the choices are correct

Answers

Answer: is Option B.

B). Multi tasking:   A person capability to carry out more than one task at the same time is called multitasking. Person performing more than one task at the same time is nearly impossible and it's hard for him to focus on each and every detail, thus leading to scatter attention among numbers of things at a time resulting in inaccuracy and greater numbers of fault in final result.

Explanation of other points:

A). Attention: is defined as performing tasks with special care and concentration.

C). Continuous partial attention:  Under this category people perform tasks by concentrating on different sources to fetch information by only considering the most valid information among all information. people who use this technique to gather information works superficially concentrating on the relevant information out of numerous sources in a short period of thinking process.

Database management systems are expected to handle binary relationships but not unary and ternary relationships.'

True or false

Answers

Answer:

False          

Database management systems are expected to handle binary, unary and ternary relationships.

Explanation:

Unary Relationship: It is a recursive relationship which includes one entity in a relationship which means that there is a relationship between the instances of the same entity. Primary key and foreign key are both the same here. For example a Person is married to only one Person. In this example there is a one-to-one relationship between the same entity i.e. Person.

Binary Relationships: It is a relationship involving two different entities.   These two entities identified using two relations and another relation to show relationship between two entities and this relation holds primary keys of both entities and its own primary key is the combination of primary keys of the both relations of the two entities. For example Many Students can read a Book and many Books can be obtained by a Student.

Ternary Relationships: is a relationship involving three entities and can have three tables. For example a Supplier can supply a specific Part of many Mobiles. Or many Suppliers may supply several Parts of many Mobile models.

Final answer:

The claim that database management systems cannot handle unary and ternary relationships is false; they can manage unary, binary, and ternary relationships as well as other complex relationships.

Explanation:

The statement 'Database management systems are expected to handle binary relationships but not unary and ternary relationships.' is false. Modern database management systems (DBMS) are equipped to handle a variety of relationship types, including unary (or recursive), binary, and ternary relationships, among others. A unary relationship is an association between two instances of the same entity. For example, an employee entity might have a manager relationship that relates an employee to another employee who is the manager. A binary relationship exists between two different entities, such as an 'Employee' entity and a 'Department' entity where an employee works in a department. A ternary relationship involves three different entities at the same time, such as a 'Supplier', 'Product', and 'Consumer' entities, where a supplier provides products to a consumer.

What is the value of vals[4][1]? double[][] vals = {{1.1, 1.3, 1.5}, {3.1, 3.3, 3.5}, {5.1, 5.3, 5.5}, {7.1, 7.3, 7.5}};

Answers

Answer:

When the user concludes the value of "vals[4][1]", then it will give an exception of "ArrayIndexOutOfBoundsException".

Explanation:

It is because the size of the above array is [4*3] which takes the starting index at [0][0] and ending index at [3][2]. It is because the array index value starts from 0 and ends in (s-1). When the double dimension array size is [5][5], then it will conclude the value of [4][1].The above array have following index which value can be calculated :-- [0][0],[0][1],[0][2],[1][0], [1][1],[1][2], [2][0], [2][1], [2][2],[3][0],[3][1] and [3][2].

Which of the following is required for counter-controlled repetition?

A. a boolean
B. a method
C. a condition
D. All of the above

Answers

Final answer:

Counter-controlled repetition requires a condition to determine when the loop should stop, involving initializing a counter, setting a condition for it, and updating the counter within the loop. No boolean or method is strictly required, just the condition.

Explanation:

The question asks which of the following is required for counter-controlled repetition. The correct answer is C. a condition. In computer programming, counter-controlled repetition requires a condition to determine when the repetition should stop. This involves initializing a counter to a starting value, setting a condition for the counter (such as counter < 10), and updating the counter within the loop (often incrementing or decrementing). This loop continues to execute as long as the condition evaluates to true.

For example, in a for loop, you might see something like for(int i = 0; i < 10; i++), where i is the counter, i < 10 is the condition that must be true for the loop to continue, and i++ updates the counter. No boolean or method is strictly required for this process, just the condition that guides the repetition.

The packets used to transmit voice on the Internet are similar to the packets that are used to send email. What are some of the advantages of this approach ?

Answers

Answer:

Quality of service (QOS).

Explanation:

In recent computer networking, the convergence of voice, video and text data packet has been made possible. There is no need for a dedicated network for a particular type of packet.

QOS or quality of set is a service rendered to voice or audio packets in VoIP phones to enhance communication.

The email is a digital mailing system that can be used to send all three packets. It enjoys the QOS as voice packets. It is given high preference for transmission and uses the TCP protocol to transmit data reliably.

CTIVITY 2.2.2: Method call in expression. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call findMax() twice in an expression.

Answers

Answer:

The one statement is:

maxSum = maxFinder.findMax(numA, numB) + maxFinder.findMax(numY, numZ);

Explanation:

The given code in the Activity contains a method named findMax() in class SumOfMax which has two parameters  num1 and num2. The method returns the maximum value after comparing the values of num1 and num2.In the main() function, 4 variables numA, numB, numY and numZ of type double are declared and assigned the values numA=5.0, numB=10.0, numY=3.0 and numZ=7.0. Also a variable maxSum is declared and initialized by 0. After that an object named maxfinder of SumOfMax class is created using keyword new.

                 SumOfMax maxFinder = new SumOfMax();

We can invoke the method findMax() by using reference operator (.) with the object name. So the task is to assign to maxSum the maximum of numA, numB plus maximum of numY, numZ in one statement.  Using findMax() method we can find the maximum of numA and numB and also can find the maximum numY and numZ. The other requirement is add (PLUS) the maximum of numA, numB to maximum of numY, numZ. The statement used for this is given below:

maxSum = maxFinder.findMax(numA, numB) + maxFinder.findMax(numY, numZ);

So as per the hint given in the question statement, findMax() function is being called twice, at first to find the maximum between the values of variables numA and numB and then to find the maximum between the values of numY and numZ. According to the given values of each of these variables:

                    numA=5.0, numB=10.0,

       So                  numB>numA

Hence findMax returns numB whose value is greater than numA Now findMax() is being called again for these variables:

                              numY=3.0 and numZ=7.0    

        So                  numZ>numY as 7.0>3.0

Hence findMax() returns numZ whose value is 7.0Finally according to the statement maximum will be added and the result of this addition will be assigned to variable maxSum10.0 is added to 7.0 which makes 17.0        System.out.print("maxSum is: " + maxSum);  

        This statement displays the value of maxSum which is 17.0

We will pass in 2 values, X and Y. You should calculate XY XY and output only the final result. You will probably know that XY XY can be calculated as X times itself Y times. # Get X and Y from the command line:import sysX= int(sys.argv[1])Y= int(sys.argv[2])# Your code goes here

Answers

Answer:

import sys

# The value of the second argument is assigned to X

x = int(sys.argv[1])

# The value of the third argument is assigned to Y

y = int(sys.argv[2])

# The result of multiplication of x and y is assigned to 'result'

result = x * y

#The value of the result is displayed to the user

print("The result of multiplying ", x, "and ", y, "is", result)

Explanation:

First we import sys which allow us to read the argument passed when running the program. The argument is number starting from index 0; the name of the python file been executed is sys.argv[0] which is the first argument. The second argument is sys.argv[1] and the third argument is sys.argv[2].

The attached file is named multplyxy (it wasn't  saved as py file because the platform doesn't recognise py file); we can execute it by running: python3 multiplyxy.py 10 23

where x will be 10 and y will be 23.

To run the attached file; it content must be saved as a py file: multiplyxy.py

Which command would rename the file cows.txt to cheezburger.txt? Select one: a. mv cows.txt cheezburger.txt b. I can haz cheezburger! c. rename cows.txt d. rn cows.txt cheezburger.txt e. rm cows.txt

Answers

Answer:

Option A i.e., mv cows.txt cheezburger.txt is the correct option.

Explanation:

In Linux, mv means move that is used to move a file from one destination to other but the user also used the mv command for renaming the file because it is the easiest way to rename any file to others.

Syntax:

mv first_file.ext new_file.ext

In the above syntax, mv is the command and first_file is the name of that file whose name wants to be change and .ext is the file extension, new_file.ext is that file that name wants to be applied on first one.

What does this method do?
public static int foo(String [][] a)
{
int b = 0;
for (int I = 0; i {
b++;
}
return b;
}

Answers

COMPLETE QUESTION:

What does this method do?

public static int foo(String [][] a)

{

int b = 0;

for (int i = 0; i<a.length; i++)

{

b++;

}

return b;

}

Answer:

Returns the value of b which is the dimension of the array

Explanation:

The method foo accepts a multi dimension array and returns the dimension of the array. A complete code implementation and call to the method is given below:

public class TestClass {

   public static void main(String[] args) {

   String [ ] [ ] arr = {{"gh","hj","fg", "re","tr"},{"","er","df","fgt", "tr"}};

       System.out.println(foo(arr));

   }

   public static int foo(String [ ][ ] a)

   {

       int b = 0;

       for (int i = 0; i<a.length; i++)

       {

           b++;

       }

       return b;

   }

}

The output from the code snippet is the value of b which is 2

A(n) __________ in the name of a form indicates a hierarchy of namespaces to allow the computer to locate the Form class in a computer’s main memory.

Answers

Answer:

A dot member access operator in the name of a form indicates a hierarchy of namespaces to allow the computer to locate the Form class in a computer’s main memory.

Dot (.) operator is known as "Class Member Access Operator" in C++ programming language, it is used to grant access to public members of a class. Public members contain data members (variables) and member functions (class methods) of a class.

The cardinality of a relationship is the maximum number of entity occurrences that can be involved in it. (T/F)

Answers

Answer:

False

Explanation:

In an entity relationship (ER) model, which is the conceptual illustration of certain entities and the relationships that exist between them, the cardinality of a relationship is the possible (minimum and maximum) number of entity occurrences that can be associated or involved in it.

Note: An entity is a real world object that is being modeled.

For example, a school has many staff members. The school and the staff members are the objects while the relationship between the school and the staff members is one-to-many.

One, many, zero are all values of cardinality.

A 'deny any-any' rule in a firewall ruleset is normally placed: a. Nowhere in the ruleset if it has a default allow policyb. Below the last allow rule, but above the first deny rule in the rulesetc. At the top of the rulesetd. At the bottom of the ruleset

Answers

Answer:

D. . At the bottom of the ruleset

Explanation:

The main purpose of firewalls is to drop all traffic that is not explicitly permitted. As a safeguard to stop uninvited traffic from passing through the firewall, place an any-any-any drop rule (Cleanup Rule) at the bottom of each security zone context

Create a C++ program that consists of the following: In main create the following three variables: A char named theChar A double named theDouble An int named theInt Fill each of these variables with data taken as input from the keyboard using a single cin statement. Perform the following task on each variable: Increment theChar by one Decrement theDouble by two Square theInt This should be done on separate lines. Note, outputting theChar + 1 is not modifying the variable. It is simply outputting it. Output the value of each variable to the screen on separate lines using cout statements. Your program should also output the name of the variable followed by a colon.

Answers

Answer:

The source code and output is attached.

I hope it will help you!

Explanation:

State three reasons that Visual Basic is one of the most widely used programming languages in the world.

Answers

1) It is easily implemented in the most major Operating System in the world; Microsoft Windows.

2) You can easily use it to develop GUIs (Graphical User Interfaces) using the most common script writer for the programming language, Visual Studio by Microsoft.

3) It is an easy programming language to start with for upcoming programmers as it has a friendly Syntax, using simple rules and English-like Keywords.
Final answer:

Visual Basic is widely used for three reasons: it is easy to learn, provides rapid application development, and integrates well with Microsoft products.

Explanation:Three Reasons Visual Basic is Widely UsedEasy to Learn: Visual Basic is known for its simplicity and beginner-friendly nature. The language uses a graphical user interface (GUI) and provides drag-and-drop functionality, making it easier for new programmers to understand and create applications.Rapid Application Development (RAD): Visual Basic offers a wide range of pre-built components and controls that simplify the development process. Developers can quickly prototype and create applications, reducing the time and effort required to build software.Integration with Microsoft Products: Visual Basic is developed and supported by Microsoft, which provides extensive documentation, resources, and integration with other Microsoft technologies like Excel, Word, and Access. This makes it a popular choice for building Windows-based applications.

Learn more about Reasons for Visual Basic's popularity here:

https://brainly.com/question/36344044

#SPJ3

How will you ensure that all of the network's applications and tcp/ip services also support ipv6?

Answers

Answer:

Configure the Extended BSD API socket.

Explanation:

There are two types of logical network address, they are IP version 4 and up version 6. They are used to route packets to various destinations from various sources.

A network application must configure this IP addresses protocol. The IP version4 is the default address applications use. To enable IP version 6 the extended BSD API is configured on the network.

To prevent users of the application from changing the size of the form. you must set the FormBorderStyle property to ____

Answers

Answer:

The answer is "Fixed-single".

Explanation:

A FormBorderStyle property is a part of the C# language, which is used to displays the form's border style for viewing an application form. This property uses the fixed-single attribute, which will be used to determine, if the template or form can be resized by the end-user, it can be dragged or resized by no border or a title bar. A fixed, single-line border.

Write a series of conditional tests. Print a statement describing each test and your prediction for the results of each test. For example, your code may look something like this:car = 'subaru'print("Is car == 'subaru'? I predict True.")print(car == 'subaru')print("\nIs car == 'audi'? I predict False.")print(car == 'audi')Create at least 4 tests. Have at least 2 tests evaluate to True and another 2 tests evaluate to False.

Answers

Answer:

this:name = 'John'

print("Is name == 'John'? I predict True.")

print(name == 'John')

print("\nIs name == 'Joy'? I predict False.")

print(car == 'Joy')

this:age = '28'

print("Is age == '28'? I predict True.")

print(age == '28')

print("\nIs age == '27'? I predict False.")

print(age == '27')

this:sex = 'Male'

print("Is sex == 'Female'? I predict True.")

print(sex == 'Female')

print("\nIs sex == 'Female'? I predict False.")

print(sex == 'Joy')

this:level = 'College'

print("Is level == 'High School'? I predict True.")

print(level == 'High School')

print("\nIs level == 'College'? I predict False.")

print(age == 'College')

Conditions 1 and 2 test for name and age

Both conditions are true

Hence, true values are returned

Conditions 3 and 4 tests for sex and level

Both conditions are false

Hence, false values are returned.

Final answer:

Conditional tests in Python allow you to check if a certain condition is True or False. Here are four examples of conditional tests with predictions and code outputs.

Explanation:Conditional Tests in Python

Conditional tests in Python allow you to check if a certain condition is True or False. They are often used in decision-making structures like if statements. Here are four examples of conditional tests:

age = 16

print('Is age greater than 18? I predict False.')

print(age > 18)

temperature = 25

print('Is temperature between 20 and 30? I predict True.')

print(20 < temperature < 30)

is_raining = False

print('Is it not raining? I predict True.')

print(not is_raining)

name = 'John'

print('Does name start with J? I predict True.')

print(name.startswith('J'))

These examples demonstrate how to use conditional statements in Python to check if certain conditions are True or False, and then execute different code based on the results.

Learn more about Conditional Tests here:

https://brainly.com/question/34742710

#SPJ3

One example of a Microsoft Store app is Select one: a. Photos. b. Paint. c. File Explorer. d. Notepad.

Answers

Answer:

b. Paint

Explanation:

Paint was one of Microsoft's application that allowed users to draw basic diagrams and visual representation of objects. Microsoft Paint was discontinued as an addition in the latest versions of Windows, however the app is available for download from Microsoft Store App. Photos is an application of Apple, whereas File Explorer and Notepad are default applications of Windows operating system.

One example of a Microsoft Store app is Paint. Therefore, the correct answer is option B.

Paint was one of Microsoft's application that allowed users to draw basic diagrams and visual representation of objects. Microsoft Paint was discontinued as an addition in the latest versions of Windows, however the app is available for download from Microsoft Store App. Photos is an application of Apple, whereas File Explorer and Notepad are default applications of Windows operating system.

Therefore, the correct answer is option B.

Learn more about the Microsoft Store app here:

https://brainly.com/question/3371513.

#SPJ6

Using basic programming (for loops, while loops, and if statements), write two MATLAB functions, both taking as input:
- dimension n;
- n x n matrix A;
- n x n matrix B;
-n × 1 vector x.
Have the first function compute ABx through (AB)x and the second compute ABx through A(Bx). Have both output:
- the number of flops used.
(a) Print out or write out the first function.
(b) Print out or write out the second function.
(c) Apply both your functions to the case with random matrices and vectors for n = 100 and print out or write out the results. Do the same for 200 x 200, 400 x 400, and 800 x 800. Which approach of computing ABx is faster?

Answers

Answer:

For n = 100

(AB)x: 10100A(Bx): 200

For n = 200

(AB)x: 40200A(Bx): 400

For n = 400

(AB)x: 160400A(Bx): 800

For n = 800

(AB)x: 640800A(Bx): 1600

The faster approach is A(Bx)

Explanation step by step functions:

A(Bx) is faster because requires fewer interactions to find a result: for (AB)x you have (n*n)+n interactions while for A(Bx) you have n+n, to understand why please see the step by step:

a) Function for (AB)x:

function loopcount1 = FirstAB(A,B,x)  

 n = size(A)(1);

 AB = zeros(n,n);

 ABx = zeros(n,1);

 loopcount1 = 0;  

 for i = 1:n

   for j = 1:n

     AB(i,j) = A(i,:)*B(:,j);

     loopcount1 += 1;

   end

 end

 for k = 1:n

   ABx(k) = AB(k,:)*x;

   loopcount1 += 1;

 end

end

b) Function for A(Bx):

function loopcount2 = FirstBx(A,B,x)

 n = size(A)(1);

 Bx = zeros(n,1);

 ABx = zeros(n,1);

 loopcount2 = 0;  

 for i = 1:n

   Bx(i) = B(i,:)*x;

   loopcount2 += 1;

 end

 for j = 1:n

   ABx(j) = A(j,:)*Bx;

   loopcount2 += 1;

 end

end

In this exercise we want to use computer and python knowledge to write the code correctly, so it is necessary to add the following to the informed code:

The correct code that corresponds to the question informed is attached in the photo and we can notice that the faster approach is A(Bx).

So knowing that the information given in the text is that;

For n = 100:

(AB)x: 10100 A(Bx): 200

For n = 200:

(AB)x: 40200 A(Bx): 400

For n = 400:

(AB)x: 160400 A(Bx): 800

For n = 800:

(AB)x: 640800 A(Bx): 1600

A(Bx) exist faster cause demand hardly any interplay to find a result: for (AB)x you bear (n*n)+n interplay while for A(Bx) you bear n+n, so we have that:

a)Watching the function for (AB)x:

function loopcount1 = FirstAB(A,B,x)  

n = size(A)(1);

AB = zeros(n,n);

ABx = zeros(n,1);

loopcount1 = 0;  

for i = 1:n

  for j = 1:n

    AB(i,j) = A(i,:)*B(:,j);

    loopcount1 += 1;

  end

end

for k = 1:n

  ABx(k) = AB(k,:)*x;

  loopcount1 += 1;

end

end

b) Watching the function for A(Bx):

function loopcount2 = FirstBx(A,B,x)

n = size(A)(1);

Bx = zeros(n,1);

ABx = zeros(n,1);

loopcount2 = 0;  

for i = 1:n

  Bx(i) = B(i,:)*x;

  loopcount2 += 1;

end

for j = 1:n

  ABx(j) = A(j,:)*Bx;

  loopcount2 += 1;

end

end

See more about computer at brainly.com/question/950632

Other Questions
A bank offers a CD that pays a simple interest rate of 6%. How much must you put in this CD now in order to have $11 comma 700 to replace all the windows in your house in 5 years? intellectual and ideological context in which revolutions swept the atlantic world from 1750 to 1900 answers These are numbers that resemble capital letters by being uniform in height. They are used most often in annual reports, charts, tables and numerically critical information.Modern figures (T/F) For the fiscal year 2019, your company has total revenues of $250,000 and total expenses of $213,000. Assets had a book value of $750,000, Liabilities had a value of $225,000, and dividends paid to shareholders were $50,000. Create an Income statement below. "Briefly DISCUSS four (4) instances in which taking any vitamin and mineral supplements are unnecessary, or even harmful. Do NOT include effects from taking excessive doses. (2 points)" In the book Hamlet by Shakespeare, why must Laertes wear his rue with a difference? Ordena una pizza. Le presenta el equipo de empleados a Mariela. Contesta el telfono. Da su opinin sobre Mariela. Hacen una demostracin de cmo recibir a un cliente. Megan spent two out of five of her money on a doll and half of the remainder on a musical box she spent eight dollars more on the doll than on a musical box how much money did she have left Indicate whether the following items would appear on the income statement, balance sheet, or retained earnings statement. (a) Notes payable Select a statementEntry field with correct answer (b) Advertising expense Select a statementEntry field with incorrect answer now contains modified data (c) Common stock Select a statementEntry field with correct answer (d) Cash Select a statementEntry field with incorrect answer now contains modified data (e) Service revenue Select a statementEntry field with correct answer (f) Dividends Itaque id genus ludorum levium, quod a multis familiis laudabatur, non ipsi numquam cupimus_ Will mark brainliest and 15 points, please and thank you Nearly 90% of the women executed in the United States were executed after 1866.a. True b. False Assume a businessperson who owns a computer equipment store is delinquent in paying rent to the landlord. The resulting dispute entails ______ law. A. PublicB. PreferentialC. ConsensualD.PrivateE. Black letter Washington ended his presidency with a farewell address. It is significant because... Achondroplastic dwarfism is a dominant genetic trait that causes severe malformation of the skeleton. Homozygotes for this condition are spontaneously aborted (hence, the homozygous condition is lethal) but heterozygotes will develop to be dwarfed. Matthew has a family history of the condition, although he does not express the trait. Jane is an achondroplastic dwarf. Matthew and Jane are planning a family of several children and want to know the chances of producing a child with achondroplastic dwarfism. The genotypes of Matthew and Jane are best represented as:________. A. Matthew Jane AA Aa. B. Matthew Jane Aa aa. C. Matthew Jane aa aa. D. Matthew Jane aa Aa. Miranda makes the following claim in a research paper,Girls should be given the same opportunity to play contactsports as their male counterparts.Of the supporting evidence below, which statement is least relevant to herclaim?OA. Sports injuries are more likely due to incorrect form or trainingrather than overall size or strength,OB. The most popular contact sport among boys is football, but someboys also like to play hockeyC. The fastest-growing sport among girls is lacrosse, which isconsidered full-contact.OD, Doctors agree that the risks for girls playing hockey are no greaterthan those for boys the same age, Help ASAP ! Please !!! a page can have High needs met rating even if it is not related To the topic of the query Which is part of your social environment?a. air qualityb. noise levelsc. video gamesd. family members Please help me! And if can explain me the work I would really appreciate it! Thank you!! Steam Workshop Downloader