Given the above method, the statements that are valid uses of the method doSomething is: I only. (Option A).
What is a statement in computer programming?A statement is a grammatical unit of an imperative programming language that expresses some action to be performed. A program developed in this language is made up of a series of one or more statements.
In programming, a statement is any piece of code that informs the compiler to do a specified operation. A computer program is a collection of these assertions. A program code can contain a variety of statements that regulate the input and output of the tasks that the program is supposed to do.
Learn more about statements:
https://brainly.com/question/13735734
#SPJ1
you want to configure static nat so that packets from host 192.168.2.100 will always be assigned the registered ip address 24.1.2.11 as shown. match the missing lines with the required commands.
the missing lines with the required commands is ip nat inside source static 192.168.2.100 24.1.2.11.
What is IP address?
Any device on a network can be identified by its IP address, which stands for Internet Protocol. IP addresses are used by computers to connect with one another on different networks and the internet.
Private IP internetworks that employ unregistered IP addresses can connect to the Internet thanks to NAT. NAT runs on a device and typically joins two networks. The private (internal network addresses that are not globally unique) addresses are converted into lawful addresses by NAT before packets are sent into another network. NAT can be set up to only advertise one address to the outside world for the entire network. By effectively concealing the entire internal network behind that one address, this capability increases security.
A NAT-configured device has a minimum of two network interfaces: one to the internal network and one to the external network. NAT is typically set up between a stub domain and the backbone at the exit device. NAT converts the locally significant source address into a globally unique address when a packet leaves the domain.
NAT converts a packet's globally unique destination address into a local address as soon as it enters the domain. The translation table for each NAT must be the same if there are several exit points. If NAT is unable to assign an address because there are no more addresses available, it drops the message. Afterward, NAT transmits to the destination an Internet Control Message Protocol (ICMP) host unreachable packet.
Learn more about IP address click here:
https://brainly.com/question/27961221
#SPJ4
aos, advance orbital security, designed a security system for a home that would call the police if the master switch to the security system is turned on and if the motion or sound sensor was triggered. which of the following circuits resembles the circuit that aos designed?
Advance Orbital Security would be using Passive Infra Red (PIR) and Active Ultrasonic sound detector in its security system design in order to trigger the security system and call the police upon activation.
Passive Infra Red (PIR) sensor or motion detector security system uses passive infra red that measures changes in the heat energy in the form of electromagnetic radiation radiating from its field of view, and those heat energy are often invisible to human eye. As as soon as the device detected changes in the electromagnetic radiations, it will send out an electric signal from the triggered device to the security system control panel which triggers the alarm sound which then simultaneously sends a cellular signal to the monitoring center at Advance Orbital Security which will then contacted and dispatch the police.
Active Ultrasonic Sound detector in the security system works by emitting ultrasonic sound waves that bounce off objects in its surroundings and return to the sensor with a transducer within the sensor that sends the pulse and receives the echo determining the distance between itself and the target by measuring the time between sending and receiving the signal. As soon as there is a time difference between sending and receiving the echo, it will send out an electric signal, alerting the security system control panel which then send out e cellular signal to the monitoring center at AOS security system which will then dispatch the local law enforcement agency.
To learn more about security system visit: https://brainly.com/question/826760
#SPJ4
what is the main goal of issuing multiple instructions in a clock cycle?
The main goal of issuing multiple instructions in a clock cycle is Multiple issue CPU
It has been examined a number of hardware and software ways to exploit ILP so far. In a pipelined approach, the ideal CPI that we may anticipate is merely 1 We need to consider the possibility of issuing and completing numerous instructions each clock cycle if we wish to lower CPI further. For instance, if we send and process two instructions per clock cycle, our CPI should ideally be 0.5. Multiple issue processors are those that operate in this manner. The operational components on the back end are given a number of instructions. We refer to a processor as being m-issue-wide if m is the most significant number of instructions that can be issued in a single cycle.
To know more about Multiple issue processors, visit;
https://brainly.com/question/3649876
#SPJ4
tom works as a network consultant for a midsize company. he has been configured as a helper for users in the enterprise (by domain or ou). one of the users contacts him and invites him for help through remote assistance. which of the following commands will tom use to accomplish the task?
Remote desktop refers to the capability of a different computer to connect to and use a distant desktop computer.
What is computer?Computer is defined as a programmable electrical gadget that takes in raw data as input and applies a set of rules to it to output the outcome. After executing logical and mathematical processes, it renders output and can save the output for further use. It consists of the three previously mentioned major computer components: memory device Unit of control. Unit of Arithmetic and Logical.
Before installing a new version of Windows on your organization's computers, the Compatibility Administrator program aids in resolving any application compatibility problems. Some incompatibilities caused by changes between Windows operating system versions can be resolved.
Thus, remote desktop refers to the capability of a different computer to connect to and use a distant desktop computer.
To learn more about computer, refer to the link below:
https://brainly.com/question/21080395
#SPJ1
If you could invent a technology that could change the world for the better, what would it be? List 3-5 ideas with brief explanations.
Answer:
1) I'd invent a device that would diagnose a person's disease or illness immediately, and would suggest the best course of treatment for them, and would also tell where to procure the treatment, as well as how to administer it.
2) I'd invent a device that shows the best way to divide resources like water, food etc. among the people and how to preserve them for as long as possible.
that's all i can think of.
write the code to call the function named send signal. there are no parameters for this function. 1 enter your code
The code to call the function named send_signal which has no parameters for the function is given as follows;
send_signal()
SendSignal is used to synchronize two threads at a time. To synchronize several threads on the same event, utilize the event management functions: EventCreate: This method creates an event.
Note that Coding generates a collection of instructions that computers may use. These instructions specify the activities a computer may and cannot perform. Coding enables programmers to create programs like websites and applications. Computer programmers may also instruct machines on how to handle data more efficiently and quickly.
Learn more about coding:
https://brainly.com/question/28848004
#SPJ1
the element of website design that refers to the website's aesthetic appeal and the functional look and feel of the site's layout and visual design is known as . multiple choice question. connection customization context content
The element of website design that refers to the website's aesthetic appeal and the functional look and feel of the site's layout and visual design is known as option C: context .
Describe the design context.Websites with good content design are simpler to use and rank higher in search results. It takes care of all the tedious work so that using the internet is easier, quicker, and more fun. Understanding your audience is the first step, something we can assist you with if you get in touch.
Therefore, The notion that no design can be created in a vacuum is reflected in contextual design. that a single technology or system may interact in a context that is far larger than it; that environment won't necessarily stay the same (unchanging).
Learn more about website design from
https://brainly.com/question/22775095
#SPJ1
with respect to organizations, confidentiality means protecting ___ information about company finances, procedures, products, and research that competitors would find valuable.
confidentiality means protecting proprietary information about company finances, procedures, products, and research that competitors would find valuable
proprietary information includes Financial information, statistics or declarations, trade secrets, merchandise research & innovation, current, and future new products and quality requirements, marketing campaigns, plans or tactics, schematics, customer information, software programs, processes, as well as understanding which has been explicitly labeled and labeled as specialized by the corporation are all examples of information and material related to or affiliated with such a company and its products, business, or activities.
A firm's proprietary information is highly significant and may even be critical data. Typically, the corporation could employ this knowledge to its benefit in its industry. Proprietary items include anything that the creator or producer has the only legal right to use, know, develop, produce, and/or promote.
Learn more about proprietary here: https://brainly.com/question/27332470
#SPJ4
Which of the following is a text file that a website stores on a client's hard drive to track and
record information about the user?
Cookie
Certificate
Mobile code
Digital signature
The option that is a text file that a website stores on a client's hard drive to track and record information about the user is option A: Cookie.
In computer language, what exactly is a cookie?A cookie is a piece of information from a website that is saved in a web browser for subsequent retrieval by the website. Cookies are used to let a server know whether visitors have visited a specific website again.
Therefore, Computer cookies are small files that web servers send to browsers and frequently contain unique identifiers. Each time your browser requests a new page, the server will receive these cookies. It enables a website to keep track of your online preferences and behavior.
Learn more about Cookie from
https://brainly.com/question/14252552
#SPJ1
_____ refers to giving employees the option of choosing when to work during the workday or workweek.
Telecommuting
Compressed workweek
Job autonomy
Flextime
Flextime is the option of choosing when to workday or workweek
What is flextime?
They can more easily achieve work-life balance and organize work around their other personal errands and commitments with flexitime. Allowing for flextime is also part of providing a family-friendly working environment.
Work flexibility cannot be achieved in all industries and professions (for example, in a factory or a hospital), but it is becoming the new normal for most creative and intellectual workers.
Keeping this in mind, you can increase work flexibility for your employees by adjusting three key parameters:
Working times (e.g. flexitime)
Patterns of work (e.g. job sharing)
Working environments (e.g. remote work, flexplace)
The ultimate goal is to provide any combination of the above to employees, preferably one that increases both employee satisfaction and company productivity at the same time.
Hence to conclude flextime is a boon for employees the option of choosing when to work during the workday or workweek
To know more on flextime jobs follow this link
https://brainly.com/question/14919589
#SPJ1
You need to consider the underlined segment to establish whether it is accurate.
Black Duck can be used to make sure that all the open source libraries conform to your company's licensing criteria.
Select `No adjustment required` if the underlined segment is accurate. If the underlined segment is inaccurate, select the accurate option.
A. No adjustment required.
B. Maven
C. Bamboo
D. CMAKE
The main service for storing, processing, and protecting data is provided by the Database Engine component of SQL Server. On a single computer, SQL Server enables running up to 50 instances of the Database Engine.
Every application request to perform work on the data in any of the databases that instance manages is handled by a copy of the sqlservr.exe executable running as an OS service known as an instance of the Database Engine. If the application and instance are located on different machines, the applications connect to the instance using a network connection. The SQL Server connection can function as either a network connection or an in-memory connection if the application and instance are both running on the same computer.
Learn more about database here-
https://brainly.com/question/6447559
#SPJ4
which type of attack involves capturing data packets from a network and retransmitting them to produce an unauthorized effect? the receipt of duplicate, authenticated internet protocol (ip) packets may disrupt service or produce another undesired consequence.
Replay attacks involves capturing data packets from a network and retransmitting them to produce an unauthorized effect
What are replay attacks?
Replay attacks entail retransmitting data packets that have been taken from a network in order to have an unauthorized effect. Receiving duplicate, authenticated IP packets could cause service to be interrupted or have some other unfavorable effect.
A replay attack is an active attack since it needs access to listen to all network messages and the capacity to transmit false ones.
Replay attacks are extremely prevalent because a hacker doesn't need specialised knowledge to decrypt the data after intercepting a transmission from a network. Replay attacks come in many different shapes and sizes and are not just restricted to credit card transactions.
Hence to conclude Replay attacks involves capturing data packets from a network and retransmitting them to produce an unauthorized effect
To know more on attacks in network follow this link
https://brainly.com/question/25807648
#SPJ4
What type of technology created conveniences by providing wireless communication systems that allowed people to access information wherever they wanted it?.
The type of technology created conveniences by providing wireless communication systems that allowed people to access information wherever they wanted it is Bluetooth technology.
Describe Bluetooth CN.Using short-wavelength radio channels in the ISM band between 2400 and 2480 MHz, Bluetooth is a patented open wireless technology technique for transmitting information over short distances from stationary and mobile devices.
Hence, You can communicate small quantities of data using Bluetooth Low Energy, sometimes referred to as Bluetooth Smart, a variation of "traditional" Bluetooth. The reduced power consumption of Bluetooth Low Energy is the primary distinction between the two technologies. Thus, it is called "Low Energy."
Learn more about Bluetooth technology from
https://brainly.com/question/28590612
#SPJ1
Some clues left on a drive that might indicate steganography include which of the following?
a. Graphics files with the same name but different file sizes
b. Multiple copies of a graphics file
c. Steganography programs in the suspect's All Programs list
D. All of the above
Some clues left on a drive that might indicate steganography include option D: All of the above.
a. Graphics files with the same name but different file sizes.
b. Multiple copies of a graphics file.
c. Steganography programs in the suspect's All Programs list.
What is steganography?Steganography is a technique for concealing sensitive information within a regular, non-sensitive file or message so as to avoid detection; the sensitive information is then extracted at its intended location. To further conceal or protect data, steganography can be used in conjunction with encryption.
Hence, Steganography is the practice of enclosing openly available information inside of something that seems normal. Steganography is a technique used by cybercriminals to conceal malicious code or stolen data in media like images and audio files.
Learn more about Steganography from
https://brainly.com/question/13089179
#SPJ1
Why do government organizations such as the United States Postal Service have to follow more rules than private businesses when it comes to spending money?
The full eagle logo, used in various versions from 1970 to 1993
The United States Postal Service (USPS), also known as the Post Office, U.S. Mail, or Postal Service, is an independent agency of the executive branch of the United States federal government responsible for providing postal service in the U.S., including its insular areas and associated states. It is one of the few government agencies explicitly authorized by the U.S. Constitution. The USPS, as of 2021, has 516,636 career employees and 136,531 non-career employee
Explanation:
to ensure the loop runs exactly 10 times, what specific value instead of n one should use? for(int i
In order to ensure that the given loop runs exactly 10 times, the 'n' should be replaced with 10. Hence, option A '10' is the correct answer.
The correct expression is as follows:
"for(int i = 0; i < 10; i ++ )
{
System.out.println(i);
}"
The correct value that is replaced with 'n' is 10. Because in the question it is mentioned that the given 'for loop' needs to be run exactly 10 times. For running the loop upto the 10 times, the value of the 'i' is to be less that 10 i.e. 'i < 10'. Since the loop is starting from the value 0 that 'int i=0' and completes its 10th iteration when the value of 'i' reaches 9 that is less than 10.
Therefore, to run the 'loop' up to 10 times, 'n' should be 10.
"
Here is the complete question:
To ensure the loop runs exactly 10 times, what specific value instead of n one should use? for(int i= 0; i<n; i++) { System.out.println(i); }
A.10
B. 11
C. 9
D. None
"
You can leran more about loop at
https://brainly.com/question/26568485
#SPJ4
Which type of transducer uses electronic focusing in the elevation direction?
A. linear array
B. curvilinear array
C. 1.5D linear array
D. phased array
1.5D linear array is used to electronic focusing in the elevation direction. A 5 MHz, 1D linear array's performance in the uplift. With a 50 mm focus, the elevation aperture is 10 mm ().
What is 1.5 D transducer?Apodization in elevation and dynamic focusing are provided by 1.5D probes employing additional beamformer channels. Particularly in the mid- and far-field, 1.5D probes can offer detail resolution comparable to 1.25D probes and contrast resolution significantly better than 1.25D probes.A 5 MHz, 1D linear array's performance in the uplift. With a 50 mm focus, the elevation aperture is 10 mm ().Particularly in the mid- and far-field, 1.5D probes can offer detail resolution comparable to 1.25D probes and contrast resolution significantly better than 1.25D probes. In order to use 1.75D and 2D arrays for adaptive acoustics and two-dimensional beam steering, the system channel count must be further increased.To learn more about Elevation refer to:
brainly.com/question/25748640
#SPJ4
a firm that wanted to enable its employees to use and share data without allowing outsiders to gain access could do so by establishing an) internet internet. extranet. intranet.
A firm that wanted to enable its employees to use and share data without allowing outsiders to gain access could do so by establishing an intranet. The correct option is D.
What is an intranet?An intranet is a computer network used within an organization to share information, facilitate communication, provide collaboration tools, operational systems, and other computing services, usually with no outside access.
An intranet is a network that allows employees to create content, communicate, collaborate, and grow the company culture.
Meanwhile, an extranet gives authorized customers, vendors, partners, or others outside the company controlled access.
Thus, the correct option is D.
For more details regarding intranet, visit:
https://brainly.com/question/19339846
#SPJ1
you are working on an ipv6 address 2608:fe10:1:aa:002:50ff:fe2b:e708. you want to create subnets within this ip address. which of the following will you choose to alter when creating subnets for this address?
The following will you choose to alter when creating subnets for the address is 2608.
What are subnets?Subnets are defined as a partition of an IP network logically. A network can be divided into two or more networks via a method called subnetting. A subnet mask is used to divide an IP address in half. Subnetting separates broadcast domains to effectively route traffic, enhancing network performance and speed.
The site prefix is 2608:FE10:1:AA and the interface ID is 002:50FF:FE2B:E708 in the IPv6 address 2608:FE10:1:AA:002:50FF:FE2B:E708. Site prefixes may be displayed as, for instance, 2608:FE10:1:AA::/64, where the network's bit count is listed after a slash.
Thus, the following will you choose to alter when creating subnets for the address is 2608.
To learn more about subnets, refer to the link below:
https://brainly.com/question/15055849
#SPJ1
data types are automatically assigned as the smallest possible data type.
A. true
B. false
Data types are automatically assigned as the smallest possible data type: A. true.
What are the kinds of data type?In Computer programming, there are four (4) common kinds of data type and these include the following:
Integer type (int)Floating point type (float)Boolean (bool)String (str)Generally speaking, data are categorized automatically to smallest data type and size with each of them matching that of other inputs because they must be blended with other data.
Read more on a data types here: https://brainly.com/question/13438922
#SPJ1
you are developing an azure-based application that stores all application settings in the azure app configuration service. you provision a standard tier azure app configuration instance and enable the customer-managed key capability on the instance. you need to allow the azure app configuration instance to use an azure key vault key. which two actions should you perform? each correct answer presents part of the solution. a. enable the purge-protection feature on the azure key vault. b. assign a managed identity to the azure app configuration instance. c. configure a private endpoint for the azure app configuration instance. d. configure managed identity permission to access the azure key vault. e. create a dns cname resource record for the azure app configuration instance.
(b) assign a managed identity to the azure app configuration instance and (d) configure managed identity permission to access the azure key vault are the two actions that need to perform for this situation.
What is the azure key vault?
By leveraging keys that are guarded by hardware security modules, Microsoft Azure Key Vault, a cloud-hosted management solution, enables customers to encrypt keys and tiny secrets (HSMs). Small secrets include passwords and other data that is less than 10 KB in size. PFX documents
Both managed hardware security module (HSM) pools and vaults are supported by the Key Vault service. Keys, secrets, and certificates secured by an HSM can be stored in vaults. Managed HSM pools only accept keys with an HSM backup.
To learn more about the azure key vault, use the link given
https://brainly.com/question/29433704
#SPJ1
Tamika is working on her GDD and explaining one of the four elements of her game by giving details about how the game is physically played and what equipment is necessary to play the game. Which element is Tamika working on? A. obstacles B. operation C. objective D. outcome
Tamika is working on her GDD and explaining one of the four elements of her game. The element that Tamika is working on is operation. The correct option is B.
What is GDD?A game design document (GDD) is a piece of software that serves as a blueprint for creating your game. It aids in defining the parameters of your game and establishes the overall course of the endeavor, keeping the team in agreement.
The main themes, aesthetics, features, mechanics, and ideas of your game project can be tracked using a Game Design Document, or GDD for short.
Therefore, the correct option is B. operation.
To learn more about GDD, refer to the link:
https://brainly.com/question/29319490
#SPJ1
what will a layer 2 switch do when the destination mac address of a received frame is not in the mac table?
If the switch's Mac table contains an entry for the destination host, the switch will broadcast the frame through all of its ports except the port on which it is received if there is no entry for the destination host. However, if there is an entry for the destination host, the switch will broadcast the frame unicast.
What is Mac table?
On Ethernet switches, the MAC address table—also known as the Content Addressable Memory (CAM) table—is used to decide where to forward traffic on a LAN. Let's take a closer look at how the MAC address table is created and used by an Ethernet switch to facilitate the movement of traffic to its destination.
The switch searches for a match between the destination MAC address of the frame and an entry in its MAC address database if the destination MAC address is a unicast address.
The switch forwards the frame out of the designated port if the target MAC address is listed in the table. The switch forwards the frame out all ports other than the incoming port if the destination MAC address is not listed in the table. It's known as an unknown unicast.
Learn more about Mac Table address click here:
https://brainly.com/question/29313724
#SPJ4
you are cleaning your desk at work. you toss several stacks of paper in the trash, including a sticky note with your password written on it. which of the following types of non-technical password attacks have you enabled?
Dumpster Diving is a non-technical password attack that is enabled if you write a password on a sticky note and through in the trash. The answer is Dumpster Diving.
Dumpster diving is the practice of rummaging through other people's trash for buried treasure. Dumpster diving is a technique used in information technology (IT) to recover data from discarded items that could be used to carry out an attack or gain access to networks.
Dumpster diving isn't just looking through trash for things like sticky-noted passwords or access credentials that are obviously valuable. A hacker using social engineering tactics may utilize seemingly innocent information, such as a phone book, calendar, or organizational chart, password written over stick notes to help them access the network.
Experts advise businesses to implement a disposal policy that requires all paper, including printed copies, to be shredded in a cross-cut slicer before being recycled, all storage media to be erased, and all employees to be trained on the risks of untracked trash in order to prevent dumpster divers from learning anything valuable from the trash.
You can learn more about Dumpster diving at
https://brainly.com/question/15012416
#SPJ4
write a function called delete repeats that has a partially filled array of characters as a formal parameter and that deletes all repeated letters from the array. it returns a new dynamic array where all repeated letters are deleted. do not modify the input array.
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
network architecture in which one or more high-powered computers provide resources or services to other computers on the network.
A network architecture in which one more more high powered computers provide resources or services to other computers on the network is called client-server architecture.
Client-server architecture of a computer network is defined as having one or more host computer from a centralized server acts as a service provider for many remote client processors. In a client-server network architecture, Clients are usually PCs, laptops, workstations, or any other personal devices such as smartphones and tablets, while the servers are located elsewhere on the network, usually on more powerful machines. The examples of a client-server network architecture are: web servers, web browsers, FTP (File Transfer Protocol), DNS (Domain Name System). There are many benefits of a client-server network architecture such as a quick and secure data transfer, efficient data delivery to the client devices, and easier management and maintenance.
To learn more about client-server network architecture visit: https://brainly.com/question/24137718
#SPJ4
TRUE o fasle, communication technology is nort called telecommunications
Answer: The above statement is true.
ICT refers to technologies that provide access to information through telecommunications.
Explanation:
When concurrently processing instructions, a shared memory computer works well with a common data set in a _____ memory space
a. distributed
b. cache
c. single
When concurrently processing instructions, a shared memory computer works well with a common data set in a single memory space. (Option C)
What is a Shared a Shared Memory Computer?In computer engineering, shared memory is the memory that may be accessed by many applications at the same time in order to facilitate communication or minimize redundant copies. Shared memory is a fast way to transfer data between applications.
Shared memory is a storage region shared by all Service Manager server processes on a host server. Sharing data across processes is made easier by using shared memory.
Learn more about shared memory computers:
https://brainly.com/question/14982890
#SPJ1
Describing Label Printing Options
What are some options when printing labels? Check all that apply.
random addresses
single label
handwritten label
full page of same label
Custom labels are printed using a variety of techniques in the label printing process. Some options when printing labels are Single label and Full page of same label.
What Is Label Printing?
Label printing is the process of creating personalized labels using different techniques. These techniques include wide-format printing, flexographic printing, and digital printing, all of which have an impact on how the label looks, feels, and serves its purpose.
Label Printing Today:
Flexographic printing has continued to advance and prosper up until the 1990s, when digital printing emerged as a brand-new method for producing labels. With the addition of inkjet technology, this process has advanced today, producing premium, full-color labels with a less time-consuming procedure and less waste.
To know more about Label Printing, visit: https://brainly.com/question/4676056
#SPJ9
6.26 lab: toll calculations toll roads have different fees at different times of the day and on weekends. write a function calctoll() that has three arguments: the current hour of time (int), whether the time is morning (bool), and whether the day is a weekend (bool). the function returns the correct toll fee (double), based on the chart below. weekday tolls before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) starting 8:00 pm ($1.40) weekend tolls before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) starting 8:00 pm ($1.10) ex: the function calls below, with the given arguments, will return the following toll fees: calctoll(8, true, false) returns 2.95 calctoll(1, false, false) returns 1.90 calctoll(3, false, true) returns 2.15 calctoll(5, true, true) returns 1.05
For the implementation of toll calculation we are using C++ programming.
What is C++ programming?
A general-purpose programming and coding language is C++ (also known as "C-plus-plus"). As well as being used for in-game programming, software engineering, data structures, and other things, C++ is also used to create browsers, operating systems, and applications.
Code for the toll calculation:
#include<iostream>
#include<iomanip>
using namespace std;
double CalcToll(int hour,bool isMorning,bool isWeekend)
{
double res;
if(isWeekend)
{
if(isMorning && hour<7)
{
res=1.05;
}
else if(isMorning && (hour>=7 || hour<=12))
{
res=2.15;
}
else if(!isMorning && (hour>=1 || hour<=7))
{
res=2.15;
}
else if(!isMorning && hour>=8)
{
res=1.10;
}
}
else
{
if(isMorning && hour<7)
{
res=1.15;
}
else if(isMorning && (hour>=7 || hour<=9))
{
res=2.95;
}
else if(!isMorning && (hour>10 || hour<=12 || hour>=1 || hour<=2)) { res=1.90;
}
else if(!isMorning && (hour>=3 || hour<=7))
{
res=3.95;
}
else if(!isMorning && hour>=8)
{
res=1.40;
}
}
return res;
}
int main()
{
cout<<CalcToll(8,true,false)<<endl;
cout<<CalcToll(1,false,false)<<endl;
cout<<CalcToll(3,false,true)<<endl;
cout<<CalcToll(5,true,true)<<endl;
return 0;
}
Output:
2.95
1.9
2.15
1.05
Learn more about C++ Programming click here:
https://brainly.com/question/28959658
#SPJ4