ormation about each player. The UML diagram is given below. Player -name: string -symbol :char Player (name:string,symbol:char) getName():string getSymbol():char getInfo():string
Q: 1) Write, compile, and run a C++ program that specifies three one-dimensional arrays named price, a...
A: 1. declare price, amount, total using a single dimensional array 2. Using for loop get values of pri...
Q: Assume you want to keep track of changes to the takes relation. Can the above approach ensure that m...
A: Introduction: The basic principle of an audit trail is the supervision ( or tracking) of the usage a...
Q: Android system has several application building blocks, such as, Activity, In and IntentReceiver, No...
A: a) In Android app development, a content provider is utilized to centralize material in one location...
Q: Big-O Complexity Remember, Big-O time complexity gives us an idea of the growth rate of a function. ...
A:
Q: "warni
A: given - How does canary work? What is the "warning" it will give you and when it will give you such ...
Q: This causes a recurring impasse in your installation's spooling process. Is it possible to resolve ...
A: In a functioning framework, a deadlock arises when at least two cycles need an asset held by the oth...
Q: Convert the following two's complement binary number to decimal: 101001 (2) A) -23 B) 41 C) 9 D...
A: In two's complement representation, if the most significant bit (first from left, MSB) is 1, that me...
Q: Explain how string functions are used to handle C-strings.
A: Introduction: the question is about how string functions are used to handle C-strings. and here is t...
Q: How does the compiler tell one method from another with the identical name?
A: Introduction: The compiler distinguishes a method from other methods which have the same names by th...
Q: Both explain what a brute force assault is and why admin/root accounts are vulnerable.
A: Introduction: Both explain what a brute force assault is and why admin/root accounts are vulnerable.
Q: A description of five common network topologies should be included. Which do you consider to be the ...
A: The five common network topologies are as follows:- (1) Mesh Topology Mesh Topology is also known as...
Q: Given an input string, complete a helper method that extracts the vowels and returns the string All ...
A: In this question, we are asked to return vowel only from the string by using recursion only Explaine...
Q: C Language Explain what is the difference between a doubly linked list and singly linked list? Give...
A: The solution to the given problem is below.
Q: How do you remove a form from a project and erase its associated file from the hard drive?
A: Introduction the question is about How do you remove a form from a project and erase its associated ...
Q: Modify this program to open the file "Customers.dat" so that all data can be read, and data written ...
A: Introduction: Modify this program to open the file "Customers.dat" so that all data can be read, and...
Q: List five ethical principles and (FIVE) five policies that regulate the usage and deployment of big ...
A: Introduction: Here we are required to list five ethical principles and five policies that regulate t...
Q: Write a in C++ Using take while loop from your entered will that पन्ीिनति in string anay input and u...
A: the c++ code is an given below :
Q: Which one of these is Not a form of energy? O thermal O bllistic electrical O mechanical
A: INTRODUCTION: In the given problem statement, we are asked one question regarding form of energy. So...
Q: Trailing zeros at the end of a number, but before an implied decimal point, are ambiguous. True F...
A: Trailing zeros at the end of a number but before an implied decimal point are ambiguous and should b...
Q: A U (B U C) (CU B) - (A N B) (A - B ) N (A - C)
A:
Q: Scheduling Please provide the following: Gantt Chart CPU Utilization Average Waiting Time Aver...
A: I have answered all the parts and have uploaded image for the solution.
Q: When do you believe it is best to keep all data and applications in-house, and when do you believe i...
A: Introduction: Yes, your knowledge is comparatively safe within the cloud—likely far more thus than o...
Q: Examine the future of AI in light of current developments.
A: We will see current developments in field of AI and its future. AI means making machines intelligent...
Q: Explain what it means to synchronise desktops and mobile devices in detail. In your response, includ...
A: Introduction: Explain what it means to synchronize desktops and mobile devices in detail. In your re...
Q: A disadvantage of the barter system is that
A: Barter system is the system in which goods or services are exchanged in the business and money usage...
Q: tion. Often they indicate sequence-specific binding sites for proteins and other important markers. ...
A: The solution of the following question is: CODE 1: class DNAMOTIF:...
Q: safeguards against wireless credentials being intercepted by Man-in-the-Middle (MITM)
A: Examine several safeguards against wireless credentials being intercepted by Man-in-the-Middle (MI...
Q: Help me write this in cpp or c plus plus language thank you [Exer A.] SAMPLE DIALOG (OddSum.cpp) ...
A: Here, we are going to write the code to print the sum of first N odd integers. Using while loop and ...
Q: f:A B A = {0, 1, 2}, B = {0,1} f(0) = 1, f(1) = 0, f(2) = 1 1.Is f, as described above, a function? ...
A: Yes f is a function. This is because each element of its domain A is assigned to exactly one element...
Q: Look for an example of a cost overrun in an information systems development project by browsing the ...
A: He supplied information on an example of an information systems development project with cost overru...
Q: Q2) write a C++ program to generate the following pattern using the functions SpacesOnesLine(S, Ones...
A: The program is written in C Language. Check the program screenshot for the correct indentation. Plea...
Q: The operation F(X, Y, Z) = (!X + !Y + !Z) can be implemented with a single input signals and one out...
A: Here in this question we have given a some boolean expression and we have asked to implement with si...
Q: Write in C++ frogram will loop that from a while take in string aray input and user check that progr...
A: C++ Program: #include <iostream>using namespace std; void printString(string& str){ // f...
Q: d how ca
A: given - What is a distributed denial of service attack, and how can a single individual coordinate o...
Q: Which of the many network topologies would you recommend?
A: Below find the solution
Q: What are the considerations that should be made while switching from one system to another? Give det...
A: Introduction: Keep the following in mind while switching from one system to several: Changing a sing...
Q: crew transformation matrix, in a screw transformation, prove th x Rot (a. 3) = Rot (ø. 3) x Trans(A,...
A: Screw transformation matrix multiplying the translation matrix by the rotation matrix. Trans(A, i³)...
Q: What effect does Al have on "Systems Analysis and Design"?
A: Introduction: The primary objective of systems analysis and design is to enhance organizational syst...
Q: Use an example to explain how business can better utilize disruptive and sustaining technologies for...
A: -innovation and technology plays vital role in modern bussiness and the working world. -the modern e...
Q: Explain why an application developer could choose to execute a programme via UDP rather than TCP.
A: Introduction: TCP is, in fact, a connection-oriented programming language. UDP is a programming lang...
Q: Sequential and direct access are two methods for locating data in memory. Discuss why direct access ...
A: Answer the above questions are as follows:
Q: Which of the following computer components is an example of peripheral device? a. Keyboard b. Cach...
A: Which of the following computer components is an example of peripheral device? a. Keyboard b. Cach...
Q: ks' topologies.
A: Types of Network TopologiesStar Topology: A wire connects all of the devices in a star topology to a...
Q: If a sequential program takes two hours to execute and 1500 cores are available to use, what is the ...
A: I have answer this question in step 2.
Q: nt a meet-in-the-middle attack on triple DES with three keys, assuming you had enough known plaintex...
A: 1.The meet in the middle attack is one of the known plain text attack.The intruder has to know some ...
Q: When do signature-based detection methods become ineffective?
A: Introduction: One of the biggest shortcomings of the signature-based malware detection approach is t...
Q: Please show detailed explanation. Thanks. What is the order of n, O(f(n)) of the following function...
A: Find the answer with explanation given as below :
Q: What is the function of a firewall, and how can it be employed in your company?
A: A firewall is a security gadget as PC equipment or programming. It can assist with safeguarding your...
Q: Python code not working, please check my code. Here is the question it is based off: Building and ...
A: ANSWER:-
Q: Examine how the debugging process aided in the development of more secure, resilient apps. In additi...
A: Introduction debugging is the process to detect and remove the existing potential errors that are pr...
Question:
Write a
Player |
-name: string -symbol :char |
Player (name:string,symbol:char) getName():string getSymbol():char getInfo():string |
The tic tac toe board will be represented by a two dimensional array of size 3 by 3 characters. At the start of the game each cell is empty (must be set to the underscore character ‘_’).
Program flow:
- Your program must ask for each player’s name and their special symbol or character (usually an ‘X’ or ‘O’).
- Display each player’s name and symbol.
- The program must then display the board (the 2 dimensional array).
- The player whose turn it is has their name displayed and is asked for a row and column number to place their symbol. They can enter -1 -1 as the row and column number to quit.
- Repeat 2 and 3 until one player enters -1 -1.
Your program does not have to detect if the game is won. It simply allows the players to place symbols on the board.
Step by step
Solved in 2 steps
- Question: Write a program to Simulate a game of tic tac toe. A game of tic tac toe has two players. A Player class is required to store /represent information about each player. The UML diagram is given below. Player -name: string -symbol :char Player (name:string,symbol:char) getName():string getSymbol():char getInfo():string The tic tac toe board will be represented by a two dimensional array of size 3 by 3 characters. At the start of the game each cell is empty (must be set to the underscore character ‘_’). Program flow: Your program must ask for each player’s name and their special symbol or character (usually an ‘X’ or ‘O’). Display each player’s name and symbol. The program must then display the board (the 2 dimensional array). The player whose turn it is has their name displayed and is asked for a row and column number to place their symbol. They can enter -1 -1 as the row and column number to quit. Repeat 2 and 3 until one player enters -1 -1. Your…The Spider Game Introduction: In this assignment you will be implementing a game that simulates a spider hunting for food using python. The game is played on a varying size grid board. The player controls a spider. The spider, being a fast creature, moves in the pattern that emulates a knight from the game of chess. There is also an ant that slowly moves across the board, taking steps of one square in one of the eight directions. The spider's goal is to eat the ant by entering the square it currently occupies, at which point another ant begins moving across the board from a random starting location. Game Definition: The above Figure illustrates the game. The yellow box shows the location of the spider. The green box is the current location of the ant. The blue boxes are the possible moves the spider could make. The red arrow shows the direction that the ant is moving - which, in this case, is the horizontal X-direction. When the ant is eaten, a new ant is randomly placed on one of the…Object oriented programming C++ Use Classes Write a C++ program in which each flight is required to have a date of departure, a time of departure, a date of arrival and a time of arrival. Furthermore, each flight has a unique flight ID and the information whether the flight is direct or not.Create a C++ class to model a flight. (Note: Make separate classes for Date and Time and use composition).add two integer data members to the Flight class, one to store the total number of seats in the flight and the other to store the number of seats that have been reserved. Provide all standard functions in each of the Date, Time and Flight classes (Constructors, set/get methods and display methods etc.).Add a member function delayFlight(int) in the Flight class to delay the flight by the number of minutes pass as input to this function. (For simplicity, assume that delaying a flight will not change the Date). Add a member function reserveSeat(int) which reserves the number of seats passed as…
- Assignment 7 B: Battle! Language is in C++ (pictures include the sample output) Recreate a basic battle system from a video game. You will create a character and then use it to battle a computer generated opponent. There are three possible classes, with the following attributes: Sword Fighter Dance BattlerHP: 120Attack: 40Defense: 0.20ClassID: 1 Unicorn SorcererHP: 80Attack: 35Defense: 0.60ClassID: 2 Dance BattlerHP: 100Attack: 20Defense: 0.42ClassID: 3 You will create a NPC class that has these three attribute. It should also have an attribute for Name.You will then create the following methods in the NPC class: A constructor that takes in a Name string and a ClassID int. It should use the value of the ClassID to assign values to the other attributes (using the chart above) Getter methods for all five attributes, and a Setter method for HP that subtractsthe object’s HP by the value passed in. calculateAttack◦ This method returns a float value. It takes in a float that represents…Assignment 7 B: Battle! Language is in C++ (pictures include the sample output) Recreate a basic battle system from a video game. You will create a character and then use it to battle a computer generated opponent. There are three possible classes, with the following attributes: Sword Fighter Dance BattlerHP: 120Attack: 40Defense: 0.20ClassID: 1 Unicorn SorcererHP: 80Attack: 35Defense: 0.60ClassID: 2 Dance BattlerHP: 100Attack: 20Defense: 0.42ClassID: 3 You will create a NPC class that has these three attribute. It should also have an attribute for Name.You will then create the following methods in the NPC class: A constructor that takes in a Name string and a ClassID int. It should use the value of the ClassID to assign values to the other attributes (using the chart above) Getter methods for all five attributes, and a Setter method for HP that subtractsthe object’s HP by the value passed in. calculateAttack◦ This method returns a float value. It takes in a float that represents…Write in C++ Language (Happy Coding):Create a class named 'Programming'. While creating an object of the class, if nothing is passed to it, then the message "I love programming languages" should be printed. If some String is passed to it, then in place of "programming languages" the name of that String variable should be printed.For example, while creating the object if we pass "cpp", then "I love cpp" should be printed.
- Java Programming: ConWay World Conway’s game of life is a simple simulation of life forms in a two dimensional grid. The ConwayCell implements the standard behavior of a call in Conway’s Game of Life. You only need to implement and test two new classes. You will create two different cells, derived from AbstractCell. 1. Alternating Cell The first class that you should create is a class named AlternatingCell. This is a cell that should alternate between being alive and dead with each generation. Add one or more of your AlternatingCells to your ConwayWorld. You can see how to add a cell in line 15 - 20 of Main.java. Give your AlternatingCell a unique display character when it is alive so that you can see it in your conway world. 2. Your own cell For the second cell you should feel free to implement any behavior that you want. If you are having trouble thinking of ideas then post up a question. You can add your custom cell in just a few places in the world, or you might choose to replace…class Airplane – highlights -- planeID : String -planeModel: String //”Boeing 757” etc. --seatCapacity : int //would vary by outfitting ………… Assume getters and setters, toString(), constructor with parameters and constructor ……………… Write lambdas using a standard functional interface to: a) Given a plane object and a required number of seats as an input, determine if the given plane meets or exceeds the required capacity b) Output the plane description if capacity is less than 80% of a specified number (We would use his for planning aircraft assigned to various routes. ) c) Adjust the seats in a plane by a specified positive or negative number [after modifications have been made to the interior.] …and write an example for each showing the usage, using an Airplane instance plane1Language is c++ Assignment 6 C: Minesweeper - Simplified. For many years, computers sold with the Windows operating system would contain a game called M inesweeper. The player would be presented with a grid, where they would have to click an empty part of the map. If they clicked on a hidden mine, the game would be instantly over. However, if they clicked a safe spot, a hint about nearby mines would be displayed and the player would click another spot. The goal would be to flag all the hidden mines without hitting one. (As an aside, many people did not know these rules and just clicked around randomly until they hit a mine)We will be developing a simplified version of this game. You will prompt the user for a grid size and then created a 2D array with equal width and height (C++ students: Check the Appendix for more information on how to do this). You will initialize the 2D char array with each element equallying a ‘?’ symbol. You will then randomly generate one “mine” value per…
- Problem Class In this exercise, you are going to create the Problem class. The Problem class is used to help simulate a math fact, for example: 2 + 5 = Your class needs to contain two contructors, one that takes String, int, int that represts the operator sign(+, -, *, or /), the minimum, and maximum values for the number range, and a second constructor that takes only a String that represents the operator sign. For the second constructor, the minimum should default to zero and the maximum to ten. Your Problem object should generate 2 random integers between the minimum and maximum values (inclusively). Each Problem object should only have one set of numbers that do not change. While you may include additional helper methods, two methods need to be available to the user. The first is the answer method that should return a double that represents the answer to the problem. The second is the toString that should return a String that represents the problem. The format should be: number…Problem Class In this exercise, you are going to create the Problem class. The Problem class is used to help simulate a math fact, for example: 2+5= Your class needs to contain two constructors, one that takes String, int, int that represents the operator sign(+,-, *, or /), the minimum, and maximum values for the number range, and a second constructor that takes only a String that represents the operator sign. For the second constructor, the minimum should default to zero and the maximum to ten. Your Problem object should generate 2 random integers between the minimum and maximum values (inclusively). Each Problem object should only have one set of numbers that do not change. While you may include additional helper methods, two methods need to be available to the user. The first is the answer method that should return a double that represents the answer to the problem. The second is the toString that should return a String that represents the problem. The format should be: number…Object Oriented Programming in JAVA You are part of a team writing classes for the different game objects in a video game. You need to write classes for the two human objects warrior and politician. A warrior has the attributes name (of type String) and speed (of type int). Speed is a measure of how fast the warrior can run and fight. A politician has the attributes name (of type String) and diplomacy (of type int). Diplomacy is the ability to outwit an adversary without using force. From this description identify a superclass as well as two subclasses. Each of these three classes need to have a default constructor, a constructor with parameters for all the instance variables in that class (as well as any instance variables inherited from a superclass) accessor (get) and mutator (set) methods for all instance variables and a toString method. The toString method needs to return a string representation of the object. Also write a main method for each class in which that class is…