What is the output of the following program? Carefully note the placement of the virtual keyword. lass Pet{ public: Pet(string n = "") : name(n){} virtual ~Pet(){cout<< "Pet dtor"
Q: Why is it necessary for the network layer protocol to offer packetizing services to the transport…
A: Encryption: The transport layer is responsible for data segmentation, transmitting segments to…
Q: Cache memory is a crucial part of today's computers. Explain the purpose of cache memory and why…
A: According to the question cache memory is most important for central processing unit to remember…
Q: What Are the Benefits of Networked Communication?
A: Introduction: Computer networks are the most effective and trustworthy method for businesses to…
Q: For example, if you were to create a media company and needed graphic designers and media producers,…
A: A backup storage device replicates data in use. A backup storage device replicates data in use.…
Q: What is the purpose of the transport layer providing a packetizing service to the network layer? If…
A: Packetization service in network layer: The network layer's packetization function makes it easier…
Q: 36 95 Figure 1
A: According to answering policy we can answer only 1st question. Please resubmit remaining questions
Q: Collision domains broadcast domains is a Cisco switch command that can be used to debug VLAN trunk…
A: Can use the display interface trunk command to determine whether the local and peer-native VLANs are…
Q: Binary adder
A: Answer is in given below:-
Q: In your own words, Explain What are the issues regarding the use of digital photography in police…
A: Photography has always played a very important part in policing. In fact, photographs…
Q: What are the benefits of loose coupling and interoperability in SOA?
A: Loose coupling may improve system efficiency by enabling connections between components to be…
Q: For what reasons does an operating system normally offer specific calls for accessing directory…
A: There are a number of operations that can be carried: The working directory should be changed.You…
Q: Consider the network topology in the figure above and assume that the routers are configured to use…
A: Answer
Q: How often do two Internet service providers (ISPs) at the same level peer with one another? An IXP…
A: Foundation: Two ISPs at the same level of the hierarchy often peer with each other to transmit and…
Q: Write three-line summaries on the following: Manchester codes (what/why/benefits/disbenefits)
A: Manchester code: The signal synchronises itself, which is the main benefit of Manchester encoding.…
Q: I'd want to know which of the several network topologies is most appealing to you?
A: Network topology is basically the physical layout or logical layout in which the nodes are…
Q: How can a distributed denial of service attack be orchestrated by a single person?
A: DENIAL OF SERVICE ASSAULT DISTRIBUTED: A distributed denial-of-service (DDoS) attack is a malicious…
Q: def dont(wave): if len(wave) < 1: return [""] theg [] for its in range(len(wave)): for juh in…
A: Solution: Given,
Q: Why is IPv6 superior than IPv4 in many ways? What security services are provided by the IP…
A: The following table summarizes the advantages of IV6 over IPv4: 1. Routing That Is Efficient 2.…
Q: 1.) Determine the order of trasversal for the nodes using the ff methods for the figures: DFS -…
A: As per guidelines I can answer only first question. I hope you will understand. Thank You.
Q: What are the different kinds of firewalls and how are they used?
A: Solution for the computers or devices that are connected Firewalls that filter packetsGateways at…
Q: Make a list of databases that contain your data. How is each database's data stored, and how often…
A: Given: Tables are used to store all of the information in a database. If a number in a field of the…
Q: Define a template function to calculate the area and perimeter of the rectangle and then in your…
A: Please refer below for your reference: Language used is C++: #include <iostream>using…
Q: What were the three options available to GE for building the hardware and software capabilities…
A: An object's hardware capabilities specify the hardware requirements of the platform on which the…
Q: An example of a firewall in cloud computing is shown here
A: The firewall protects the company from the outside world. It is composed of three layers: physical,…
Q: 2.) Determine the order of trasversal for the nodes using the ff methods for the figure: DFS,…
A: In Depth First Search Traversal, we will use a stack data structure to implement the traversal and…
Q: iopic Is gazing at the OS and TCPPP odel encouraging troubleshooting in any way? Is the TCPPer O…
A: Transmission Control Protocol/IP -(TCP/IP) and Open Systems Interconnection- (OSI): TCP/IP follows a…
Q: Round Robin Process Suppose we have a four (4) core processor and all processes are designed to…
A: Here i am applying round robin scheduling:…
Q: What are the current network trends in computer science?
A: Given Question: What are the latest computer science network trends?
Q: Declare a one-dimensional integer array of 10 elements. Using C++ a loop generate 10 random numbers…
A: #include<bits/stdc++.h>using namespace std;int main(){ int arr[10]; for(int…
Q: If you've never heard of a distributed denial-of-service assault before, let me explain.
A: As the computer and information technologies are getting advance day-by-day, the network security…
Q: Assume you're a systems analyst working on a comprehensive test plan. Describe the testing…
A: System Analyst: A system analyst is someone who gathers and organizes data regarding software. The…
Q: Application-layer messages are what you may call them. Is this part of the transport layer?
A: Application-layer message: information which an application needs to send and went to the transport…
Q: TCP/IP Internet protocol stack has five levels. What are they called? Is there a primary role for…
A: Given: There are five layers to the TCP/IP Internet protocol stack. So, what's their name? Does each…
Q: Name three guidelines for creating system requirements and provide a short explanation of each.
A: Introduction Name three guidelines for creating system requirements and provide a short explanation…
Q: What are the best methods for administering firewalls? Explain.
A: Firewall: Best Firewall Practices and How to Put Them in Place Every time a firewall rule is…
Q: What is an IP address, and how do you get one? Are mnemonic addresses really that simple to…
A: Introduction Unique identifier for a device on the internet or in a local network, an IP address is…
Q: Collision domains broadcast domains is a Cisco switch command that can be used to debug VLAN trunk…
A: In order to see if your VLANs and your peers' work together, type "display interface trunk." It…
Q: It is possible for a single person to initiate a distributed denial of service (DDoS) assault.
A: DDoS: DDoS attacks try to knock down a web server or online system by overloading it with data. Due…
Q: What are the program's similarities and differences?
A: Project and programme similarities It’s good for project and programme managers to understand the…
Q: Computer Science Just need help answering this question, thank you! Why are the private keys in…
A: Asymmetric encryption employs two separate but related keys. The Public Key is employed to encrypt…
Q: Q2- Write a program to read a number (n). Then print all numbers from 0 to n that are not equal to 1…
A: Solution: Given,
Q: Compare and contrast a firewall with the packetized data flow.
A: Introduction: The correct answer is option 1. Important Considerations The firewall can reassemble a…
Q: Describe one of Alan Turing's contributions to computer science.
A: Alan Turing was a mathematician, cryptographer, and computer scientist who pioneered the field.…
Q: List the several types of hardware security and tracking solutions available, as well as how they're…
A: Numerous devices are now available for protecting and tracking hardware. The primary objective of…
Q: In what ways might network designs be described?
A: The planning and implementation of a computer network architecture are called network design.…
Q: Problem Statement iven a list_of_strings (which are all lowercase letters), define and implement a…
A: Code: # Function to get minimum count of common character in all the strings in the listdef…
Q: What are the advantages of a firewall?
A: Start: You may already be participating in some of the following safe computer and internet use…
Q: Why do you use so many architectural patterns while constructing a huge system's architecture?
A: Patterns in the way that buildings are built: Usually, when designing the architecture of a big…
Q: A timing diagram with clock synchronization for Direct Memory Access (DMA)?
A: Direct memory access (DMA) is a means: Computer memory is where data and procedures for completing…
Q: 4. Let A = {a, b, c, d}, B = {a, y} and C = {m, n, 0, p}. Find a. A × B = b. В2 — |A x B x C| = с.
A:
Step by step
Solved in 2 steps
- class A Q5: Correct the following code fragment and what will be the final results of the variable a and b { protected int x1,y1,z; public: A(a, b,c):x1(a+2),y1(b-1),z(c+2) { for(i=0; i<5;i++) x1++; y1++;z++;}}; class B { protected: int x,y; public: B(a,b):x(a+1),y(b+2) { for(i=0; i<5;i++) x+=2; y+=1;}}; class D:public B, virtual public A { private: int a,b; public: D(k,m,n): a(k+n), B(k,m),b(n+2),A(k,m,n) { a=a+1;b=b+1;}}; int main() {D ob(4,2,5);}//Please Fix this program #include<iostream>using namespace std;class Point{private:int x, y;public:Point() {}Point(int x1, int y1) { x = x1; y = y1; }Point(const Point &p1) {x = p1.x; y = p1.y; } // Copy constructorint getX() { return x; }int getY() { return y; }};int main(){Point p0(); // Calling Default ConstructorPoint p1(10, 15); // Calling Parameterized constructorPoint p2 = p1; // Calling Copy constructorcout << "p0.x = " << p0.getX() << ", p0.y = " << p0.getY();cout << "p1.x = " << p1.getX() << ", p1.y = " << p1.getY();cout << "\np2.x = " << p2.getX() << ", p2.y = " << p2.getY();return 0;}Consider the following code segment and answer questions 14 and 15. class Point { public: Point (double x = -99, double y = -99) { this -> xM = x; this -> yM = y;} double getx () {return xM; } double gety () {return yM; } void setx (double x) {this -> xM = x; } void sety (double y) {this -> yM = y; } private: double xM, yM; }; 14. What is the output of the following code snippet: Point pl (100); cout << pl.getx() << " " << pl.gety(); a. The output of the program is: -99 -99 b. The output of the program is: 100 100 c. The output of the program is: -99 100 d. The output of the program is: 100 -99 e. None of the above. It doesn't compile because constructor of Point needs two arguments. 15. How many times does the constructor of class Point get called by the following code snippet: Point a (100, 200); Point b[6]; Point *c = new Point; Point *d = new Point (300, 400); a. Four times b. Three times c. Nine times d. Two times e. None of the above
- class Point { private: int x, y ; public: : x(u), y(v) {} Point (int u, int v) int getX) { return x; } int getY () { return y; } void doubleVal() { *= 2: y *= 2; } }; int main () { const Point myPoint (5, 3) myPoint.doubleVal() ; cout << myPoint.getX() << " " return 0; << myPoint.getY() << "\n"; }Note: The code is written you can just tell the explanation what is happening in the code Explain in English.Just explain the whole code. #include <iostream>using namespace std;class PrimeNumberGenerator{private:int counter;public://ConstructorPrimeNumberGenerator() : counter(0){}//Function to reset countervoid reset(){counter = 0;}int getCounter(){return counter;}//Function to return next prime number after currentPrimeint getNextPrime(){if(counter == 0){counter = 2;}else{for(int i = counter + 1; ; i++){if(isPrime(i)){counter = i;break;}}}return counter;} //Function to check if a number is prime or notbool isPrime(int num){for(int i = 2; i <= num/2; i++){if(num % i == 0)return false;}return true;}}; int main() {int option;PrimeNumberGenerator gen;cout << "Enter 1 if you want to reset\n";cout << "Enter 2 if you want to get next prime number\n";cout << "Enter -1 to quit: ";cin >> option;while(option != -1){if(option == 1){gen.reset();cout <<…26. Assume the declaration of Exercise 24. A. Write the statements that derive the class dummyClass from class base as a private inheritance. (2 lines are { and }.) "A1 is { "A2 is "A3 is )) B. Determine which members of class base are private, protected, and public in class dummyClass. "B1 is dummyClass is a de
- 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…In C++ QUESTION 14 class rectangleType { public: void setLengthWidth(double x, double y); //Sets the length = x; width = y; void print() const; //Output length and width double area(); //Calculate and return the area of the rectangle (length*width) double perimeter(); //Calculate and return the perimeter (length of outside boundary of the rectangle) private: double length; double width; }; Write the function definition for the function perimeterPLEASE HELP ME! ? Maximize and use alternative method to this code! package com.btech.pf101; import java.io.bufferedreader; import java.io.inputstreamreader; import java.util.calendar; import java.util.date; public class pawnshopcode { private static final bufferedreader br = new bufferedreader(new inputstreamreader(system.in)); private static string name; private static int age; private static string address; private static string contactno; private static int itemtype; private static string itemtypename; private static final int itemtype_gagdet = 1; private static final int itemtype_jewelry = 2; private static final int itemtype_musicinstrument = 3; private static final int itemtype_homeequipment = 4; private static final int itemtype_landtitle = 5; private static string itemdescription; private static int periodtype; private static string periodtypename; private static final int periodtype_days = 1; private…
- 8- Create an instance of the following class and call its methods. class Exam{ int grade; public: void seta (int b) (grade=b; } int geta () {return grade; } 9- When the word const is put before the variable definition, what does that mean? 10- How to concatenate two strings in C++ language? C++Trace through the following program and show the output. Show your work for partial credit. public class Employee { private static int empID = 1111l; private String name , position; double salary; public Employee(String name) { empID ++; this.name 3 пате; } public Employee(Employee obj) { empID = obj.empĪD; пате %3D оbj.naте; position = obj.position; %3D public void empPosition(String empPosition) {position = empPosition;} public void empSalary(double empSalary) { salary = empSalary;} public String toString() { return name + " "+empID + " "+ position +" $"+salary; public void setName(String empName){ name = empName;} public static void main(String args[]) { Employee empOne = new Employee("James Smith"), empTwo; %3D empOne.empPosition("Senior Software Engineer"); етрOпе.етpSalary(1000); System.out.println(empOne); еmpTwo empTwo.empPosition("CEO"); System.out.println(empOne); System.out.println(empTwo); %3D етpОпе empOne ;using System; class Program { publicstaticvoid Main(string[] args) { int number = 1; while (number <= 88) { Console.WriteLine(number); number = number + 2; } int[] randNo = newint[88]; Random r = new Random(); int i=0; while (number <= 88) { randNo[i] = number; number+=1; i+=1; } for (i = 0; i < 3; i++) { Console.WriteLine("Random Numbers between 1 and 88 are " + randNo[r.Next(1, 88)]); } } } this code counts from 1-88 in odds and then selects three different random numbers. it keeps choosing 0 as a random number everytime. how can that be fixed?