14. Assume that class B is derived publicly from class A. Class A has two functions, f1() and f2(). Function f2() is virtual. Assume the following statements statements: A* ptr=new B; ptr->f1(); ptr->f2(); Fill in the blank. The function f1() as defined in class ____ will be used. The function f2() as defined in class _____ will be used. 15. In question 14, the call to ptr->f2() is an example of _______________________
Q: When the MPU starts up for the first time it goes to the Reset vector Interrupt vector General…
A: In this problem we need to identify When the MPU starts up for the first time it goes to the and…
Q: Java (derived classes) - Pet Information
A: Coded using Java.
Q: //B. arrayRectangle[1].setLength (4.15); System.out.println(arrayRectangle[1].getLength()): QUESTION…
A: arrayRectangle[1].setLength(4.15); System.out.println(arrayRectangle[1] getLength(): QUESTION 3: Use…
Q: Suppose that in UDPClient.py, after we create the socket, we add the line: client Socket.bind(('',…
A:
Q: b) d) Identify the weakest pre-condition for the following decision that can guarantee the post-…
A: Question b The weakest precondition for this decision is that m>n and y>=18. Question d The…
Q: Compare and contrast the properties of a centralized and a distributed routing algorithm. Give an…
A:
Q: How does the NAT router differentiate two simultaneous connections which are initiated from PC1 to…
A: The two current connections from PC1 would be two different TCP connections, which would contain…
Q: Write a program that ask user to enter (a) for the numerator and denominator of each fraction and…
A: HERE IS COMPLETE PROGRAM REGARDING YOUR PROBLEM :
Q: Why will two ISPS at the same level of the hierarchy often peer with each other? How does an IXP…
A: Two ISPs have to use an intermediate ISP provider to carry out the traffic. This usage of an…
Q: at he can receive a complete possible? Why or why not? claims that he can further make multiple…
A: SummaryYes. His first claim is possible if there are enough peers in the mass for a long enough…
Q: A PC-relative mode branch instruction is 3 bytes long. The address of the instruction, in decimal,…
A: A PC-relative mode branch instruction is 3 bytes long. The address of the instruction, in decimal,…
Q: With a different word length, programs written for older IBM models would not execute on the newer…
A:
Q: Determine a good asymptotic upper bound on the recurrence T(n) = 5T(L
A: The answer is
Q: Devise a strategy for connecting LANs for a single corporation with four geographically separate…
A: Common Carrier Networks are a very common setup. Each location would have a "Internet" circuit setup…
Q: When the MPU starts up for the first time it goes to the Reset vector Interrupt vector General…
A: The question has been answered in step2
Q: What is the difference between an external iterator and an internal iterator? Describe an advantage…
A:
Q: Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes.…
A:
Q: Read “The Global Cost of Electronic Waste” and discuss the dark side of technology from e-waste to…
A: The expansion of the IT and communication sectors has increased the use of electronic equipment…
Q: Hello Expert please help to solve the following questions with C programming Which of the following…
A: Please refer below for your reference: According to company guidelines we are restricted to answer…
Q: QUESTION 3 Write one ARM instruction to do the following operation? LDRH R6, [RO] ADD RO, RO, #10
A:
Q: :. Software Application (screenshots of the system/simulation)
A: EMU8086 which refers to the microprocessor of the emulator which is the free emulator and used for…
Q: What is SET? Explain the Objectives of SET.
A: The answer is given below step.
Q: A directory is basically a list of names paired with inode numbers. When a directory is first cre…
A: A directory is collection of files which stores and arrange files in sequence. When you don't give…
Q: Suppose Bob joins a BitTorrent torrent, but he does not want to upload any data to any other peers…
A: Below is the answer to above question..
Q: Write a Python program that implements the Taylor series expansion of the function (1+x) for any x…
A: Below I have provided the python code of the given program. Also, I have attached the output of the…
Q: We noted that network layer functionality can be broadly divided into data plane functionality and…
A: According to the question, we have to explain Main functions of the data plane and Main functions of…
Q: IN JAVA SCRIPT Create a function that returns the thickness (in meters) of a piece of paper after…
A: In this problem, we need to design the JAVA Script program. Input - one argument Output - integer…
Q: What happens when a TCP based packet exits a NAT firewall
A:
Q: What is the difference between a host and an end system? List several different types of end…
A: Host system: A device that connects to other devices on a network is referred to as a host. End…
Q: IN JAVA SCRIPT Create a function that takes an integern and reverses it. Examples rev (5121) ➡…
A: Algorithm - Create a method with one integer as an argument. Now use the below logic while (rest…
Q: Write a program that reads the student information from a tab separated values (tsv) file. The…
A: CODE 1: try: # opening file for reading fileread= open("StudentInfo.tsv") # opening file for…
Q: P15. Suppose datagrams are limited to 1,500 bytes (including header) between source Host A and…
A: I have mentioned solution in below steps , please find in below
Q: IN JAVA SCRIPT Create a function that takes an integer and reverses it. Examples rev (5121) ➡ "1215"…
A: In this problem, we need to design the JAVA Script program. Input - one argument Output - reverse…
Q: Complete the functions in the template to implement the formulas shown below. The formula to…
A: The solution to the given is: CODE: import math # An isotope has half-life T # Return the amount of…
Q: Write a Python Program to take days from the user and covert it into years, week & 2 day
A: Required: Write a Python Program to take days from the user and covert it into years, weeks &…
Q: Install and compile the Python programs TCPClient and UDPClient on one host and TCPServer and UDP…
A: Install and compile the Python programs TCP Client and UDP Client on one host and TCP Server and UDP…
Q: How does the NAT router differentiate two simultaneous connections which are initiated from PC1 to…
A: INTRODUCTION In this question we are asked how does the NAT router differentiate two simultaneous…
Q: IN JAVA SCRIPT Create a function that takes an integer n and reverses it. Examples rev (5121) ➡…
A: We need to write a Javascript function to reverse a number.
Q: Assume Σ = {a, b}. Design a DFA that recognizes the language L, where L contains all strings…
A: AnswerWe need to create a DFA to recognise the language L, which consists of all strings that start…
Q: 1. In each row, four items are given: function to which runtime is proportional, original input…
A: The answer is below:-
Q: Explain a situation where you could change the runtime of a hash table from O(1) to O(n) when using…
A: Chaining is a hashing collision resolution technique which is used to solve the collisions problem…
Q: Find the angular velocity from velocity and radius in python
A: Algorithm :- Take the speed and radius of the circle from the user using the input method and we…
Q: Create a Java program that will display the student's information. The program should perform the…
A: Implementation: import java.util.*;public class Main{ public static void main(String[] args) {…
Q: Write a function in python, cannot use isalpha or .get named count_letters that takes as a parameter…
A: I give the code in Python along with output and code screenshot
Q: 12.Explain the impact digital technology has had on assistive devices for people with physical…
A: The correct answer for the above question is given in the following steps for your reference.
Q: SOLVE STEP BY STEP IN DIGITAL FORMAT, Apply the principle of inclusion-exclusion Find the number of…
A: The question is to find the number of permutations of the 26 letters of the alphabet so that the…
Q: Explain why program inspections are an effective technique for discovering errors in a program. What…
A:
Q: Total = a + b + c; Average Total / 6; A. B. C. D. Logic Errors Run-time Errors. None of the above…
A: Computer programming is the process of designing and building an executable computer program to…
Q: when installing PHPMYAdmin, which of the following is not a required dependency:httpd, wget, php,…
A: httpd basically stands for hyper text transfer protocol daemon. It is required to secure…
Q: Suppose that an arriving packet matches two or more entries in a router's forwarding table. With…
A:
14. Assume that class B is derived publicly from class A. Class A has two functions, f1() and f2(). Function f2() is virtual. Assume the following statements statements: A* ptr=new B; ptr->f1(); ptr->f2(); Fill in the blank. The function f1() as defined in class ____ will be used. The function f2() as defined in class _____ will be used.
15. In question 14, the call to ptr->f2() is an example of _______________________.
Step by step
Solved in 3 steps
- Assume that class B is derived publicly from class A. Class A has two functions, f1() and f2(). Function f2() is virtual. Assume the following statements statements:A* ptr=new B; ptr->f1(); ptr->f2(); Fill in the blank.The function f1() as defined in class ____ will be used. The function f2() as defined in class _____ will be used. In question 1, the call to ptr->f2() is an example of _______________________.C++ : Defining class Person, class Student, class Teacher and class Graduate. Note that class Student and class Teacher inherits from Person, and class Graduate inherits from Student. Defining two constructors (including a default constructor) for each class. Defining virtual function print() for three classes (person, teacher and graduate), where each has different function body. Writing a main function to test the above definition and run each print function.(Program) a. Complete the following class by including functions corresponding to the two prototypes listed in the declaration section: classElevatorprivate:intelNum;//elevatornumberintcurrentFloor;//currentfloorinthighestFloor;//highestfloorpublic:Elevator( int=1,int=1,int=15);//constructorvoidrequest( int);; In this definition, the data member elNum is used to store the elevator’s number, the data member currentFloor is used to store the elevator’s current floor position, and the data member highestFloor is used to store the highest floor the elevator can reach.The constructor should allow initialization of an object’s three data members with the data passed to the constructor when an Elevator object is instantiated. The request function should code the following algorithm: If a request is made for a nonexistent floor, a floor higher than the topmost floor, or the current floor Do nothing ElseIf the request is for a floor above the current floor Display the current floor number While not at the designated floor Increment the floor number Display the new floor number EndWhile Display the ending floor number Else // the request must be for a floor below the current floor Display the current floor number While not at the designated floor Decrement the floor number Display the new floor number EndWhile Display the ending floor number EndIf b. Include the class written for Exercise 3a in a complete program, and verify that all member functions work correctly.
- Assume the definition of class houseType as given in Exercise 11. Answer the following questions. (1, 2, 3, 5, 7) a. Write the definition of the member function set so that private members are set according to the parameters. b. Write the definition of the member function print that prints the values of the data members. c. Write the definition of the constructor of the class houseType so that the private member variables are initialized to according to the parameters. d. Write a C++ statement that prints the value of the object newHouse. e. Write a C + + statement that declares an object house of type newHouse, and initializes the member variables of house to "Ranch", 3, 2, 2, 2005, 1300, 185000, and 3600.0, respectively. f. Which function members are accessors and which are mutators?C++ a) Implement a class Animal.data members:type – an automatic variable (mammal, fish etc.)functions:accessor - an accessor for the type variableoutput() - output the type of animal b) Implement a class Human which is derived from Animal. data members:name - a dynamic variable (name of human)functions:accessor - an accessor for the name variableoutput() - redefined to output name and typeDefine the class RectangularCube in C++. A RectangularCube has three sides length(L), width (W), and Height (h), define the sides as private data fields. Include a no-argument constructor that sets all three sides to 1. The class must also have a constructor that receive parameters to initialize sides of the RectangularCube. Include get and set functions for all three data fields. Finally define the functions volume () and surfaceArea () in the class RectangularCube that use the formulas given below to calculate and return the volume and the surface area of the RectangularCube. Give the UML diagram of the class, you may use the MSOffice/Visio to create the UML class diagram (best to download and use Visual paradigm tool, or any other free UML tool). Implement the class using separate files for definition and implementation, use inclusion guard to avoid duplicate code. Make sure to include at least one inline function implementation. Do not Implement the volume () and the SurfaceArea…
- Using c++ Book information (overriding member functions) Given main() and a base Book class, define a derived class called Encyclopedia. Within the derived Encyclopedia class, define a PrintInfo() function that overrides the Book class' PrintInfo() function by printing not only the title, author, publisher, and publication date, but also the edition and number of volumes. Ex. If the input is: The Hobbit J. R. R. Tolkien George Allen & Unwin 21 September 1937 The Illustrated Encyclopedia of the Universe James W. Guthrie Watson-Guptill 2001 2nd 1 the output is: Book Information: Book Title: The Hobbit Author: J. R. R. Tolkien Publisher: George Allen & Unwin Publication Date: 21 September 1937 Book Information: Book Title: The Illustrated Encyclopedia of the Universe Author: James W. Guthrie Publisher: Watson-Guptill Publication Date: 2001 Edition: 2nd Number of Volumes: 1 Note: Indentations use 3 spaces. #include "Book.h"#include "Encyclopedia.h"#include…Q. Please solve this C++ program and show all the steps. (kindly do not use any advanced coding or coding info from any other program. Don't copy from other sources too) a) Add a new function convMonth to the class Date that returns the month in letters (e.g., January, February, etc.). b)Add a function that prints the date using the following format: Month dd, yyyy . Example, January 21, 2023 c) Test the new functions of the class Date by creating dynamically (i.e., using pointers) two objects of the class Date and invoking the new member functions on both objects. Deliverables: date.h, date.cpp, testdate.cpp. (any description or thought process of this coding problem will be really useful, particularly in part c) please let me know if there's any way I could contact you for further assistance,( please!) Thank you !4、Programming practice (homework 10)Define two class types: Student and Graduate, where Graduate inherits from Student. Class Student includes (1) member variables: name, id, and score (protected)(2) member functions: (public) a default constructor Student::Student(): name(“no name”), id(0), score(0) constructor Student::Student(string n, int i, double s): name(n), id(i), score(s). void output()Class Graduate has(1) additional member variables: string supervisor; (private)(2) additional member functions: (public) a default constructor Graduate::Graduate(): Student(),supervisor(“no name”) constructor Graduate:: Graduate (string n, int i, double s, string sn): Student(n,I,s), supervior(sn). void output() ---redefine the functionDefine three graduate student g1, g2,g3 in main function
- Hello, I need help with this C++ homework question. it's about implementing the topic of polymorphism. A) Submit cpp file for each question with given main function. Define a class named Beverage Private Data Member: name - type string pointer (dynamic variable) Appropriate accessor and mutator functions. Default constructor and one argument constructor. Define pure virtual output function. Define a class named Soda derived from Beverage Private Data Member: price - type double pointer (dynamic variable) Appropriate accessor and mutator functions. Default constructor and two argument constructor. Override output function. Define a class named Beer driven from Beverage Private Data Member: alcohol_percentage - type double pointer (dynamic variable) Appropriate accessor and mutator functions. Default constructor and two argument constructor. Override output function. Use following main() to test your class.(DO NOT change the int main provided. Any alteration will not be…Write the following program in C++. 1. Create a class called Employee that includes attributes: empid, name, points,group, and avg with data types: “int”, “String”, “double”, “String”, and “double”respectively.2. Include a constructor with parameters: empid and name.3. Include another constructor to assign default values to the attributes.4. Include a function called addPoints that is used to add a given amount to the valueof the attribute points.5. Include a function called upgradePoints that is used to increase the value of theattribute points by a given percentage.6. Include a function called removePoints that is used to reduce a given amount fromthe value of the attribute points. If the resultant value is negative then the value ofthe attribute should be set into zero.7. Include a function called computeGroup that assigns a value to the attribute groupbased on the value of the attribute points as given in the following table. Points Group points < 100 Silver 100 ≤…In C++, write a simple software that computes the total points based on the Practical Examination Rubric Detail using functions inside a class. Create objects with three input arguments in the main function (SO1.3, SO6.1, and SO6.4, respectively) which values range from 1 to 4 (1 = Beginning, 2 = Developing, 3 = Accomplished, 4 = Exemplary). The sum of the related points will be displayed in the output.