Create two parallel arrays that represent a standard deck of 52 playing cards. One array is numeric and holds the values 1 through 13 (representing Ace, 2 through 10, Jack, Queen, and King). The other array is a string array that holds suits (Clubs, Diamonds, Hearts, and Spades).

Create the arrays so that all 52 cards are represented. Then, create a War card game that randomly selects two cards (one for the
player and one for the computer) and declares a winner or a tie based on the numeric value of the two cards. The game should last for 26 rounds and use a full deck with no repeated cards. For this game, assume that the lowest card is the Ace.

Display the values of the player’s and computer’s cards, compare their values, and determine the winner. When all the cards in the deck are exhausted, display a count of the number of times the player wins, the number of times the computer
wins, and the number of ties.

hints:
1) Start by creating an array of all 52 playing cards.
2) Select a random number for the deck position of the player’s first card and assign the card at that array position to the player.
3) Move every higher-positioned card in the deck “down” one to fill in the gap. In other words, if the player’s first random number is 49, select the card at position 49 (both the numeric value and the string), move the card that was in position 50 to position 49, and move the card that was in position 51 to position 50. Only 51 cards remain in the deck after the player’s first card is dealt, so the available-card array is smaller by one. In the same way, randomly select a card for the computer and “remove” the card from the deck.

Answers

Answer 1

Using the knowledge in computational language in python it is possible to write a code that Create the arrays so that all 52 cards are represented.

Writting the code:

import random

def result(playercards,computercards):

if playercards > computercards:

return 1

elif playercards < computercards:

return 2

else:

return 0 #both are equal

def play(cards):

print("-------------------------------------------")

print("Starting game")

playerwins=0

computerwins=0

ties=0

j=0

r=1

while(j<52):

print("**********************************")

print("Starting Round ",r)

playercards=cards[j]

print("playercard :",cards[j])

print("computercard :",cards[j+1])

computercards=cards[j+1]

res=result(playercards,computercards)

if res==0:

print("It is a tie")

ties+=1

elif res==1:

print("Player won")

playerwins+=1

else:

print("Computer won")

computerwins+=1

r=r+1

j=j+2

print("###########################################")

print("Final result")

print("Total Player wins :",playerwins)

print("Total Computer wins",computerwins)

print("Total ties ",ties)

print("Showing cards before shuffling")

cards=list(range(1,14))*4

print(cards)

random.shuffle(cards)

print("Shuffling cards\nDone")

play(cards)

See more about python at brainly.com/question/12975450

#SPJ1

Create Two Parallel Arrays That Represent A Standard Deck Of 52 Playing Cards. One Array Is Numeric And

Related Questions

What is the fee involved in order for a Worker to use Microworkers service?
$9
$1
$2
None, Microworkers id free

Answers

None, Microworkers id free there is no charge .

What are microworkers ?

A microworker is someone who undertakes and completes these tasks. Tasks are generally easy and don't require a lot of time or skill. Microwork is often used as a way to make extra money because it can be done in a short period of time and does not require a long-term commitment. There are many of his Microwork sites that provide tasks that workers can perform. These sites include Amazon Mechanical Turk, Microworkers, and Clickworker. In Clickworker, microworkers are called Clickworkers.

learn more about microworkers here :

brainly.com/question/20851831

#SPJ13

Memory Management - Page fault and Page Thrashing
i) What is page fault?
ii) Describe the steps that take place after a page fault. Include both the actions taken within the handler and those that are taken in hardware before the handler is initiated. How segment defects might be found and treated should be mentioned in your response. Including diagrams may make it easier for you.
iii) What is page thrashing and how might it be avoided?

Answers

1) A page fault is an exception raised by the memory management unit when a process accesses a memory page without making the necessary preparations. To access the page, a mapping must be added to the process's virtual address space.

2) Once the virtual address that produced the page fault is determined, the system verifies that the address is genuine and that there is no protection access problem. If the virtual address is legitimate, the system determines if a page frame is available. If no frames are available, the page replacement procedure is used to delete a page.

3) Thrashing occurs when the page fault and switching occur at a higher frequency, requiring the operating system to spend more time exchanging these pages. This is referred to as thrashing in the operating system. The CPU utilization will be lowered or nonexistent as a result of thrashing.

Eliminating one or more running programs is a temporary remedy for thrashing. Adding extra RAM to the main memory is one of the recommended strategies to minimize thrashing. Another option for dealing with thrashing is to increase the size of the swap file.

What is Memory Management?

Memory management is a type of resource management that is used to manage computer memory. Memory management must include mechanisms for dynamically allocating parts of memory to programs at their request and freeing it for reuse when no longer required.

Management is the method of regulating and coordinating computer memory by allocating parts known as blocks to various operating applications in order to maximize system performance. The primary memory management function of an operating system is the most critical.

Learn more about Page Faults:
https://brainly.com/question/28557805
#SPJ1

What is output by the following code?

c = 1

sum = 0

while (c < 10):

c = c + 2

sum = sum + c




print (sum)

Answers

It is to be noted that the output of the code given above is Sum = 35.

What is Sum in programming?

The sum() method sums all of the elements in an iterable and returns the total.

sum = sum + inputValue; can be substituted with sum += inputValue; This sentence can be interpreted as "Add up inputValue to total." or "Increase sum by inputValue."

With regard to the above code, when a complier runs this:

c = 1

sum = 0

while (c < 10):  

c = c + 2  

sum = sum + c

print (sum)

Output: 35

The output is 35.

Learn more about codes:
https://brainly.com/question/13013054
#SPJ1

Which of the following could be considered an algorithm?


directions for assembling a bicycle


the pages in a book


a file system directory


an application
F

Answers

The best answer is an application

1. Write down a brief history about the internet.

Answers

Answer:

The Internet was developed by Bob Kahn and Vint Cerf in the 1970s. They began the design of what we today know as the 'internet. ' It was the result of another research experiment which was called ARPANET, which stands for Advanced Research Projects Agency Network.

Explanation:

(blank) affects the ability to query a database.

a. i/o performance
b. schema
c. Backup

Answers

Answer:

performance

Explanation:

A user launches an application on an Android device. Once the software loads, the user reports that when turning the tablet to work the application in landscape mode, the software does not automatically adjust to landscape mode. Which of the following is the cause of the issue?

Answers

Since the user launches an application on an Android device, the option that  is the cause of the issue is option (C) The application was not developed to react to changes to the gyroscope.

What is the gyroscope about?

The majority of Android devices have sensors available. One of them rotates the screen appropriately is the gyroscope.

Because the software or application is not set up to rotate in accordance with the gyroscope when the user runs an application on the tablet, the screen does not rotate when the tablet is turned by the user.

Therefore, The gyroscope keeps functioning properly by monitoring the rate of turn around one specific axis. An real value is determined when the rotations around an aircraft's roll axis are measured up until the item stabilizes.

Learn more about application from

https://brainly.com/question/24264599
#SPJ1

See full question below

A user launches an application on an Android device. Once the software loads, the user reports that when turning the tablet to work the application in landscape mode, the software does not automatically adjust to landscape mode. Which of the following is the cause of the issue?

(A) The auto-adjust setting is not enabled in the operating system.

(B) The tablet is running low on power and disabled landscape mode.

(C) The application was not developed to react to changes to the gyroscope.

(D) The user did not switch the tablet to landscape mode.

Write an expression using Boolean operators that prints "Special number" if special_num is -99, 0, or 44.

Answers

A sample expression that uses Boolean operators that prints "Special number" if special_num is -99, 0, or 44 is given below:

The Program

import java.util.Scanner;

import java.io.*;

public class Test

{

   public static void main(String[]args) throws IOException

   {

       File file = new File("SNUMS.INP");

       Scanner inputFile = new Scanner(file);

       int order = 1;

       int i = 1;

      int[] special = new int[1000000+1];

       // Write all 10^6 special numbers into an array named "special"

       while (order <= 1000000)

       {

           if (specialNumber(i) == true)

           {

              special[order] = i;

               order++;

           }

           i++;

       }

       // Write the result to file

       PrintWriter outputFile = new PrintWriter("SNUMS.OUT");

       outputFile.println(special[inputFile.nextInt()]);

       while (inputFile.hasNext())

           outputFile.println(special[inputFile.nextInt()]);

       outputFile.close();

   }

   public static boolean specialNumber(int i)

   {

       // This method check whether the number is a special number

       boolean specialNumber = false;

      byte count=0;

       long sum=0;

       while (i != 0)

       {

           sum = sum + (i % 10);

           count++;

           i = i / 10;

       }

       if (sum % count == 0) return true;

       else return false;

    }

}

Read more about boolean operators here:

https://brainly.com/question/5029736

#SPJ1

What effect do coworkers have on the socialization of new employees?
O a
Coworkers potentially do all of these things.
Ob
Coworkers provide valuable support and information to newcomers.
Oc
Od
Coworkers have no benefit to the socialization process and should be separated from newcomers as much as possible.
By welcoming the newcomer to the team, coworkers tend to offer more job-related information to the newcomer.
Through social interaction, coworkers reduce the newcomer's stress during socialization.
Oe

Answers

Through social interaction, coworkers reduce the newcomer's stress during socialization. Thus option E is the correct answer.

What is socialization?

Socialization generally refers to the process of social influence through which a person acquires the culture or subculture of their group, and in the course of acquiring these cultural elements, the individual's self and personality are shaped.

Why is socialization important?

Socializing not only staves off feelings of loneliness, but also helps sharpen memory and cognitive skills increases your sense of happiness and well-being, and may even help you live longer.

How will you socialize new employees in your organization?

You can help socialize employees by encouraging after-work gatherings.

Thus, option E is the correct option.

To know more about socialization:
https://brainly.com/question/10455747
#SPJ1


What are progression mechanics? Why are they important for games?

Answers

The phrase "progression mechanics" in game design refers to video game mechanics where the creator establishes a path of action that a player must follow to advance in the game. The checkpoints that a character must achieve to move on to the next level are crucial to the progression of gameplay. The checkpoints change depending on the type of game. A few standard checkpoints are:

In action, adventure, and role-playing games, defeating the level boss (RPGs)achieving the third place on a certain track in racing gamescompleting a set of puzzles in a game of puzzlestaking down the enemy's base of operations in real-time strategy games

Most video games are developed using a progression gameplay concept. Designers like progression gaming because it enables them to build a compelling narrative around the game's action. Every game aims to be both engaging and enjoyable to play. Proponents of progression gameplay point out that because game creators are aware of the direction their creation will go in, they can create a far richer and more complex narrative around that direction.

On the other hand, proponents of emergent gameplay prefer games where player random acts have an unlimited number of potential results rather than a finite set of predetermined outcomes that are mapped out by designers. Of course, there is a lot of room for compromise between the two methods. Both emergent gameplay and progression are features found in many games.

Read more about game mechanics here:

https://brainly.com/question/24010467

GAME DESIGN
If you are designing a video game that will primarily be played on a smartphone or tablet, what considerations about the operation or control methods should you keep in mind?

Answers

If you are designing a video game that will primarily be played on a smartphone or tablet, the considerations about the operation or control methods that you should  keep in mind are:

The Orientation of the device; The processing power of the device; andThe size of the device in relation to the spacing of the controlls.

What are video games?

As a result, there is a growing need for mobile app development services and mobile app development companies. As a result of this demand, various smartphone app development businesses promise to provide excellent services.

Regardless of phone manufacturer improvements, there are still uses for the game design process, such as:

Feature Creep IssueNot Targeting the Correct AudienceGetting the Game NoticedManaging Security ConcernsOperating System Fragmentation.Creating the Monetization ModelUpkeep.

Learn more about video games:
https://brainly.com/question/28060919
#SPJ1

Consider this program on the picture attached:

(a) In what programming language is this program implemented?
(b) Why is this program correct? In other words, how does it work?
(c) In what way is the program poorly designed?

Answers

Answer:

a) Javascript

b) The program works because it iterates through an array and logs each array element into the console

c) It is poorly designed because depending on the array element value, the program will have to wait that many milliseconds before it logs and move on to the next element. This isn't good because the program may take a long time to execute if the array contains elements with large values.

4. Answer the following. a. Write the steps to create new presentation from Blank Presentation. How​

Answers

Create new presentation from a Blank Presentation using  PowerPoint by following these steps:

Launch PowerPoint.Select New from the left pane.

Select an option:

Choose Blank Presentation to start from scratch when creating a presentation.Choose one of the templates to use a ready-made design.To see PowerPoint tips, click Take a Tour, and then click Create.

With PowerPoint on your PC or on any device, you can:

Make a presentation from scratch or from a template.Text, images, art, and videos can all be added.Using PowerPoint Designer, choose a professional design.Include transitions, animations, and movement.Save your presentations to OneDrive so you can access them from your computer, tablet, or phone.Share and collaborate with others, no matter where they are.

To learn more about powerpoint presentations, visit: https://brainly.com/question/23714390

#SPJ9

Knowledge Review 3
Which of the following are characteristics of the core capabilities? (Select all that apply.)

Answers

Are distinct critical elements necessary to meet the National Preparedness goal.Are essential for the execution of each mission area: Prevention, Protection, Mitigation, Response, and Recovery.Provide a common language for preparedness across the whole community.

The above three are the characteristics of core capabilities.

What is National Response Framework?

The National Response Framework (NRF) is a guide to how the nation responds to all types of disasters and emergencies.

What are the main components of the National Response Framework?

Response doctrine is comprised of five key principles:

engaged partnershiptiered responsescalable, flexible, and adaptable operational capabilitiesunity of effort through the unified commandreadiness to act.

To know more about NRF:

https://brainly.com/question/13107467

#SPJ13

4.what the economic and ideological causes of the American, the French, and the Chinese Revolutions, and to see the larger historical contexts in which these events took place?

Answers

The economic and ideological causes of the American, French, and Chinese revolutions were the imposition of taxes, poor economic policies, and increasing imperialist demand, respectively.

The economic and ideological causes behind the American revolution:

The imposition of taxes on the colonies, which they refused to pay. The primary goal of levying a tax was to recoup the debt incurred by the colonists as a result of the war. The corrupt ideology drove this revolution.

The French revolutions' economic and ideological causes:

Poor economic policies that resulted in bankruptcies and the extravagant spending of France's royals resulted in the imposition of high taxes on the people. The Enlightenment, influenced by the British political system, was the ideological cause.

The economic and ideological causes of the Chinese revolution:

The major reasons for the revolution were increasing imperialist demand from the West and Japan, as well as the desire to see a unified China.

To know more about the American Revolution, visit: https://brainly.com/question/18317211

#SPJ1

with aid of two examples, describe the use of merging of docments

Answers

Answer:

Answer down below

Explanation:

Q's Asked: With the aid of two examples, describe the use of merging of documents.

------------------------------------------------------------------------------------------------------------

Explanation of "merging documents":

What is the use of merging of documents?

Well merging documents is really only used for organization or systems where documents/ data are changed by different users or systems.

Anyway The requirements for "mail merging" is :

(a) Main Document,

(b) Data Source,

(c) Merge Document.

: Meaning of A horizontal merger: A horizontal merger is when competing companies merge—companies that sell the same products or services.

: Meaning of A vertical merger: A vertical merger is a merger of companies with different products. :3

Welp anyway back to the Q's: With the aid of two examples, describe the use of merging of documents.Umm some people that use "merging of documents", are horizontal mergers which increase market share, such as Umm... T-moblie and sprit bc they are both a phone company. vertical mergers which exploit existing synergies.  So like ummm.... a sports drink company and a car company combining together. hope this helps ~~Wdfads~~~

What is variable view?

Answers

Answer:

Variable View contains descriptions of the attributes of each variable in the data file. In Variable View, rows are variables. Columns are variable attributes.

Explanation:

Data View is where we inspect our actual data and. Variable View is where we see additional information about our data.

difference between electronic and non electronic components

Answers

Answer:

The working principle of both of them are same, i.e., uses the electrical energy for doing work. The major difference between the electrical and electronic devices is that the electrical devices convert the electrical energy into the other form of energy like heat, light, sound, etc

Looking for similarities between concepts or problems is referred to as
an algorithm
Odecomposition
pattern recognition
abstraction

Answers

Pattern recognition is used  for similarities between concepts or problems in an algorithm.

What is meant by pattern recognition?

Pattern recognition is a data analysis method that uses machine learning algorithms to automatically recognize patterns and regularities in data. This data can be anything from text and images to sounds or other definable qualities. Pattern recognition systems can recognize familiar patterns quickly and accurately.

An example of pattern recognition is classification, which attempts to assign each input value to one of a given set of classes (for example, determine whether a given email is "spam" or "non-spam").

Therefore, Pattern recognition is used.

To know more about Pattern recognition from the given link

https://brainly.com/question/28427592

#SPJ1

(دانا
Physical appearance
OF Fith generation
computer

Answers

The physical appearance of the fifth-generation computers is VLSI architecture, parallel processing such as data flow control, and logic programming.

What are the generations of computers?

The phrase “generation” refers to a shift in the technology that a computer is/was using. The term “generation” was initially used to describe different hardware advancements.

These days, a computer system's generation involves both hardware and software. 5 Fifth Generation: The period of the fifth generation: 1980-onwards. ULSI microprocessor based.

Thus, fifth-generation computers have knowledge based on a relational database and applied artificial intelligence and pattern processing.

To learn more about Fifth generation computers, refer to the link:

https://brainly.com/question/9354047

#SPJ1


Why is the I/O subsystem called a subsystem?

Answers

The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.

What is an IO subsystem?

The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.

Between input handlers and input devices (such as a keyboard, mouse, joystick, and so on), the Input subsystem serves as an abstraction layer. The input devices provide input events by capturing inputs from user activities or from external sources. For instance, pressing a key causes an input event.

The kernel, an I/O subsystem based on the hardware and device-driver infrastructure, offers a number of functions including scheduling, caching, spooling, device reservation, and error handling. Additionally, the I/O subsystem is in charge of safeguarding itself against rogue programmes and malevolent users.

To learn more about i/o sub system refer to:

https://brainly.com/question/4274507

#SPJ1

The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.

What is an IO subsystem?The I/O subsystem manages all peripheral device communication with the central processor. Hardware such as disc drives, tape drives, and printers are examples of peripheral devices.Between input handlers and input devices (such as a keyboard, mouse, joystick, and so on), the Input subsystem serves as an abstraction layer. The input devices provide input events by capturing inputs from user activities or from external sources. For instance, pressing a key causes an input event.The kernel, an I/O subsystem based on the hardware and device-driver infrastructure, offers a number of functions including scheduling, caching, spooling, device reservation, and error handling. Additionally, the I/O subsystem is in charge of safeguarding itself against rogue programmers and malevolent users.

To learn more about  I/O subsystem refer to:

https://brainly.com/question/20331489

#SPJ1

Describe how smartphones communicate. List and describe four popular types of messages you can send with smartphones. Write one well-written paragraph and answer the above question to earn 10 points.

Answers

The way that smartphones communicate is that people connect with each other and with businesses has been changed by mobile messaging. However, users and businesses can choose from a variety of mobile messaging types.

The Kinds Of Mobile Messaging are:

SMS & MMS MessagingPush Notifications.In-App Messages.RCS.

What is the messaging about?

Brief Message Service (SMS): One of the most popular types of mobile communications is SMS. A basic text message sent via a cellular signal is known as an SMS, or short messaging service.

SMS is completely text-based and has a character restriction of 160. Users in the United States who don't have an unlimited messaging package pay cents per message.

Therefore, in Notifications through Push: It's possible that you mistakenly believe that the thing that's flashing on your cell phone's screen is a text message. Similar to SMS messages, push notifications are pop-up windows that appear while you're using your phone or on the lock screen rather than in your inbox with other texts.

Learn more about Mobile Messaging from

https://brainly.com/question/27534262
#SPJ1

Which is true about a gas? Choose the correct answer. Responses It changes to a liquid when it heats up. It changes to a liquid when it heats up. It takes up a definite amount of space. It takes up a definite amount of space. It takes up a definite amount of space but does not have a definite shape. It takes up a definite amount of space but does not have a definite shape. It does not take up a definite amount of space and does not have a definite shape. It does not take up a definite amount of space and does not have a definite shape.

Answers

A gas does not take up a definite amount of space and does not have a definite shape.

What are the properties of a gas?

There are four basic states of matter, with gas being one of them. A pure gas can be composed of single atoms, elemental molecules derived from a single type of atom, or complex molecules derived from a combination of atoms. There are many different pure gases in a gas mixture like air.

Three characteristics distinguish gas from liquids or solids they come from:

(1) they are easily compressed,

(2) they expand to fill their containers, and

(3) they take up a lot more area than solids or liquids.

To learn more about gas, use the link given
https://brainly.com/question/25649765
#SPJ9

Identification where Information Technology causes a hindrance to business processes

Answers

Identification where Information Technology causes a hindrance to business processes is one that is  Lacking an IT Plan.

Why is planning for information technology so crucial?

The organization's strategic goals and objectives may be achieved with the aid of this planning. The strategic IT plan should take into account how each of the organization's strategic business goals relates to technology as well as any modifications that will need to be made to the organization's information and communications infrastructure.

Note that So much so that a business will find it difficult to run efficiently without fully functional computers and access to emails and data. The consequences of data loss or corruption due to hardware failure, human mistake, hacking, or malware could be disastrous for any organization, it is a basic reality.

Learn more about Technology  from

https://brainly.com/question/25110079
#SPJ1

In reference to computers, what is a firewall?

A) letters, numbers, and special characters assigned to unlock accounts and websites
B) email attachments
C) an installed software element that protects and monitors incoming and outgoing data
D) a second copy of files saved to a cloud

Answers

Answer:

C) an installed software element that protects and monitors incoming and outgoing data

Explanation:

SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN
JAVA.
• Assume that the classes listed in the Java Quick Reference have been imported where appropriate.
• Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied.
• In writing solutions for each question, you may use any of the accessible methods that are listed in classes defined in that question. Writing significant amounts of code that can be replaced by a call to one of these methods will not receive full credit.
A manufacturer wants to keep track of the average of the ratings that have been submitted for an item using a running average. The algorithm for calculating a running average differs from the standard algorithm for calculating an average, as described in part (a).
A partial declaration of the RunningAverage class is shown below. You will write two methods of the RunningAverage class.
*
public class RunningAverage
{
}
/** The number of ratings included in the running average. private int count;
/** The average of the ratings that have been entered. */ private double average;
// There are no other instance variables.
/** Creates a RunningAverage object.
* Postcondition: count is initialized to 0 and average is
* initialized to 0.0.
*/
public RunningAverage()
{ /* implementation not shown */ }
/** Updates the running average to reflect the entry of a new
* rating, as described in part (a).
*/
public void updateAverage (double newVal)
{ /* to be implemented in part (a) */ }
/** Processes num new ratings by considering them for inclusion
* in the running average and updating the running average as
necessary. Returns an integer that represents the number of
*
* invalid ratings, as described in part (b).
* Precondition: num > 0
*/
public int processNewRatings (int num)
{ /* to be implemented in part (b) */ }
/** Returns a single numeric rating.
public double getNewRating()
{ /* implementation not shown */ }
(a) Write the method updateAverage, which updates the RunningAverage object to include a new rating. To update a running average, add the new rating to a calculated total, which is the number of ratings times the current running average. Divide the new total by the incremented count to obtain the new running
average.
For example, if there are 4 ratings with a current running average of 3.5, the calculated total is 4 times 3.5, or 14.0. When a fifth rating with a value of 6.0 is included, the new total becomes 20.0. The new running average is 20.0 divided by 5, or 4.0.
Complete method updateAverage.
/** Updates the running average to reflect the entry of a new
* rating, as described in part (a).
*/
public void updateAverage (double newVal)
(b) Write the processNewRatings method, which considers num new ratings for inclusion in the running average. A helper method, getNewRating, which returns a single rating, has been provided for you.
The running average must only be updated with ratings that are greater than or equal to zero. Ratings that are less than 0 are considered invalid and are not included in the running average.
The processNewRatings method returns the number of invalid ratings. See the table below for three examples of how calls to process NewRatings should work.
Statement
Ratings
processNewRatings
Generated
Return Value
processNewRatings (2)

2.5, 4.5
processNewRatings (1)
-2.0
1
0.0,
-2.2,
processNewRatings (4)
2
3.5, -1.5
Comments
Both new ratings are included
in the running average.
No new ratings are included in the running average.
Two new ratings (0.0 and 3.5) are included in the running
average.
Complete method processNewRatings. Assume that updateAverage works as specified, regardless of what you wrote in part (a). You must use getNewRating and updateAverage appropriately to receive full
credit.
/** Processes num new ratings by considering them for inclusion
* in the running average and updating the running average as
*
necessary. Returns an integer that represents the number of
* invalid ratings, as described in part (b).
* Precondition: num > 0
*/
public int processNewRatings (int num)

Answers

It’s g zzzzzzzzzzzzzzzzzzzzzzzz

which search algorithm uses three variables to mark positions within the array as it searches for the searchvalue?

Answers

A binary search algorithm that uses three variables to mark positions within the array as it searches for the searchvalue.

What is a binary search?

In Computer technology, a binary search simply refers to an efficient algorithm that is designed and developed for searching an element (information) from a sorted list of data that are stored on a database, especially by using the run-time complexity of Ο(logn)

Note: n is the total number of elements in a list.

Additionally, keywords and search operators are important variables (elements) that have a significant effect on search results. Therefore, searchvalue is a binary search algorithm that is designed and developed to make use of three (3) variables to mark positions within an array as it perform a searche operation.

Read more on binary search here: https://brainly.com/question/17180912

#SPJ1

Write a method that takes two String
parameters, returns the number of times the
second string appears in the first string.
This method must be named
substringCount () and have two String
parameters. This method must return an
integer

Answers

A method that takes two String parameters, returns the number of times the second string appears in the first string.

public static int substringCount(String s1, String s2)
{
  int count = 0;
  int i = 0;
  while ((i = s1.indexOf(s2, i)) != -1)
  {
     count++;
     i += s2.length();
  }
  return count;
}

What is string?
A string is typically a sequence of characters in computer programming, either as a literal constant or as some sort of variable. The latter can either be fixed or its elements and length can be changed (after creation). A string is typically implemented as just an array data structure of bytes (or words) that stores a sequence of elements, typically characters, using some character encoding. A string is generally thought of as a type of data. A string can also represent other sequence(or list) data types and structures, such as more general arrays. A variable declared to be a string may cause memory storage to be statically allocated for just a predetermined maximum length or utilise dynamic allocation to allow this to hold a variable number of elements, depending on this same programming language and specific data type used.

To learn more about string
https://brainly.com/question/28290531
#SPJ13

Name two ways to store data

Answers

Answer:

Hard drives and solid-state drives

Explanation:

All academic departments in a University keeps a database of its students. Students are classified into undergraduate, graduate, and international students. There are few reasons for grouping the students into these three categories. For example the department's secretary informs: the undergraduate students about new undergraduate courses offered, the graduate students about graduate courses and professional conferences and international students about new emigration laws.
i. Identify (if any) the subtypes of entity students.
ii. Identify a unique attribute (relationship) for each subtype.
iii. Draw an EER diagram for the department's database.​

Answers

The identification of subtypes of entity students may be done on the basis of students those who have taken courses on the basis of their educational qualifications.

What do you mean by the EER diagram?

The EER diagram stands for the Enhanced-entity-relationship diagram. This diagram provides a visual representation of the relationship among the tables in your model. The revisions that are made with the Model editor are significantly represented in the associated diagram.

According to the context of this question, the unique attribute (relationship) for each subtype is the classification of students based on the national and international characteristics of all courses.

The EER diagram is manipulated by the structural arrangement of the classification of the students on the basis of several characteristics.

To learn more about the EER diagram, refer to the link:

https://brainly.com/question/15183085

#SPJ1

Other Questions
Write an equation of the parabola in vertex form that has a vertex (-3, 7) and passes through (-4, 8). a species of grass has a haploid number of 18. how many different types of gametes can be produced from meiosis in a diploid individual just with independent assortment (no crossing over)? vector technology's employees are enjoying the internet in the office a bit too much. the company has been suffering a loss in productivity the past year and has determined it to be related to cyber-loafing, which is employee use of work internet access for personal use. the company needs a communication strategy in place that will increase productivity without causing a backlash among employees. the ceo has assembled a task force led by a human resources (hr) manager and comprised of a marketing and finance manager. you are the hr manager. can you balance the company and employees' interests using the right communications methods? Oliver borrowed $1,500 to purchase a riding lawn mower for his lawn care business. The bank offered him an interest rate of 12% for 6 months. Calculate the simple interest using I = prt. $69 $90 $420 $1,080Pls hurry and thank you! there are 8 pink shirts, 6 green shirts, and 4 red shirts in a drawer. suppose you reach in and draw two shirts at random. what is the probability that at least one of the shirts you draw will be pink? -4 + (-1) - (-3)Need HELP a benefit derived from the creation of an information system that can be measured in dollars and with certainty is a(n): Select ALL the correct answers. Figure A is a polygon that has been graphed on a coordinate grid. Which of the following transformations will result in a similar image to figure A? Reflect figure A across the y-axis, and dilate it by a scale factor of 4. Reduce the measurement of each angle by half, and reflect the figure across the x-axis. Translate figure A down 4 units and left 6 units, and dilate it by a scale factor of 3. Double the measurement of each angle by 2, and dilate it by a scale factor of 2. Increase the length of one side of figure A by 2 units, and rotate the figure 90 counterclockwise about its center. Why is it important that a pure water IV not be given to dehydrated patients? What is the subject of Stravinskys The Rite of SpringA. Scenes from the Russian Revolution B. Scenes from a Russian weddingC. Scenes from a Tsarist crowning ceremony D. Scenes from a pagan ritual What caused the behavior of the plant in the diagram above? Number these events in the order in which they occurred, from 1st to 5th.11. American soldiers began arriving in Europe to fight in World War I12. Germans' rage over their country's surrender helped Adolf Hitler rise to power.13. A German submarine sank a British passenger ship called the Lusitania off the coast of Ireland14. U.S. President Woodrow Wilson asked Congress for a declaration of war. 15. Germany, the last of the Central Powers, agreed to a peace settlement 36 and 30 percentage of 10 how do the minerals differ from one another how are they alike? 15/20+16/20 as a mixed number 0.25 + 316 + 2112? what is the answer to this and how did i solve it? What was the main reason that the articles of confederation struggled as a government system?. do you have a non-compete agreement or a non-disclosure agreement with your present or prior employer? Gaste el 30% de lo que no gaste, si hubiera gastado el 40% de lo que no hubiera gastado, entonces ahora tendra 30 dlares menos de los que tengo 2.NASCAR driver Ricky Rudd began racing in the Cup series in 1975.In 2003, he passed 700 Cup starts and 800 career starts.He won at least one race a year for the next sixteen years.In 1977, he ran more races and won "Rookie of the Year."