Using the knowledge in computational language in C code it is possible to write a code that called delete repeats that has a partially filled array of characters as a formal parameter and that deletes all repeated letters from the array.
Wrritting the code:#include <iostream>
using namespace std;
void printArray(char *arr, int size){
for(int ii = 0; ii < size; ++ii){
cout << arr[ii] << " ";
}
cout << endl;
}
char *delete_repeats(char *arr, int &size){
char *newarr = new char[size];
int count = 0;
for(int ii = 0; ii < size; ++ii){
int flag = 0;
for(int jj = 0; jj < ii; ++jj){
if(arr[ii] == arr[jj]){
flag = 1;
break;
}
}
if(!flag){
newarr[count++] = arr[ii];
}
}
size = count;
return newarr;
}
int main(){
char arr[] = "to be or not to be";
int size = sizeof(arr);
printArray(arr, size);
cout << "After deleting the duplicates" << endl;
char *newarr = delete_repeats(arr, size);
printArray(newarr, size);
return 0;
}
See more about C code at brainly.com/question/12975450
#SPJ1
What is printed by the following program?
function product(x, y){ return x * y; } function difference(x, y){ return x - y; } function start(){ var x = 2; var y = 5; var value1 = product(x, y); var value2 = difference(y, x); var result = difference(value1, value2); println(result); }
7
-7
13
-13
The useful product (x,y).The PRODUCT function multiplies each number provided as an input before returning the result.
What does a formula produce?
The product function multiplies each number provided as an input before returning the result. For instance, you can multiply two integers in cells A1 and A2 together by using the formula =PRODUCT(A1, A2).The def keyword in Python is used to define a function. The function name, parentheses, and a colon are then written after the function name. The next step is to ensure that you indent with a tab or four spaces, after which you must explain what you want the function to accomplish for you.A function's output is referred to as its return value, and the data type of the return value is referred to as the return type.To learn more about Product function refer to:
https://brainly.com/question/25638609
#SPJ4
Identify the correct declaration of an array of strings.
a.char stringArr[10][50];
b.char stringArr[10];
c.stringArr[10][50];
d.char[50] stringArr[10];
The correct declaration of an array of strings is as 'char stringArr[10][50];' Thus, option A i.e. 'char stringArr[10][50];' is the correct answer.
The expression 'char stringArr[10][50];' is the representation of an array of strings using a two-dimensional or 2D char array. The two-dimensional array provides the declaration of an array of strings in C++. So in option A, a two-dimensional char array is used to declare string-type elements in an array. The two-dimensional char array creates and stores elements of a string array at static or compile-time i.e. the size and number of elements stay remain constant.
The syntax for the declaration of an array of strings is as follows:
char array_name[number_of_elements][maximum_size_of_string];
You can learn more about two-dimensional array at
https://brainly.com/question/26104158
#SPJ4
Correct handling and operation of office equipment prevents
A. injuries
B. stresses
C. burn - outs
D. ill - treatments
Thinking back on Big Data, why would users give up ownership of their data?
According to the World Economic Forum, this is because individuals find it challenging to possess. It can't be traced or kept an eye on because it's not a tangible object.
What is World Economic Forum?World economic forum is defined as a global non-governmental organization with headquarters in Cologne, canton of Geneva, Switzerland. Klaus Schwab, a German engineer and economist, created it on January 24, 1971.
Your privacy is not yet sufficiently protected by the rights that come with data ownership. Prior to any data collection, a data subject should clearly given the option to decline data transfer, with no impact on their ability to access services. This is necessary to respect their right to privacy.
Thus, according to the World Economic Forum, this is because individuals find it challenging to possess. It can't be traced or kept an eye on because it's not a tangible object.
To learn more about World Economic Forum, refer to the link below:
https://brainly.com/question/29353435
#SPJ1
What type of e-mail message is used by cyber attackers to target high level management in an organization?.
A deceptive e-mail message(usually used in whaling)is used by cyber attackers to target high-level management in an organization.
Define Whaling.
The phishing assault known as "whaling" targets senior executives while pretending to be a legitimate email. Whaling is a type of social engineering fraud that takes advantage of the internet to trick victims into taking a secondary action, like starting a wire transfer of money. Whaling can yield significant profits while requiring little technical expertise.
A Whaling email is more complex than standard phishing emails since they frequently target chief (or "c-level") executives and typically:
contain individualized information about the targeted organizationperson conveys a feeling of urgencyare written with a firm grasp of corporate terminology and tone.To learn more about whaling, use the link given
https://brainly.com/question/23021587
#SPJ1
Some automated troubleshooting programs identify certain keywords in the customer’s query to provide potential solutions to the query. For example, ‘There is no display on my mobile phone screen.’ The keywords ‘display’ and ‘phone’ would link to common problems with a phone display. Analyse the requirements for this system and design, develop, test and evaluate a program to identify keywords in a query typed in by the user and provide a linked solution to common problems related to a mobile device from a selection stored in a text file or database. You will need to identify appropriate keywords that can be linked to general advice related problems. You need to account for variations in the form of the user input e.g. one user may query ‘There is no display on my mobile phone’, another user may query ‘My phone screen is blank.’
We may group all terms into four basic types of intent when conducting research to determine a user's motivations for conducting a search: commercial, transactional, informational, and navigational.
What is research?Research is a process of systematized inquiry that entails the collection of data; documentation of critical collection; and analysis and interpretation of that data/aggregation, in accordance with suitable epistemologies set by specific occupational group fields and academic discipline
You must decide which keywords are relevant to your topic before doing a search for information. Your research findings are influenced by the keywords you choose. Use the additional keywords on your list or the search techniques indicated under Step 2 if the keywords you select do not get the outcomes you require.
Therefore, We may group all terms into four basic types of intent when conducting research
Learn more about the research here:
https://brainly.com/question/18723483
#SPJ1
Which of the following code snippets will result in this display:Countdown...
5...
4...
3...
2...
1...
Blastoff!
Answer:
12345
Explanation:
How can I know what it is say
suppose you want to estimate the proportion of students at a large university that approve of the new health care bill. from an srs of 1000 university students, 778 approve of the health care bill. how do you find the margin of error for a 99% confidence interval for p? what is the missing piece in the following formula? margin of error
The margin of error here is 0.034.
What is margin of error?
The margin of error is a statistic that expresses the amount of random sampling error in survey results. The greater the margin of error, the less confident one should be that a poll result will accurately reflect the results of a population census. When a population is incompletely sampled and the outcome measure has positive variance, or when the measure varies, the margin of error will be positive.
Multiplying a key factor (for a specific confidence level) and the population standard deviation yields the calculation for the margin of error. The outcome is then divided by the square root of the sample's number of observations.
Mathematically, it is represented as,
Margin of Error = Z * ơ / √n
For a 99% confidence level, the critical factor or z-value is 2.58 i.e. z = 2.58.
[tex]M.E = 2.58\sqrt{\frac{0.778(1-0.778)}{1000} }[/tex]
M.E. = 0.034
Learn more about margin of error click here:
https://brainly.com/question/13672427
#SPJ4
The acronym for an effective goal is_ A. SUCCESS
B. SMART
C. REAL
D. GREAT
Answer: B. SMART
Explanation:
SMART stands for
Specific, Measurable, Achievable, Relevant, and Time-Bound
from which os did windows xp evolve?
Answer: Windows 2000
Explanation: I researched it and multiple sites said that it was Windows 2000.
Hope this helps!!! :)
you have just installed a second and third hard drive into a windows pro workstation. each drive is 500 gb. the user wants to combine the two drives into one 1 tb volume. what should you create from those two drives to accomplish this and give the user a disk read and write performance boost?
The thing that you can create to accomplish this and also give the user a disk read and write performance boost is option C: A new striped volume
If you have two hard drives, what happens?You can simply expand your storage without replacing current devices by using several hard drives. Backing up is safer. Although a hard drive can be partitioned to behave as if it has numerous hard drives, having multiple physical drives gives you built-in redundancy.
Note that You must construct a spanned, striped, or mirrored volume in order to integrate both hard drives into one volume. In this situation, a mirrored volume would not provide the user with 1 TB of storage because a mirrored volume, like a RAID-1 array, will render one of the disks redundant. A striped volume will provide you a minor performance advantage and is similar to RAID-0.
Learn more about disk read and write from
https://brainly.com/question/12906235
#SPJ1
See full question below
19. You have just installed a second and third hard drive into a Windows 8.1 workstation. Each drive is 500 GB. The user wants to combine her space into one 1 TB volume. What should you create to accomplish this and also give the user a disk read and write performance boost?
A. A new simple volume
B. A new spanned volume
C. A new striped volume
D. A new mirrored volume
you are working as a network engineer at shell info. the organization uses cisco's ios on all of its workstations. the network administrator has asked you to use the route utility to delete some static routes used by the router. which of the following commands will you use in this scenario?
Since You are working as a network engineer at Shell Info, the commands that you can use in the above scenario is option D: show ip route.
What does the command show ip route do?The show of the router interface where the most recent update was received as well as the IP address of the router that is the next hop in reaching the remote network.
The IPv4 routing table of a router is seen using the show ip route command on a Cisco router. A router offers extra route details, such as how the route was discovered, how long it has been stored in the table, and which particular interface should be used to reach a predetermined location.
Therefore, in display IP route: In this case, the command should be executed at the CLI in privileged EXEC mode.
Learn more about network engineer from
https://brainly.com/question/4278521
#SPJ1
See full question below
You are working as a network engineer at Shell Info. The organization uses Cisco's IOS on all of its workstations. The network administrator has asked you to use the route utility to delete some static routes used by the router. Which of the following commands will you use in this scenario?
route print
route
show running-config
show ip route
If an equipment SCCR is conditional on a specific type of OCPD and ampere rating, be sure to field install that specific OCPD and ampere rating in the supply circuit to the equipment. True or False
If an equipment SCCR is conditional on a specific type of OCPD and ampere rating, be sure to field install that specific OCPD and ampere rating in the supply circuit to the equipment is a true statement.
What is SCCR condition?Electrical panels for industrial machinery must be developed and designed with the correct SCCR in order to maintain the system, save downtime, and improve worker safety. This essay aims to clarify its significance and how to locate the necessary computations.
Short-Circuit Current Rating (SCCR) is defined as "the anticipated symmetrical fault current at a nominal voltage to which an apparatus or system is able to be connected without sustaining damage exceeding stated acceptability requirements" in Article 100 of the 2017 NEC (National Electric Code).
The maximum short-circuit current that an electrical component can safely withstand without posing a shock or fire hazard is known as SCCR.
Therefore, If an equipment SCCR is conditional on a specific type of OCPD and ampere rating, be sure to field install that specific OCPD and ampere rating in the supply circuit to the equipment is a true statement.
To learn more about OPCD refer to the link:
https://brainly.com/question/1383211
#SPJ2
elton needs his application to perform a real-time lookup of a digital certificate's status. which technology would he use?
Online Certificate Status Protocol is the technology would he use.
What is Online Certificate Status Protocol?OCSP is one of the two often employed techniques for maintaining the security of a server and other network resources. In some circumstances, OCSP has superseded an outdated mechanism called a certificate revocation list.
Although the status of TLS certificate revocation can be checked using both OCSP and CRLs, their workings are very different. While a CRL displays all the revoked certificates, OCSP provides the revocation status of the individual website that the browser requested.
Thus, it is Online Certificate Status Protocol.
For more information about Online Certificate Status Protocol, click here:
https://brainly.com/question/15135355
#SPJ1
password spraying cyber-attack can be categorized as which of the following type of attack? a.wordlist b.brute-force c.unencrypted d.dictionary
The types of cyber attacks related to password spraying are classified as brute force attacks (option b) and dictionary attacks (option d)
Types of cyber attacksThese cyberattacks will aim to gain access to passwords, contacts, stored information, bank details or even control our system, whose attacks work as follows:
Brute force: attacks are based on testing different sequential combinations to finally discover our access credential.Dictionary: dictionary-based attacks query the database of commonly used passwords or passwords obtained by spoofing.to know more about cyber attacks here https://brainly.in/question/2412100
#SPJ4
After a hurricane breaks all the windows in the stores on commercial street, under which circumstances is mark likely to start looting local businesses due to deindividuation?.
If the power is out and there is no law enforcement, Mark is likely to start looting local businesses.
Under which circumstances is mark likely to start looting local businesses due to individuation?If the power is out and there is no law enforcement, Mark is likely to start looting local businesses because he would be able to take what he wants without being caught. Additionally, if there is no one around to stop him, he may feel like he can justify his actions.
In the aftermath of a hurricane, all the windows in the stores on commercial street have been broken. With no power and no law enforcement, people are starting to loot local businesses. Mark is one of them.
Learn more about Business: https://brainly.com/question/24553900
#SPJ4
One of the big components of UI design concerns where items are positioned on the screen. What is the term for this positioning? A. menu B. scale C. strategy D. layout
One of the big components of UI design concerns where items are positioned on the screen. The term for this positioning is the layout. The correct option is D.
What is a layout?A configuration or design, particularly the schematic organization of components or regions. The design of a printed circuit; the layout of a plant. The way anything is arranged; specifically, the layout or composition of a newspaper, book page, advertisement, etc.
The layout is to both show information in a logical, coherent manner and to highlight the critical information.
Therefore, the correct option is the D. layout.
To learn more about layout, refer to the link:
https://brainly.com/question/17647652
#SPJ1
(9 pts) what are the cidr addresses for a network if all its addresses start with 145.98? and if this network has exactly two subnets, what are the cidr addresses for each of its subnets?
The cidr addresses for each of its subnets are 145.98.0.1 to 145.98.127.255 and 145.98.128.1 to 145.98.255.255.
What is a network?A network is a collection of two or more computers or other electronic devices that are linked together to exchange data and share resources.
It should be noted that 145.98 = 10010001.01100010
Then there are 2^(32-16) = 2^16 addresses possible. The range of addresses is from 145.98.0.1 to 145.98.255.255
If there are 2 subnets, 1 bit will be used for the subnet. So each subnet will have 2^32-17 = 2^15 addresses.
For subnet 1 range of IP shall be 145.98.0.1 to 145.98.127.255
For subnet 2, the range of IP shall be 145.98.128.1 to 145.98.255.255
Learn more about network on:
https://brainly.com/question/1326000
#SPJ1
refers to the systematic way in which words are combined and sequenced to make meaningful phrases and sentences in a given language. group of answer choices semantics special relativity general relativity pragmatics syntax
Syntax, a systematic way in which words are combined and sequenced to make meaningful phrases and sentences in a given language
Syntax is a set of principles that define the order of words, clauses, and phrases to form appropriate sentences in a given language..
in other hand, Semantic is the study of meaning in language or the study of the meaning of sentences,
Pragmatics is the study of the meaning of sentences within a certain context.
so the relativity between syntax, semantic, and Pragmatic is Syntax is what we use to do our best to communicate on the most basic level (with order of words, clauses, and phrases). Semantics help determine if it makes sense. Pragmatics allows us to apply the right meaning to the right situation.
For more information about the syntax refer to the link: https://brainly.com/question/11975503
#SPJ4
sources of data with examples each
What do you mean by that? Please let me know and I'll try my best to help you with your question, thanks!
A new computer has been added to the Sales department and needs to be joined to the CorpNet domain.
Which of the following System Properties settings MUST be used to make the change?
System Properties > Computer Name
System Properties > Advanced
System Properties > System Protection
System Properties > Remote
The following System Properties settings must be used to make the change is System Properties > Computer Name. Hence option a is correct.
What is computer?
Computer is defined as a digital electrical device that can be configured to automatically perform logical or mathematical operations in sequences. Programs are generic sets of operations that can be carried out by modern computers. It is a crucial tool for scientific students, who frequently use it to create reports and projects for school.
For setting of new computer the system properties must be changed as per the person requirement and the name of the the computer also changed.
Thus, the following System Properties settings must be used to make the change is System Properties > Computer Name. Hence option a is correct.
To learn more about computer, refer to the link below:
https://brainly.com/question/21080395
#SPJ1
you have three switches configured as shown. how could you guarantee that switch c becomes the root bridge?
Set a lower priority value for switch C. The bridge having the lowest priority in the network is the STP root.
Set the switch's priority to 65535 to prevent it from ever becoming the root (the highest possible). By manually setting its bridge priority to a low number, the root bridge is chosen. The default number, which ranges from 0 to 61440, is 3276. The switch with the lowest MAC address will become the root bridge if all switches in a single spanning tree have the same bridge priority. Configure interfaces connected to non-DTP devices to not forward DTP frames, i.e., to turn off DTP, in order to prevent trunking errors.
Learn more about priority here-
https://brainly.com/question/19721841
#SPJ4
Which carrier sense technology is used on wireless networks to reduce collisions?.
Compare and contrast the four types of economic systems. Write 3-5 sentences.
Answer:
Explanation:
Types of economic systems:
1. Traditional economic system
The traditional economic model is built on labor, goods, and services, all of which follow well-established patterns. There is relatively little specialization or division of labor, and it is heavily dependent on individuals. The traditional economy is the oldest and most fundamental of the four types of economies.
2. Command economic system
In a command system, a sizable portion of the economic structure is under the control of a dominant centralized authority, typically the government. The command economic system, also referred to as a planned system because production decisions are made by the government, is popular in communist societies.
3. Market economic system
Free markets serve as the foundation of market economic systems. In other words, there is not much intervention from the government. The government has little influence over resources and does not meddle in significant economic sectors. The people and the link between supply and demand, on the other hand, are the sources of regulation.
4. Mixed system
The traits of the market and command economic systems are combined in mixed systems. Mixed systems are also referred to as dual systems for this reason. The phrase is occasionally used to describe a market system that is subject to strict regulatory oversight.
To know more about economic systems, visit:
https://corporatefinanceinstitute.com/resources/economics/economic-system/
Answer:
There are four types of economic systems: traditional, command, market, and mixed.
1. Traditional economic system: In this system, economic decisions are based on customs, traditions, and cultural beliefs. It relies on traditional methods of production and distribution, often in rural and agrarian societies. Examples include indigenous communities and certain rural areas where farming and bartering are prevalent.
2. Command economic system: Also known as a planned or centrally planned economy, this system is characterized by government control and ownership of resources and production. The government determines what and how much is produced, as well as the prices and distribution. Examples include North Korea and Cuba, where central authorities play a significant role in economic decision-making.
3. Market economic system: In this system, economic decisions are primarily determined by the forces of supply and demand in the marketplace. Private individuals and businesses own resources and make decisions based on profit motives. Prices are determined through competition. Examples include the United States and many Western European countries, where market forces largely dictate the allocation of resources and production.
4. Mixed economic system: This system combines elements of both command and market economies. It involves a mix of government intervention and private enterprise. Governments regulate certain industries and provide public goods and services, while allowing market forces to operate in other sectors. Examples include countries like Canada, Australia, and many European countries, where there is a blend of government intervention and private enterprise.
In summary, the four types of economic systems differ in terms of who controls the means of production and how economic decisions are made. The traditional system relies on customs and traditions, the command system is characterized by government control, the market system operates based on supply and demand, and the mixed system combines elements of both command and market economies.
a leader-board banner is 728 pixels wide and 90 pixels tall.if a computer display is 72 dpi, how large is the leader-borad banner in inches
Terms in this set (43)
color model
a way of mixing base colors to create a spectrum of colors
HSL
hue, saturation, lightness
00:02
01:22
HSB
hue, saturation, brightness
gamut
the whole range or extent
additive method
A solid modeling design method where geometric primitives are combined to create a single object.
subtractive method
method of diminishing the wave lengths of light by superimposing two or more color transparencies over the same light source; the light is gradually reduced by absorption of colors in the light.
Raster images
are often called bitmap images because they are made of millions of tiny squares, called pixels
Bitmap
an image composed of pixels with a fixed resolution
bit depth
Refers to the number of colours in an image.
true color
24-bit color depth
Deep color
A color depth that uses a bit depth of 48, which produces over 1 billion colors.
Alpha Channel
Part of a pixel's data that tells how opaque or transparent that color should appear when the graphics card calculates how to render the image on screen.
00:02
01:22
Masking color
A single shade of a color that can be set to be transparent.
vector images
Use mathematic equations and geometric elements (points, lines, and shapes) to create art.
Bitmap tracing
"The process of software programs that also convert raster images to vector images
Optimizing
picking the very best option
Compression
The part of a longitudinal wave where the particles of the medium are close together.
Lossy Compression
a process of reducing a file's size by altering and/or eliminating some pixels
dithers
Breathing holes in the image or pixels are no longer touching each other
Interpolation
A passage included in an author's work without his/her consent
dots per inch (dpi)
A measurement of image quality for printers.
Pixels per Inch (PPI)
A measure of screen density refers to the number of device pixels on a physical surface.
resampled
Reads a new image without reducing the image resolution
bicubic
produces a better quality than either nearest neighbor or bilinear; the processing time takes a little longer, and a more complex method is used to determine the color of new pixels that are added based on a larger area of surrounding pixels.n:
when inserting an image on the page, what attribute of the tag are you required to enter?
The tag used while inserting an image into the website is <img>.
It is a void tag which means, it can neither have any child content nor a closing tag. The main and important attributes of this tag are src and alt. Src attribute contains the URL pointing to the image to be inserted just like the href attribute in <a> (anchor tag). The alt attribute contains the information to be displayed if the image is not found. These two are the only required tags for any image to be added in the website.
To know more about HTML tags :
https://brainly.com/question/15093505
#SPJ4
you are the network administrator for your organization. you are away from the office on a business trip, and some problem occurs with the server with resources that requires the server to be updated urgently. which of the following options will you use to accomplish this?
The best option would be to use a VPN so that you can connect to the server and make the necessary changes.
Benefits of VPN: A VPN can provide a higher level of security than a standard connectionA VPN can encrypt all data traffic between your computer and the VPN serverA VPN can hide your real IP address and make it difficult for third parties to track your online activityWhat is a VPN?A VPN (virtual private network) is a private network that uses a public network (usually the Internet) to connect remote sites or users together. VPNs use "virtual" connections routed through the Internet from the organization's private network to the remote site or employee.
Missing Options:
1. Use a remote management tool to connect to the server and update the resources.2. Use a VPN to connect to the server and update the resources.3. Use a dial-up connection to connect to the server and update the resources.4. Use a proxy server to connect to the server and update the resources.Learn more about the VPN :
https://brainly.com/question/28110742
#SPJ4
c. Text is the .......... means the way through which one can convey information component of multimedia.
Text is the fundamental element and most effective means the way through which one can convey information component of multimedia.
Components of Multimedia:
There are 7 components of multimedia:
Text, Graphics, Photographs, Sound, Animation, Video and InteractivityWhat is Text in Multimedia?
In the world of academia, a text is anything that communicates a set of meanings to the reader. You may have believed that texts were only comprised of written materials like books, magazines, newspapers, and 'zines (an informal term for magazine that refers especially to fanzines and webzines).
These things are texts, but so are films, pictures, TV shows, songs, political cartoons, online content, advertisements, maps, artwork, and even crowded spaces. A text is being examined if we can look at something, investigate it, uncover its layers of meaning, and extrapolate facts and conclusions from it.
To lean more about Multimedia, visit: https://brainly.com/question/24138353
#SPJ9
robert is a black box penetration tester who conducted pen testing attacks on all of the network's application servers. he was able to exploit a vulnerability and gain access to the system. which task should he perform next?
Robert should carry out privilege escalation using a high-privileged account after utilizing mimikatz to harvest credentials.
What is black box penetration tester?Black box penetration tester is defined as finds a system's weaknesses that can be exploited from outside the network. Millions of people have installed Selenium, which is perhaps the most popular tool for black box testing web apps today.
This indicates that dynamic analysis of systems and applications that are already executing on the target network is a key component of black-box penetration testing. Penetration (Pen) testing aims to find any security system vulnerabilities that an attacker might exploit.
Thus, Robert should carry out privilege escalation using a high-privileged account after utilizing mimikatz to harvest credentials.
To learn more about black box penetration tester, refer to the link below:
https://brainly.com/question/20346949
#SPJ1
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.
The code for the program related to the book database is:
#include <iostream>
using namespace std;
class book {
protected:
string title;
string author;
string publisher;
int publicationDate;
public:
book(string t, string a, string p, int d) {
title = t;
author = a;
publisher = p;
publicationDate = d;
}
void printInfo() {
cout << "Title: " << title << endl;
cout << "Author: " << author << endl;
cout << "Publisher: " << publisher << endl;
cout << "Publication Date: " << publicationDate << endl;
}
};
class encyclopedia : public book {
private:
int edition;
int numVolumes;
public:
encyclopedia(string t, string a, string p, int d, int e, int n) : book(t, a, p, d) {
edition = e;
numVolumes = n;
}
void printInfo() {
cout << "Title: " << title << endl;
cout << "Author: " << author << endl;
cout << "Publisher: " << publisher << endl;
cout << "Publication Date: " << publicationDate << endl;
cout << "Edition: " << edition << endl;
cout << "Number of Volumes: " << numVolumes << endl;
}
};
int main() {
book b1("Moby ", "Herman Melville", "Harper and Brothers", 1851);
encyclopedia e1("The Encyclopedia", "David MacDonald", "Facts on File", 1984, 2, 3);
b1. printInfo();
e1. printInfo();
return 0;
}
Code explanation:The code above defines a base book class and a derived encyclopedia class. The derived encyclopedia class overrides the book class ' printInfo() function by adding the edition and number of volumes to the information that is printed.
When the code is run, the following output is displayed:
Title: MobyAuthor: Herman MelvillePublisher: Harper and BrothersPublication Date: 1851Title: The Encyclopedia of MammalsAuthor: David MacDonaldPublisher: Facts on FilePublication Date: 1984Edition: 2Number of Volumes: 3Learn more about programming:
https://brainly.com/question/18900609
#SPJ4