Questions
In the C++ programming language write a program capable of playing Tic-Tac-Toe against the user. Your...

In the C++ programming language write a program capable of playing Tic-Tac-Toe against the user. Your program should use OOP concepts in its design. You can use ASCII art to generate and display the 3x3 playing board. The program should randomly decide who goes first computer or user. Your program should know and inform the user if an illegal move was made (cell already occupied). The program should also announce if one of the players wins or if a draw is achieved. While it is desirable for your program to play a strong game, this is not an Artificial Intelligence course so if your program does not play at a world champion level you will not be penalized for it

In: Computer Science

Using C language Problem!! <3 x 3 tic tac toe> 2 players are doing tic tac...

Using C language

Problem!! <3 x 3 tic tac toe>

2 players are doing tic tac toe alternatively. Anyone could win when they first make a bingo for any line(horizontal, vertical, diagonal)

[Constraints]

1. Use 2dimensional Array(3 X 3)

2. Each elements are 1 or 2 so that can show their player1, player2's mark.

3. Inputs are 1 through 9 as you can see

1 2 3
4 5 6
7 8 9

4. No inputs are duplicated

5. if no one wins after the tictac toe, print out "draw"

Example of screen of output

In: Computer Science

(a)Identify three PAMPs that are recognized by PRRs. Which cells express PRRs? How do PRRs associate...

(a)Identify three PAMPs that are recognized by PRRs. Which cells express PRRs? How do PRRs associate with PAMPs to promote innate immunity?

(b) describe the potential problems that would arise if a person had an acquired inability to phagocytose pathogens. Could the person survive in a normal environment such as a college campus? What defects in the phagocyte might cause lack of phagocytosis? Explain.

(c). Beginning with entry of a pathogen into the body describe how a neutrophil is recruited to the site of an infection, how it removes the pathogen, and how this lead to inflammation.

(d) describe antigen presentation. Your answer should include cells that are APCs and why antigen presentation is important to both innate and adaptive immunity.

(e) how do NK cells tell the difference between a healthy cell and an infected cell? How does it kill the infected cell?

In: Biology

"""stack.py implements stack with a list""" class Stack(object): def __init__(self): #creates an empty stack. O(1) self.top...

"""stack.py implements stack with a list"""

class Stack(object):
def __init__(self): #creates an empty stack. O(1)
self.top = -1 #the index of the top element of the stack. -1: empty stack
self.data = []

def push(self, item): # add item to the top of the stack. O(1)
self.top += 1
self.data.append(item)

def pop(self): # removes and returns the item at the top O(1)
self.top -=1
return self.data.pop()

def peek(self): # returns the item at the top O(1)
return self.data[len(self.data)-1]
def isEmpty(self): return self.top == -1 #return len(self.data)==0
def __len__(self): return self.top+1 #return len(self.data)

def __str__(self): return " ".join([str(x) for x in self.data])

#to do: add a main method to test the stack.

In: Computer Science

Objective: Practice common UNIX commands. Procedure: The following list of Unix commands are given for self-learning....

Objective:

Practice common UNIX commands.

Procedure:

  1. The following list of Unix commands are given for self-learning. Use 'whatis' or 'man' command to find out about each command. Your document should include the description or screen shots of the output from each of the command.

Commands:

  1. df
  2. du
  3. gzip
  4. file
  5. history
  6. wget
  1. Changing access rights:

chmod u+x Dir1.0             adds execute permission for the owner

chmod go-w file1               removes write permission for the group and others

chmod ugo=rw testfile      sets the permissions for everyone to read and write, but not execute

chmod u=rwx newDir       sets the permissions for the owner to read, write, and execute

  1. How to check access rights for files or directories?
    1. Use the command in (a) to find out the access rights for the file named /etc/passwd.
  • Who is the owner of this file?
  • What is the permission for the group on this file?

In: Computer Science

assum have a Class enum Suit{ CLUBS , DIAMONDS,SPADES,HEARTS; } Class enum Raml { TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE,TEN, JACK,QUEEN,KING,...

assum have a
Class enum Suit{
CLUBS , DIAMONDS,SPADES,HEARTS;
}

Class enum Raml {
TWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE,TEN, JACK,QUEEN,KING, ACE;
}

public class Card {
  
   private Suit suit;
   private Rank rank;

   public Card (Rank rank, Suit suit){
  
       this.suit = suit;
       this.rank = rank;

   }

   public Suit getSuit() {
       // TODO Auto-generated method stub
       return suit;
   }

   public Rank getRank() {
       return rank;
   }



Class Hand{
given ArrayList<Card> cards;
public Hand(Card[] cards) creates a hand from the cards in the given array.

public Card playCard(int i): Removes and returns the card with the given index in cards.

   public boolean isSorted () return true if the elements of the cards are in sorted order.

---------------------Java------------------

In: Computer Science

(C++. Please don't use #include <bits/stdc++.h>) This lab exercises your understanding of using a Heap to...

(C++. Please don't use #include <bits/stdc++.h>) This lab exercises your understanding of using a Heap to create a Priority Queue

Follow these steps:

  • Declare an integer array to use for the heap (size of 20 to 30 elements)
  • Create an insertion function (and any needed helper functions) that creates a min-heap (smallest priority is most important)
  • Create a remove function (and any needed helper functions) that removes the min value from the heap and returns it
  • In main, call the insertion function with at least 15 random values
  • In main, call the remove function for all values and print them to the screen (format the numbers so they all fit in a single screen – perhaps 5 to 10 values on each line?)
  • Repeat the insertion and remove/print for a second set of random values before ending the program

In: Computer Science

Your HTML document should contain the following elements/features: HTML tags: An <input> tag labeled "Timer Duration"...

Your HTML document should contain the following elements/features:

  1. HTML tags:
    1. An <input> tag labeled "Timer Duration" with the initial value 0
    2. A <button> tag labeled "Start"
  2. Script: When the user presses the button (1b), a function will begin that does the following:
    1. Reads the value from the input field (1a)
    2. Removes the <input> and <button> tags (1a & 1b)
    3. Creates a new <p> tag, initialized to show the input value
    4. Starts a timer that ticks down to zero. For every second that elapses, the paragraph tag (2c) will show the updated timer value (i.e., one less)
    5. When the timer reaches zero, the countdown will stop and the paragraph tag (2c) will be removed and be replaced by a <button> tag labeled "New Timer"
    6. When the <button> tag (2e) is pressed, it will be removed and the <input> and <button> tags (1a, 1b) will be recreated with their original formats

In: Computer Science

Which of the following is a denial of service attack? Group of answer choices When a...

Which of the following is a denial of service attack?

Group of answer choices

When a cracker enters a system through an idle modem, captures the PC attached to the modem, and then gains access to the network to which it is connected.

Both a perpetrator who sends hundreds of messages from randomly generated false addresses, overloading an Internet service provider's e-mail server AND a perpetrator who e-mails the same message to everyone on one or more LISTSERV lists are denial of service attacks.

When an e-mail message is sent through a re-mailer, who removes the message headers making the message anonymous, then resends the message to selected addresses.

When the perpetrator e-mails the same message to everyone on one or more LISTSERV lists.

When a perpetrator sends hundreds of messages from randomly generated false addresses, overloading an Internet service provider's e-mail server.

In: Computer Science

1 mole of H2 and 0.5 mole of O2 gases at 298K are introduced into an...

1 mole of H2 and 0.5 mole of O2 gases at 298K are introduced into an insulating reaction chamber, which has a volume of 10 liters and already contains 2 moles of water. Reaction between H2 and O2 is triggered by a spark. Answer the following questions: i) Is the reaction product in the chamber water or steam? What is its temperature? ii) The reaction product pushes a piston through a reversible adiabatic expansion until the pressure in the reaction chamber drops to 1 bar. How much work does the system do? Useful data: enthalpy of reaction of H2O ΔfH(H2O)(298K) = -240 kJ/mol, heat capacity of liquid water C(v,l) = 75 J/(mol·K), heat capacity of steam C(v,g) = 28 J/(mol·K), enthalpy of vaporization of H2O ΔvapH(H2O) = 41 kJ/mol. Assume that liquid water boils at 373K and steam behaves like an ideal gas in the considered situation.

In: Chemistry