IaaS, and perhaps infrastructure as a service, is on-demand access to cloud-hosted physical as well as virtual servers, storage, and networking, which serve as the backend IT infrastructure for cloud-based applications and workloads.
What is IaaS?Amazon was the first major provider of infrastructure as a service in 2008. IaaS is a cloud computing service model in which a cloud services provider provides computing resources.
Storage, network, servers, and virtualization are all provided by the IaaS vendor.
In general, IaaS users are responsible for the security of the operating system and software stack required to run their applications, as well as the security of their data.
As users progress from SaaS to PaaS to IaaS, their responsibilities generally increase.
Thus, it is the service that gives access to pre-configured virtual machines that can be used like physical servers.
For more details regarding IaaS, visit:
https://brainly.com/question/29515229
#SPJ1
when you declare or access an array, you can use any expression to represent the size, as long as the expression is .
Answer: an integer..............
which of the following bones is not visible in the lateral view of the skull?multiple choicepalatine bonestemporal boneszygomatic bonesmaxillary bones
The bone that is not visible in the lateral view of the skull is option B: The ethmoid bones.
What bones can be seen in the side view of the skull?From an anterior and lateral view, the following skull bones are discernible: is the sphenoid bone. frontal skeleton it is the zygomatic bone.
The ethmoid bone is an unpaired cranial bone that plays a significant role in the construction of the nasal septum and upper nasal cavity. Additionally, the medial orbit wall is made up of the ethmoid bone.
Hence, The ethmoid bone, which is only externally visible as the upper conchae (internal bumps) of the nasal cavity and in the eye sockets, also contributes to the floor of the cranial cavity.
Learn more about bones from
https://brainly.com/question/14325570
#SPJ1
If you need to take a printout of a report, how can you specify the paper size you re using?.
When using a printer, users can typically specify the paper size by selecting it from the printer settings. Depending on the printer, users may need to go into the printer settings menu, or select the paper size from a drop-down menu in the print dialog box.
The Importance of Specifying Paper Size When PrintingPrinting documents is a common practice for many people and businesses, yet it is often taken for granted. Choosing the right paper size for a print job is essential to ensure that the document looks professional and meets the requirements of the recipient. Selecting the wrong paper size can lead to documents that are too small or too large, which can make them difficult to read and can be a source of embarrassment.
The paper size selection process is relatively straightforward. When printing, users should select the paper size that is most appropriate for their document. For example, standard 8.5x11 inch paper is often used for letters, while larger 11x17 inch paper may be used to print documents with multiple pages. In addition, paper sizes can vary by region and country, so it is important to select the paper size that matches the location where the document will be sent.
Learn more about the Paper Size :
https://brainly.com/question/4768616
#SPJ4
As you are helping a user with a computer problem, you notice that she has written her password on a note stuck to her computer monitor. You check the password policy of your company and find that the following settings are currently required:
• Minimum password length = 10
• Minimum password age = 4
• Maximum password age = 30
• Password history = 6
• Account lockout clipping level = 3
• Require complex passwords that include numbers and symbols
Which of the following is the best action to take to make remembering passwords easier so that she no longer has to write the password down?
Implement end-user training is the best action to take to make a user remember passwords easier so that she no longer has to write the password down.
What is a password?A password is a word, phrase, or string of characters used to distinguish between an authorized user or process and an unauthorized one (in order to grant access).
To put it another way, a password is used to establish identity or grant access to a resource. The idea of a password's secrecy is strongly implied. To provide authentication, a password is frequently used in conjunction with a username or another method.
A reliable, challenging-to-crack password is one that is strong. Ten or more characters, both uppercase and lowercase, are required for a good password. Additionally, it might contain some unique characters, like the dollar sign ($), percent symbol (%), or exclamation mark (!).
Learn more about passwords
https://brainly.com/question/8450009
#SPJ4
regarding a spreadsheet model, an uncontrollable model input is known as a(n) a. statistic b. parameter. c. decision variable. d. dummy variable.
Option C is correct. The way that values are passed from the calling function to the called function is through arguments or parameters.
Formal parameters are the variables that are utilized as parameters in the definition of the function. A parameter, also known as a formal argument in computer programming, is a particular type of variable used in a subroutine to refer to one of the bits of data given to the procedure as input. Values that are provided into a function are known as parameters. A function that adds three numbers, for instance, can have three parameters. A function has a name, and other places in a program can call it. When such occurs, the communication is referred to as an argument.
Learn more about function here-
https://brainly.com/question/28939774
#SPJ4
allowing departments to make their own software and hardware purchases increases efficiency and minimizes the need for centralized support.
Green computing basically entails lessening the effects of technology on the environment.
The most popular type of centralized processing is client/server computing. Locating and managing saved Web pages is the responsibility of application server software. Virtualization is a term used to describe the use of online storage services like Drop Box. The data is received through input devices in a format that the computer can understand, and it is then sent to the processing unit. The electronic circuitry of the processor, more formally known as the central processing unit (CPU), transforms input data into the desired information. To make sure that sufficient computing resources are available for work of various priorities, capacity planning is the process of determining when a computer hardware system will become saturated.
Learn more about information here-
https://brainly.com/question/15709585
#SPJ4
stihl shuns mass merchandisers and limits distribution channels to six independent u.s. distributors and six company-owned marketing and distribution centers. this approach to distribution would be best described as which of the following?
STIHL is a good example of selective distribution because it manufactures handheld outdoor power equipment and sells it to six independent U.S. distributors and six STIHL-owned marketing companies.
What is Selective distribution?
Selective distribution is a system and strategy that allows a company to sell its goods through a limited number of intermediaries. Different block exemption and competition laws govern these types of vertical agreements between businesses to ensure that no one company has an unfair advantage over another.
Consider a major food chain that sells franchise stores to individuals who meet the parent company's specific criteria. Consider an e-commerce behemoth that allows a select group of vendors to sell on their platform.
To know more about e-commerce, visit: https://brainly.com/question/28619778
#SPJ4
which file in the boot process is responsible for loading the graphical user interface and starting the client/server runtime subsystem?
The protected system procedure known as the Local Security Authority (LSA) authenticates and logs users onto the local computer.
The kernel, a fundamental component of any operating system, controls communication between hardware and software. The kernel is in charge of controlling I/O from and to the hard disk, cache, and memory. It also manages task scheduling, device signaling, and other crucial responsibilities. Before any other code is allowed to execute and before the permission and throttle checks take place, the authentication procedure always begins at the beginning of the application. To verify a user's identity, different systems could require various kinds of credentials.
Learn more about system here-
https://brainly.com/question/14253652
#SPJ4
antje has been asked to review the cybersecurity infrastructure deployed to ensure that they are looking at every layer in their defense in-depth strategy. he finds that there is adequate protection at the perimeter of each zone but is concerned that zero-day network-based attacks may still make it into the network segment. which of the following should he recommend implementing?
Since Antje has been asked to review the cybersecurity infrastructure deployed to ensure that they are looking at every layer in their defense in-depth strategy, the option that he should recommend implementing is option B: b. host-based firewalls
What exactly are firewall rules based on hosts?
A piece of software called a host-based firewall, which runs on a single host, can limit network traffic coming into and leaving that host. Both the infection of a host and the propagation of malware to other hosts can be stopped by them.
Therefore, A firewall that is installed on a computer directly is known as a host-based firewall (rather than a network). Host-based firewalls aid in the detection and termination of malware, viruses, and other potentially undetected dangerous programs.
Learn more about host-based firewall from
https://brainly.com/question/27960047
#SPJ1
See full question below
Antje has been asked to review the cybersecurity infrastructure deployed to ensure that they are looking at every layer in their defense in-depth strategy. He finds that there is adequate protection at the perimeter of each zone but is concerned that zero-day network-based attacks may still make it into the network segment. Which of the following should he recommend implementing?
a. STP
b. host-based firewalls
c. layer 3 switch
d. network-based firewalls
Also known as a private key cipher, what term is used to describe the encryption where the same key is used to encrypt the document before sending and to decrypt it once it is received?.
In symmetric encryption, both the encryption and decryption processes use the same key.
While symmetric encryption uses a shared private key, asymmetric encryption uses a combination of public and private keys. An encryption key is frequently a random string of bits designed specifically to muddle and unmuddle data. Each encryption key is unique and unpredictable thanks to the algorithms used to create them.
Longer keys generated in this way make the encryption code harder to decipher. Both the IBM and T10 encryption systems encrypt data using 256-bit AES algorithm keys. The three different key lengths supported by the 256-bit AES encryption standard are acknowledged and supported by the US government. AES allows keys to be up to 256 bits long.
It is possible to use both symmetric and asymmetric encryption methods with the encryption key server.
To know more about symmetric encryption click here:
https://brainly.com/question/15187715
#SPJ4
our router has restarted and we want to know what caused this. which command can we use to find out?
Show version is the correct answer because the output of the show version command includes the line 'System restarted by' followed by a reason. This line will provide a good indication of why the router restarted.
What is Router?
A router is a network switching device that can route network packets based on their addresses to other networks or devices. They are used for Internet access, network coupling, and connecting branch offices to a central office via VPN, among other things (Virtual Private Network).
They communicate using various access protocols, such as Ethernet, ATM, or DSL, depending on the type. The switching of data packets through the router in the OSI layer model is based on the network layer address (layer 3). There are multi-protocol routers that handle other network protocols in addition to routers that use Internet protocol (IP).
To learn more about Router, visit: https://brainly.com/question/28180161
#SPJ4
When walking in a group single file What should the person in the front do?.
When walking in a group single file, the thing that the person in the front should do is that the person need to have the gun as it will be or must pointed ahead but it should not be over the shoulder.
What is single file?The term single file is seen as a line of objects or persons that is only one broad.
Therefore, in regards to the above, The person in the lead should always point the gun forward and never over their shoulder. The firearm must be held at an angle by the person in the middle. The hunter in the back may aim the gun in either the front, side, or rear.
Learn more about single file from
https://brainly.com/question/29310255
#SPJ1
ix capitalization() function. fix capitalization() has a string parameter and returns an updated string, where lowercase letters at the beginning of sentences are replaced with uppercase letters. fix capitalization() also returns the number of letters that have been capitalized. call fix capitalization() in the execute menu() function, and then output the number of letters capitalized followed by the edited string. hint 1: look up and use python functions .islower() and .upper() to complete this task. hint 2: create an empty string and use string concatenation to make edits to the string. (3 pts)
Lowercase letters at the beginning of phrases are replaced with uppercase letters by the repair capitalization() method, which takes a string parameter and returns an altered string.
def fix_capitalization(userString): //Using capitalization() method
use = ""
cnt = 0
tmp = userString.split(". ")
for i in tmp:
if (e. in i for e. in ["!","?","."]):
if i[0].islower():
use += i[0].upper() + i[1:]
cnt += 1
else:
use += i
else:
if i[0].islower():
use += i[0].upper() + i[1:]
cnt += 1
else:
use += i
use += ". "
return use, cnt
fixed, cnt = fix_capitalization("Our space mission will go on. There will be more shuttle crews, shuttle flights, and yes, more volunteers, civilians, and educators in space. Our aspirations and journeys don't end here.!")
print("Ex: Number of letters capitalized: ", cnt)
print(fixed)
Learn more about method here:
https://brainly.com/question/12976929
#SPJ4
the fact that big data comes in many formats and may be structured or unstructured is an indicator of its (fill the blank).
The fact that big data comes in many formats and may be structured or unstructured is an indicator of its variety.
Exactly why is huge data unstructured?The term "unstructured" simply refers to datasets, which are typically enormous collections of files, that aren't kept in a structured database manner. Despite not being prescribed by data models, unstructured data contains an underlying structure. In a textual or non-textual format, it might be produced by a human or a machine.Unstructured data is an amalgam of many different forms of data that are stored in their native formats, whereas structured data is very specialized and is saved in a preset format. So, structured data benefits from schema-on-write, whereas unstructured data benefits from schema-on-read.
To learn more about unstructured data refer to:
https://brainly.com/question/14491885
#SPJ4
Even without having studied a feedback loop that restores red blood cells mass after we bleed, you know that effector tissue in the feedback loop must be located in
red bone marrow
Even without having studied a feedback loop that restores red blood cells mass after we bleed, you know that effector tissue in the feedback loop must be located in red bone marrow. (True)
What is effector tissue?A tissue structure known as an effector reacts to an efferent impulse, such as a muscle or gland. A biochemical and electrical impulse that leaves the central nervous system is called an efferent impulse. It moves along nerve fibers. Brain and spinal cord are collectively referred to as the central nervous system.
Once more, the word effector specifically refers to muscles and glands. Skeletal muscles, in particular, are controlled voluntarily and are included in muscles. Skeletal muscles, like the biceps, quadriceps, triceps, and hamstrings, are what make you move.
Involuntary muscles, such as smooth ones, are also classified as muscles. In blood vessels, smooth muscles are present and can widen or narrow a blood vessel.
Learn more about effector tissue
https://brainly.com/question/14367229
#SPJ4
a fellow engineer tells you to configure the dhcp server to lease the last 100 usable ip addresses in subnet 10.1.4.0/23. which of the following ip addresses could be leased as a result of your new configuration?
C (10.1.5.200) is the ip address ould be leased as a result of the new configuration.
Why this configuration?
To answer this question, you must first determine the range of addresses in the subnet, which typically entails calculating the subnet ID and subnet broadcast address.
The mask converts to 255.255.254.0 when the subnet ID/mask is 10.1.4.0/23. Following the decimal process described in this chapter, you can copy the subnet ID's first two octets to find the subnet broadcast address because the mask's value is 255 in each octet.
Because the mask has a 0 on the fourth octet, you write 255 there. In octet 3, the interesting octet, multiply the magic number (2) by the value of the subnet ID (4), minus one, for a value of 2 + 4 - 1 = 5. (In this case, the magic number is calculated as 256 - 254 = 2.) This results in the broadcast address 10.1.5.255. The last address that can be used is one less: 10.1.5.254. 10.1.5.155-10.1.5.254 is the address range that includes the last 100 addresses.
To learn more about ip address, visit: https://brainly.com/question/24930846
#SPJ4
Databases, blogs, and social networking help companies gather ___ to meet consumer needs through the development of products and services.information or data
In order to produce products and services that will suit consumer wants, businesses might acquire information or data with the aid of databases, blogs, and social networking.
What is the meaning of information?Information is an ambiguous concept that describes anything with the ability to inform. Information relates to the interpretation of what can be felt at its most basic level.
Information is what results from the processing, interpretation, organization, structuring, or presentation of data to give them meaning or utility. Data is placed in context by information. Intelligence, message, data, signal, and fact are some of the different names for information.
Learn more about information from here:
https://brainly.com/question/13629038
#SPJ1
5.22 LAB: Word frequencies Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with an integer indicating the number of words that follow. Assume that the list will always contain fewer than 20 words. Ex: If the input is: 5 hey hi Mark hi mark the output is: hey - 1 hi - 2 Mark 1 hi - 2 mark 1 Hint: Use two vectors, one vector for the strings and one vector for the frequencies. 406896.2611930.qx3zqy7 LAB 5.22.1: LAB: Word frequencies 0/10 ACTIVITY main.cpp Load default template... 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() { 7 8 /* Type your code here. */ 9 return 0; 10 11 } 12
It is feasible to develop code that reads a list of words in JAVA using knowledge of the computational language.
import java.util.Scanner;
public class LabProgram
{
public static int getFrequencyOfWord(String [ ] wordsList, int listSize, String currWord)
{
int iFreqReturn = 0;
for (int iLoop=0; iLoop<listSize; iLoop++)
{
if (wordsList[iLoop].compareToIgnoreCase(currWord)==0)
{
iFreqReturn++;
}
}
return (iFreqReturn);
}
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
final int MAX_NUM_WORDS=20;
int N=-1;
while ((N<0) || (N>MAX_NUM_WORDS))
{
System.out.print(" Please input # of words [max=" + MAX_NUM_WORDS + "] :>");
N = scanner.nextInt();
}
String words[] = new String[N];
for (int iLoop=0; iLoop<N; iLoop++)
{
System.out.print("Please input word # " + (iLoop+1) + ":>");
words [iLoop] = scanner.next();
//System.out.println(words[iLoop]);
}
for (int iLoop=0; iLoop<N; iLoop++)
{
String curWord = words[iLoop];
int freqCount = getFrequencyOfWord(words,N,curWord);
System.out.println(" word = >" + curWord + "< : freq # = " + freqCount);
}
}
}
Learn more about Word frequencies methods here: https://brainly.com/question/28063373
#SPJ4
Ellie i writing a gaming program where the character will hrink when their opponent enter their catle. What boundary mut be et for the program to work?
She is creating an algorithm that computers can use to solve equations by following a set of detailed instructions.
An algorithm is a set of guidelines for resolving a dilemma or carrying out a task. A recipe, which consists of detailed directions for creating a dish or meal, is a typical illustration of an algorithm. Algorithms are used by every computerized equipment to carry out its operations in the form of hardware- or software-based routines.
Algorithms are now crucial in the financial industry for the creation of automated and high-frequency trading (HFT) systems as well as the pricing of complex financial instruments like derivatives. An algorithm is a set of guidelines for resolving a dilemma or carrying out a task.
Algorithms are used by every technological device to reduce the time needed to complete tasks manually.
Algorithmic trading, commonly referred to as automated trading or black-box trading, involves buying or selling using a computer program.
To know more about algorithm click here:
https://brainly.com/question/22984934
#SPJ4
The answer is distance between players which is option (A)
discuss what is a trigger in database, and what is its purpose? discuss real-word application example of triggers. please do not write the sql command. provide a scenario of real-world application that you will use triggers.
A trigger is a special type of stored procedure in a database that automatically executes when an event occurs in the database.
Example of trigger :
A real-world application example of triggers is an order management system. For example, when an order is placed, a trigger can be used to automatically check if there is enough stock to fulfill the order. If there is sufficient stock, the trigger can update the inventory in the database and send a notification to the customer that the order has been successfully processed. If there is insufficient stock, the trigger can update the customer with the new delivery date. This helps to ensure that orders are fulfilled quickly and efficiently, while maintaining data integrity.
To know more about trigger
https://brainly.com/question/13384276
#SPJ4
Alaina has implemented wpa2 and uses enterprise authentication for access points in infrastructure mode. What encryption protocol is her network using?.
Since Alaina has implemented wpa2 and uses enterprise authentication for access points in infrastructure mode. The encryption protocol that her network is using is Advanced Encryption Standard (AES).
What is the function of the Advanced Encryption Standard, or AES?The Advanced Encryption Standard, also referred to by its former name Rijndael, is a standard for the encryption of electronic data created by the National Institute of Standards and Technology of the United States in 2001.
Hence, The United States government selected the Advanced Encryption Standard (AES) as a symmetric block cipher to safeguard sensitive data. AES is used to encrypt sensitive data in hardware and software across the globe. For the protection of electronic data as well as government computer security and cybersecurity, it is crucial.
Learn more about Advanced Encryption Standard from
https://brainly.com/question/14784819
#SPJ1
what is the preorder traversal of the elements in a avl tree after inserting 3, 4, 45, 21, 92, 12 in this order?
45, 4,3, 21, 12, 92 is the preorder traversal of the elements in a avl tree after inserting 3, 4, 45, 21, 92, 12 in this order.
The definition of an AVL tree is a height-balanced binary search tree in which each node has a balance factor that is determined by deducting the height of the node's right subtree from the height of its left subtree. Most in-memory sets and dictionaries are stored using AVL trees. Database applications, where insertions and deletions are less common but frequent data lookups are necessary, also frequently use AVL trees. The Adelson, Velski, and Landis (AVL) trees are height-balancing binary search trees.
Learn more about binary here-
https://brainly.com/question/19802955
#SPJ4
web 2.0 is referred to as the social web, and web 3.0 is described as the blank web. multiple choice question.
Web 2.0 is referred to as the social web, and web 3.0 is described as the personal web.
What is web 3.0?Web 3.0 is the concept of a new, more intelligent version of the internet. It is sometimes referred to as the Semantic Web, the Intelligence Web, or the Web of Data. It is an advancement on the current Web 2.0, which allows users to easily interact and share information through social networking, blogs, and other web-based applications. Web 3.0 is an effort to make the internet smarter and more organized.
The idea behind Web 3.0 is to use artificial intelligence, semantic technology, and natural language processing to organize data from the Web in an intelligent way. This would allow computers to better understand and interpret the content of the web. Additionally, Web 3.0 would use machine learning to make predictions and recommendations based on the data it collects. This could make web searches more efficient and accurate.
Web 3.0 would also use distributed ledger technology, such as blockchain, to decentralize data and increase security. Additionally, it would allow for more personalized experiences, as it would collect data from a variety of sources to create a more detailed view of the user.
Learn more about web 3.0
https://brainly.com/question/15022202
#SPJ4
the type of parameter passing which copies an argument value into its corresponding parameter in the called module is known as ...
Passing a reference to an argument in the calling function to the corresponding formal parameter of the called function is known as passing by reference (also known as passing by address).
The caller and the callee utilize the same variable for the argument so that a copy of the address of the real parameter is made in memory. The address of an argument is copied into the formal parameter when passing arguments to a function using the call by reference method. The address is used within the function to access the actual argument used during the call. It implies that the passed argument is impacted by modifications made to the parameter.
Learn more about parameter here-
https://brainly.com/question/27936993
#SPJ4
8. in cell b13, create a formula using the vlookup function that looks up the value from cell a11 in the range a5:b7, returns the value in column 2, and specifies an exact match. copy the formula to cell e13.
The creation of the formula using the VLOOKUP function is used to look up a value in a particular column is as follows:
The VLOOKUP formula to enter cell B13 is VLOOKUP(A11, A5:B7,2,0). What is the VLOOKUP function?The VLOOKUP function may be defined as a type of built-in Excel function that may significantly help you look for a specified value by searching for it vertically across the sheet.
The syntax of a VLOOKUP function is as follows:
VLOOKUP(lookup_value, cell_range, column_index, [return_value]).where lookup_value represents the value to look up, cell_range represents the cells to check, column_index represents the column index, and [return_value] is an optional entry, and it represents the value that will be returned by the lookup function.
Therefore, The creation of the formula using the VLOOKUP function is used to look up a value in a particular column is well described above.
To learn more about VLOOKUP functions, refer to the link:
https://brainly.com/question/19372969
#SPJ1
Although ________ satellites are the most expensive to build and launch, they also have the longest orbital life of many years.
the minimum wire bending space required at the top and bottom of a panelboard that has three 3/0 awg conductors connected to each busbar is
The minimum wire bending space required at the top and bottom of a panelboard that has three 3/0 awg conductors connected to each busbar is 8 inches.
What is wire bending space?A straight line drawn from the end of the lug or wire connection to the wall, obstacle, or obstruction must be used to measure the bending space at the terminals.
The conductor may not be bent to a radius that is less than 8 times the overall diameter for non-shielded conductors or 12 times the overall diameter for shielded or lead-covered conductors, either during installation or later.
Thus, it is 8 inches.
For more information about minimum wire bending, click here:
https://brainly.com/question/13584992
#SPJ1
now, you will dive in to understanding how linear models vary from sample to sample. here two random samples from a population are plotted onto the scatterplot. the population data (called popdata) already exists and is pre-loaded, along with ggplot and dplyr.
Using the whole dataset, popdata, plot response vs. explanatory, we will add a point layer using geom_point() and add a smooth trend layer using geom_smooth(), with the linear regression method, "lm", and no standard error ribbon, se = FALSE.
What is dataset?A collection of data is referred to as a dataset. When dealing with tabular data, a dataset is equivalent to one or more database tables, where each row corresponds to a specific record of the dataset in question and each column represents a specific variable. The dataset includes values for each variable, including things like an object's height and weight, for each set member. A group of files or documents can also make up a dataset.
Datasets are used to measure the information made available in a public open data repository in the open data discipline. Over a million datasets are gathered by the European data.europa.eu portal.
# Using popdata, plot response vs. explanatory
ggplot(___, aes(x = ___, y = ___)) +
# Add a point layer
___() +
# Add a smooth trend layer, using lin. reg., no ribbon
___(method = "___", se = ___)
Learn more about dataset
https://brainly.com/question/28168026
#SPJ4
write a statement that assigns the variable d a dictionary that contains one element. the element's key should be the string 'answer' and the element's value should be the integer 42
Answer:
d={'answer': 42}
Explanation:
Implement a class Bug that models a bug climbing up a pole. Each time the up method is called, the bug climbs 10 cm. Whenever it reaches the top of the pole (at 100 cm), it slides back to the bottom. Provide a method getPosition that returns the current position. Complete the following file Bug.java 1 public class Bug 3 4 private int position; 5 I/ Provide the getPosition and up methods Submit
Using the codes in computational language in C++ it is possible to write a code that Implement a class Bug that models a bug climbing up a pole. Each time the up method is called, the
Writting the code:#include<iostream>
using namespace std;
class Bug
{
public:
int get_position() const;
void reset();
void up();
private:
int position = 0;
};
int Bug::get_position() const
{
//return current position of bug
return position;
}
void Bug::reset()
{
//position of bug resetted to 0
position = 0;
}
void Bug::up()
{
//increment bug position by 10 and if it becomes 100 then move it back to 0
position += 10;
if (position == 100)
position = 0;
}
int main()
{
Bug bugsy;
Bug itsy_bitsy;
bugsy.reset();
itsy_bitsy.reset();
bugsy.up();
bugsy.up();
cout << bugsy.get_position() << endl;
cout << "Expected: 20" << endl;
itsy_bitsy.up();
itsy_bitsy.up();
itsy_bitsy.up();
cout << itsy_bitsy.get_position() << endl;
cout << "Expected: 30" << endl;
for (int i = 1; i <= 8; i++)
{
bugsy.up();
}
cout << bugsy.get_position() << endl;
cout << "Expected: 0" << endl;
bugsy.up();
cout << bugsy.get_position() << endl;
cout << "Expected: 10" << endl;
return 0;
}
See more about C++ at brainly.com/question/18502436
#SPJ1