Questions
IP adress is 195.20.1.0/24 Design the network as per the requirements below: -        The company is composed...

IP adress is 195.20.1.0/24
  1. Design the network as per the requirements below:

-        The company is composed of 3 Branches, namely: Head Office (HO), Northern Governorate Branch (NGB) and Southern Governorate Branch (SGB).

-        Each branch is represented by a router. Utilize 1841 routers.

-        These branches are separated by WAN links where the HO is connected to both branches.

-        HO has 2 LANs and NGB and SGB have 1 LAN each. Use 2960 switches.

-        Utilize any Class C address and assign the appropriate IP addresses for the interfaces and end devices.

-        Place 5 hosts in each LAN.

-        Label your network.

Rubrics:

3 points – correct LAN design

4 points – correct LAN addresses

3 points – correct serial link addresses

TOTAL= 10 points

  1. Configure the network by Static Routing.

3 points – correct Router LAN port configuration

2 points- correct Router WAN port configuration

3 points – correct end devices addresses

2 points – complete network convergence

TOTAL= 10 points

In: Computer Science

python: people = { "Molan": { "age": 46, "seIdentity": "Dan Jukes", "supowers": [ "Radiaon Immunity", "Turni...

python:

people = {

"Molan": {

"age": 46,

"seIdentity": "Dan Jukes",

"supowers": [

"Radiaon Immunity",

"Turni tiny",

"Radiati blast"

]

},

"Etlame": {

"age": 1800,

"seIdentity": "Unknown",

"supowers": [

"Immortality",

"Heat Immunity",

"Inferno",

"Teleportation",

"Interdi travel"

]

}

#output all people ages as set

# out old people age from dict with name

In: Computer Science

C++ Please create 4 different files with this respective names main.cpp , Pokemon.h , Pokemon.cpp Move.h...

C++

Please create 4 different files with this respective names

  • main.cpp , Pokemon.h , Pokemon.cpp Move.h

16.5 Homework 5

Introduction

Students will create a C++ program that simulates a Pokemon battle mainly with the usage of a while loop, classes, structs, functions, pass by reference and arrays. Students will be expected to create the player’s pokemon and enemy pokemon using object-oriented programming (OOP).

Scenario

You’ve been assigned the role of creating a Pokemon fight simulator between a player’s Pikachu and the enemy CPU’s Mewtwo.

You need to create a simple Pokemon battle simulation that will run until one of the pokemon’s health points (HP) reaches 0. In the simulation, the player’s Pikachu will battle the enemy Mewtwo. The Mewtwo will always be the first one to attack, then you’ll attack, and so on until the simulation ends (one of the players runs out of health points). Additionally, Mewtwo will only use one attack on the player, whereas the player's Pikachu has 3 attack options. They can either use “Thundershock”, “Quick Attack”, or “Electro Ball”. Once the battle is over, you will be greeted with the message “You win” or “You lose” depending on whether or not the player’s pokemon won the battle.

Instructions to complete the assignment

Your code must perform these major operations:

  • Utilize a while loop to continuously get each person’s turn (player and CPU)
  • Use OOP to create a Pokemon object, allowing 3 attacks which are to be made using functions
  • Use an array to hold the move structs in your Pokemon class
  • Using print statements that reflect the status of the battle

Move.h (Move Struct) Each move struct must have the following attributes:

  • Name (string)
  • Damage (int)

Pokemon.h and Pokemon.cpp (Pokemon Class) Each pokemon class must have the following (pritvate) attributes:

  • Name (string)
  • Health (int)
  • Moves (Array of 3 Moves)
  • isConfused (boolean)

And will have the following (public) member functions:

  • Class constructor. The class constructors takes in name as parameter (Mewtwo or Pikachu) and creates the pokemon object accordingly with the right values for health and available attacks (details in the list below). Note that Mewtwo only gets one attack, so 2 elements of the Moves array will remain empty.
  • Mutators (setHealth, setIsConfused, setMoves). In particular, setMoves set all moves at once and requires 6 parameters, a string and a point value for each move, in this order: string move1, int damage1, string move2, int damage2, string move3, int damage3
  • Accessors (getHealth, getIsConfused)
  • Void type function move(int index, Pokemon& target): this function uses as parameter the index of the attack to use (from 0 to 2) and a reference to the pokemon who is being attacked. The health of the target will be reduced according to the attack received. If Electro Ball is used, the target's health does not change but they get confused and skip the next turn.
  • Void type function displayMoves: This function presents the user with a list of available moves, in this format:
Thunderbolt, Electro Ball, or Quick Attack

Pokemon stats

  • Pikachu (274 HP)
    • Thunderbolt (-125 HP)
    • Electro Ball (Confuses a pokemon, target skips a turn)
    • Quick Attack (-90 HP)
  • Mewtwo (322 HP)
    • Psycho Cut (-90 HP)

main.cpp

In the main file, create two pokemon objects (a Mewtwo and a Pikachu) and a loop with the following sequence of actions:

  • Mewtwo attacks Pikachu
  • Pikachu displays moves
  • User selects move
  • Pikachu attacks Mewtwo

Please Test the files.......

Console Input/Output

• Sample input 1

Thunderbolt    
Electro Ball
Thunderbolt
Thunderbolt

Sample output 1

Mewtwo used Psycho Cut
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Thunderbolt
Mewtwo used Psycho Cut
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Electro Ball
It confused Mewtwo!
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Thunderbolt
Mewtwo used Psycho Cut
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Thunderbolt
You win

Sample input 2

Thunderbolt
Quick Attack
Electro Ball
Quick Attack

Sample output 2

Mewtwo used Psycho Cut
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Thunderbolt
Mewtwo used Psycho Cut
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Quick Attack
Mewtwo used Psycho Cut
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Electro Ball
It confused Mewtwo!
Thunderbolt, Electro Ball, or Quick Attack
Pikachu used Quick Attack
Mewtwo used Psycho Cut
You lose

In: Computer Science

Discuss the impact of computer science on various aspects of modern society, such as art, health...

Discuss the impact of computer science on various aspects of modern society, such as art, health services, learning, Security, Privacy etc...(paragraph)

In: Computer Science

You are to write a program using Java that will simulate a slot machine with four...

You are to write a program using Java that will simulate a slot machine with four wheels. It will determine the amount of money won for each spin. The four wheels spin and stop showing a value between 0 and 9 inclusive. It costs $2 to play.

•You win $500 (but not the $2 you bet) if you get 4 wheels the same.

•You win $10 (but not the $2 you bet) if you get exactly 3 of a kind.

•You win $5 (but not the $2 you bet) if you get two pairs.

•You win $2 if you get 2 wheels the same (That is, you break even).

•You win nothing and lose your $2 bet if you get no matches.

Your program must use 4 methods:

1.One to randomly generate the 4 wheel values.

2.One to output the result of the spin.

3.One to compute the win or loss and print the correct message

4.Finally, one to output new balance and a nice line break graphic as seen below.

Input and Output:Your program will randomly generate a starting balance between $100 and $200 inclusive. Your program will randomly generate four integers (1 for each wheel).Your program will output a description of the input combination and the amount you won or lost.Your program will output your new balance after each spin.

Please help

In: Computer Science

It is very important to see oppression as a structural issue without taking on individual guilt...

It is very important to see oppression as a structural issue without taking on individual guilt for historical injustices. Explain what this means and why it is important. Why does this matter? Be sure to include the concept of the "luxury of obliviousness" in your answer. (Can someone answer this as long as possible)

In: Computer Science

Software Engineering Process Models Question 4 (a) Give a description of the waterfall process model. In...

Software Engineering Process Models
Question 4
(a) Give a description of the waterfall process model. In your answer you should describe the main tasks that are conducted, and the order in which they are carried out. You may want to include a diagram to clarify your answer.
[7 marks]
(b) Describe one advantage and one disadvantage of adopting the waterfall process model in comparison to other process models.
[4 marks]
(c) Describe the key principles which underlie Agile software development.
[8 marks]
(d) Risk management is an important part of software project planning. Describe what is meant by a risk and give two examples of risks which could seriously affect a project.
[4 marks]

In: Computer Science

Explain in your own words what is meant by the .NET term of "master pages"? Include...

Explain in your own words what is meant by the .NET term of "master pages"? Include an example.

In: Computer Science

Visit the web site of one of the following government agencies: •            Federal Trade Commission •            FFIEC • &nbs

Visit the web site of one of the following government agencies:

•            Federal Trade Commission

•            FFIEC

•            Federal Drug Administration

Search the site for information about the agency’s standards related to information security. Study the information you find and draw some conclusions about it. How are the regulations presented? How easily can businesses access and follow these regulations? Summarize your findings in a brief report (06 - 08 pages)

In: Computer Science

Write a java program that presents the user with the following menu Linear Search Binary Search...

Write a java program that presents the user with the following menu

Linear Search
Binary Search
The user can choose any of these operations using numbers 1 or 2. Once selected, the operation asks the user for an input file to be searched (the file is provided to you and is named input.txt).

If option 1 or 2 is selected, it asks the user for the search string. This is the string that the user wants the program to search in the input file. Implement two methods stubs:

1) linearSearch - takes a file and a search string as inputs, and returns a boolean signifying found or not found.

2) binarySearch - takes a file and a search string as inputs, and returns a boolean signifying found or not found.

You will develop these stubs into actual functionality in the next assignment.

Sample Output 1:

Please select from below:

1. Linear Search

2. Binary Search

Your selection: 1

Please enter the input file to searched: input.txt

Please enter the string to be searched in input.txt: RaDar

Search functionality is under maintenance. Thank you for using my search program.

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

Sample output 2

Please select from below:

1. Linear Search

2. Binary Search

Your selection: 90

Please select between option 1 or 2

Your selection: 2

Please enter the input file to searched: words.txt

Please enter the string to be searched in words.txt: Recoil

Search functionality is under maintenance. Thank you for using my search program.

In: Computer Science

Give an example of a non-regular Context-Free Language that can be recognize by a Deterministic Pushdown...

Give an example of a non-regular Context-Free Language that can be recognize by a Deterministic Pushdown automata and one that cannot.

In: Computer Science

Using C# create a new grade book program for a teacher. We have a class with...

Using C# create a new grade book program for a teacher.

We have a class with 10 students who have each taken 5 tests. Create an array to hold:

  1. Each student’s name
  2. Each test grade
  3. The average for each student's tests

Use a random number generator to generate the test scores for each student. The student names may be hard-coded into the array.

Create and call a method that calculates and stores each student’s average in the array.

Create and call a method that displays the grades and average for each student.

In: Computer Science

C++ Modify FunctionTable.cpp so each that each function returns a string(instead of printing out a message)...

C++

Modify FunctionTable.cpp so each that each function returns a string(instead of printing out a message) and so that this value is printed inside of main().

//: C03:FunctionTable.cpp
// Using an array of pointers to functions
#include <iostream>
using namespace std;
// A macro to define dummy functions:
#define DF(N) void N() { \
cout << "function " #N " called..." << endl; }
DF(a); DF(b); DF(c); DF(d); DF(e); DF(f); DF(g);
void (*func_table[])() = { a, b, c, d, e, f, g };
int main() {
while(1) {
cout << "press a key from 'a' to 'g' "
"or q to quit" << endl;
char c, cr;
cin.get(c); cin.get(cr); // second one for CR
if ( c == 'q' )
break; // ... out of while(1)
if ( c < 'a' || c > 'g' )
continue;
(*func_table[c - 'a'])();
}
}

In: Computer Science

Write a fragment of MIPS code to convert temperature in Kelvin to Fahrenheit

Write a fragment of MIPS code to convert temperature in Kelvin to Fahrenheit

In: Computer Science

Static methods can be called directly from the name of the class that contains the method....

Static methods can be called directly from the name of the class that contains the method. Static methods are usually created to do utility operations. For example: public class Test{ public static int timesTwo(int value){ return value * value; } } public class TestDriver{ public static void main(String[] args){ int var = Test.timesTwo(5); System.out.println(var); } } Create a class called ManyLinkedLists. It will contain a static method called createLinkedList(). That method takes an argument that is a constant defined in the ManyLinkedLists class. The identifier of the constants should describe a type of linked list. When the createLinkedList method is called, it should return a linked list object of the type identified by the constant. For example: DoubleEndedList del = ManyLinkedLists.createLinkedList(ManyLinkedLists.DOUBLEENDEDLIST); Give the createLinkedList method the ability to return the linked lists described below: A double-ended linked list. A doubly linked list.

In: Computer Science