Answer the following questions true (T) or false (F)
1. The virtual property is not inherited.
2. A class that has a pure virtual member function is called a concrete base class.
1. False
Explanation: Suppose you derive from a base class with a virtual function. Then suppose you put a function in the derived class with the same signature as the virtual function in the base class. The derived class function will be automatically virtual, as will any member function with the same signature in any further derived classes.
2. False
Explanation: The term is abstract base class. Presence of a pure virtual function member makes a class abstract. A derived class must define the pure virtual member function or that member function must be pure virtual in the derived class and the derived class must itself be abstract. .No objects can be defined of an abstract class.
You might also like to view...
Which of the following represents how the address block field displays in a mail document of a mail merge?
A) «AddressBlock» B) {AddressBlock} C) [AddressBlock] D) AddressBlock
What is the error message referring to?
Editing Configuration Files for Services a. First, open nginx’s configuration file in a nano. The configuration filename used here is custom_server.conf. Notice below that the command is preceded by the sudo command. After typing nano include a space and the -l switch to turn on line-numbering.
[analyst@secOps ~]$ sudo nano -l /etc/nginx/custom_server.conf [sudo] password for analyst:Use the arrow keys to navigate through the file.
GNU nano 2.8.1 File: /etc/nginx/custom_server.conf #user html; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request$ # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 81; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^J Justify ^C Cur Pos ^X Exit ^R Read File ^\ Replace ^U Uncut Text^T To Spell ^_ Go To Lib. While the configuration file has many parameters, we will configure only two: the port nginx listens on for incoming connections, and the directory it will serve web pages from, including the index HTML homepage file. c. Notice that at the bottom of the window, above the nano commands, the line number is highlighted and listed. On line 36, change the port number from 81 to 8080. This will tell nginx to listen to HTTP requests on port TCP 8080. d. Next, move to line 44 and change the path from /usr/share/nginx/html/ to /home/analyst/ lab.support.files/ e. Press CTRL+X to save the file. Press Y and then ENTER to confirm and use the custom_server.conf as the filename. f. Type the command below to execute nginx using the modified configuration file:
[analyst@secOps ~]$ sudo nginx -c custom_server.conf -g "pid /var/run/nginx_v. pid;"g. Click the web browser icon on the Dock to launch Firefox. h. On the address bar, type 127.0.0.1:8080 to connect to a web server hosted on the local machine on port 8080. A page related to this lab should appear. i. After successfully opening the nginx homepage, look at the connection message in the terminal window.