answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
RSB [31]
2 years ago
10

Multiple boolean expressions can be combined by using a logical operator to create ________ expressions.

Computers and Technology
1 answer:
Licemer1 [7]2 years ago
8 0
<span>Boolean expressions can be combined by using a logical operator to create compound expressions. A boolean expression is an expression that takes into account and evaluates specific data, which is in the form of true and/or false. A compound expression is merely a statement of expressions.</span>
You might be interested in
Assume that getPlayer2Move works as specified, regardless of what you wrote in part (a) . You must use getPlayer1Move and getPla
kakasveta [241]

Answer:

(1)

public int getPlayer2Move(int round)

{

  int result = 0;

 

  //If round is divided by 3

  if(round%3 == 0) {

      result= 3;

  }

  //if round is not divided by 3 and is divided by 2

  else if(round%3 != 0 && round%2 == 0) {

      result = 2;

  }

  //if round is not divided by 3 or 2

  else {

      result = 1;

  }

 

  return result;

}

(2)

public void playGame()

{

 

  //Initializing player 1 coins

  int player1Coins = startingCoins;

 

  //Initializing player 2 coins

  int player2Coins = startingCoins;

 

 

  for ( int round = 1 ; round <= maxRounds ; round++) {

     

      //if the player 1 or player 2 coins are less than 3

      if(player1Coins < 3 || player2Coins < 3) {

          break;

      }

     

      //The number of coins player 1 spends

      int player1Spends = getPlayer1Move();

     

      //The number of coins player 2 spends

      int player2Spends = getPlayer2Move(round);

     

      //Remaining coins of player 1

      player1Coins -= player1Spends;

     

      //Remaining coins of player 2

      player2Coins -= player2Spends;

     

      //If player 2 spends the same number of coins as player 2 spends

      if ( player1Spends == player2Spends) {

          player2Coins += 1;

          continue;

      }

     

      //positive difference between the number of coins spent by the two players

      int difference = Math.abs(player1Spends - player2Spends) ;

     

      //if difference is 1

      if( difference == 1) {

          player2Coins += 1;

          continue;

      }

     

      //If difference is 2

      if(difference == 2) {

          player1Coins += 2;

          continue;

      }

     

     

  }

 

  // At the end of the game

  //If player 1 coins is equal to player two coins

  if(player1Coins == player2Coins) {

      System.out.println("tie game");

  }

  //If player 1 coins are greater than player 2 coins

  else if(player1Coins > player2Coins) {

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

  }

  //If player 2 coins is grater than player 2 coins

  else if(player1Coins < player2Coins) {

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

  }

}

3 0
2 years ago
A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a ser
Bingel [31]

A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a series of stored <u>instructions</u>. The <u>central</u> processing unit of most modern computers is a <u>microprocessor</u>. The instructions that tell a computer how to carry out a task are referred to as computer <u>programs</u>, which are distributed as software. Computers run three main types of software: <u>Application</u> software, system software, and development tools. An example of system software is a computer <u>operating</u> system, which is essentially the master controller for all the activities that a digital device performs. Digital devices are constructed using tiny electronic components that represent data bits as electrical signals. The system unit houses the system board, which contains several <u>integrated</u> circuits made from semiconducting materials. Computers come in three popular form factors: component, <u>clamshell</u> and slate. Many of today's digital devices operate on battery power supplied by <u>Lithium</u> ion batteries. Battery life and lifespan can be extended by following good battery management practices.

<u>Explanation</u>

A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a series of stored instructions. Input is data or information typed, submitted, or transmitted into a computer. Processing data involves performing calculations, drawing graphs, modifying documents, and many more. Output is the result produced by a computer. Processing is handled by the computer’s CPU (Central Processing Unit) and the central processing unit of most modern computers is a microprocessor. A microprocessor executes and manages all logical instructions passed to it and performs tasks involved in computer processing. The instructions that tell a computer how to carry out a task are referred to as computer programs, which are distributed as software. A program is software or set of ordered operations on a computer that performs a particular task or function. A program is created and compiled into a language that the computer can comprehend and then distributed as software. Computers run three main types of software: Application software, system software, and development tools. Application software are programs that help a user carry out a task while a system software helps  the computer system to monitor itself in order to function effectively. On the other hand, development tools are used for creating applications, operating systems, Web sites, and utilities. Digital devices are constructed using tiny electronic components that represent data bits as electrical signals. The system unit houses the system board, which contains several integrated circuits made from semiconducting materials. The essence of digital electronics is the small circuit boards and integrated circuits you see when you open up a digital device. ICs are sets of electronic circuits engraved onto a thin slide of semiconducting material. Computers come in three popular form factors: component, clamshell and slate. Form factor in computer terms refers to the size and dimensions of then device. Clamshell devices have features characterized by a keyboard as the base and a screen on the hinged cover. Those devices configured in the slate form factor have a touchscreen that covers majority of the device’s surface. Many of today's digital devices operate on battery power supplied by Lithium ion batteries. Battery life and lifespan can be extended by following good battery management practices. Many of today's digital devices operate on battery power supplied by Lithium ion batteries. Battery life and lifespan can be extended by following good battery management practices.

7 0
2 years ago
Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
Olin [163]

The following cose will be used to copy assignment operator for CarCounter

<u>Explanation:</u>

Complete Program:

#include <iostream>

using namespace std;

class CarCounter

{

public:

CarCounter();

CarCounter& operator=(const CarCounter& objToCopy);

void SetCarCount(const int setVal)

{

 carCount = setVal;

}

int GetCarCount() const

{

 return carCount;

}

private:

int carCount;

};

CarCounter::CarCounter()

{

carCount = 0;

return;

}

// FIXME write copy assignment operator

/* Your solution goes here */

CarCounter& CarCounter::operator=(const CarCounter& objToCopy)

{

if(this != &objToCopy)

 carCount = objToCopy.carCount;

return *this;

}

int main()

{

CarCounter frontParkingLot;

CarCounter backParkingLot;

frontParkingLot.SetCarCount(12);

backParkingLot = frontParkingLot;

cout << "Cars counted: " << backParkingLot.GetCarCount();

cout << endl << endl;

system("pause");

return 0;

}

5 0
2 years ago
Consider a maximal flow problem in which vehicle traffic entering a city is routed among several routes before eventually leavin
ohaa [14]

Answer:

c. the arcs represent one-way streets.

Explanation:

7 0
2 years ago
in a small office, there are 5 computers, a network printer, and a broadband connection to the internet. what devices are needed
Nataly [62]

Answer:

<em>Ethernet cables, Network Adapters, Modem, Routers, Switches.</em>

Explanation:

<em>The devices that are required in setting up a wired network for the 5 computer comprises of the following devices </em>

  • <em>Ethernet Cables</em>
  • <em>Network Adapters</em>
  • <em>Modem/Router</em>
  • <em>Network Switch</em>

<em>Ethernet cables: They are called network cables or RJ-45 cables used to in connecting two or more computers together. it has different categories called, the untwisted pair and twisted pair Ethernet, with a speed from 10-1000</em>

<em>Network Adapters : This adapters allows a computer device to connect and interface with a network computer</em>

<em>Modem/Routers : A router is a device that that sits in the  middle  between your local computers and modems. it takes receives information or gets information from the modem and delivers it to the computer</em>

<em>Network switch: it connects more than two computers together to a network and share data among themselves and other devices on the network</em>

6 0
2 years ago
Other questions:
  • Rob creates a Course_Details table that has four columns: Course _ID, Course_Name, Semester and Credits. A course may have 0.5 c
    6·2 answers
  • Ajay wants to read a brief overview about early settlers in the United States. Which type of online text source should he most l
    9·2 answers
  • What best describes the purpose of the Recycle Bin (Microsoft Windows) and Trash (Apple Mac) features
    13·2 answers
  • Which Android application is used exclusively for sharing video content?
    12·2 answers
  • Which of these statements regarding mobile games is true? A. They are typically played indoors. B. They have detailed environmen
    7·1 answer
  • Write a program that allows you to create a file of customers for a company. The first part of the program should create an empt
    12·1 answer
  • Given an alphabet, print all the alphabets up to and including the given alphabet.
    15·2 answers
  • Which would be the most efficient way to store files on your computer?
    13·2 answers
  • Budget Analysis (use while loop) Write a program that asks the user to enter the amount that he or she has budgeted for a month.
    5·1 answer
  • Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!