Answer:
#include <iostream>
#include<string>
#include<fstream>
using namespace std;
void evaluateBook(string bookName);
int countCharacters(string bookLine);
int countLetters(string bookLine);
int totalPunctuations(string bookLine);
int main()
{
evaluateBook("demo-book.txt");
return 0;
}
int countCharacters(string bookLine) {
return bookLine.length();
}
int countLetters(string bookLine) {
int counter = 0;
for (int i = 0; i < bookLine.length(); i++) {
if ((bookLine[i] >= 'a' && bookLine[i] <= 'z') || (bookLine[i] >= 'A' && bookLine[i] <= 'Z')) {
counter++;
}
}
return counter;
}
int totalPunctuations(string bookLine) {
int counter = 0;
for (int i = 0; i < bookLine.length(); i++) {
if (bookLine[i]=='\.' || bookLine[i]=='\,' || bookLine[i]=='\"' || bookLine[i]=='\'') {
counter++;
}
}
return counter;
}
void evaluateBook(string bookName) {
ifstream in(bookName);
int totalVisibleCharacters = 0,totalLetters=0,numberOfPunctuations=0;
if (!in) {
cout << "File not found!!\n";
exit(0);
}
string bookLine;
while (getline(in, bookLine)) {
totalVisibleCharacters += countCharacters(bookLine);
totalLetters += countLetters(bookLine);
numberOfPunctuations += totalPunctuations(bookLine);
}
cout << "Total Visible charcters count: "<<totalVisibleCharacters << endl;
cout << "Total letters count: " << totalLetters << endl;
cout << "Total punctuations count: " << numberOfPunctuations<< endl;
}
Explanation:
Create a function that takes a bookLine string as a parameter and returns total number of visible character.Create a function that takes a bookLine string as a parameter and returns total number of letters.Create a function that takes a bookLine string as a parameter and returns total number of punctuation.Inside the evaluateBook function, read the file line by line and track all the information by calling all the above created functions.Lastly, display the results.Sentiment analysis algorithms use simple terms to express sentiment about a product or service, so ________ makes it __________ to classify online content as positive, negative, or neutral.
a. sarcasm; difficult
b. exaggeration; simple
c. sarcasm; simple
d. exaggeration; difficult
Answer:
sarcasm , difficult
Explanation:
Sarcasm make it difficult to classify online content as positive ,negative or neutral because sarcasm content had many meaning and it involve some humor also which make it difficult weather to classify as positive or negative or neutral.
Help users calculate their car's miles per gallon. Write a program to allow a user to enter the number of miles driven and the number of gallons of gas used. The output should be the miles per gallon. Use a Do...While (post- test) loop to allow users to enter as many sets of data as desired. Using Raptor program
Answer:
The Raptor program for this question is given in the attachment below.
Explanation:
Run a loop until user decides to quit the program.Get the number of miles and gallons from user as an input.Use the formula to calculate miles per gallon.Display the calculated value of miles per gallon.Ask the user if they would like to continue using this program.what other apps are associated with google forms.
Answer:
Explanation:
There are google classroom
Which of the following statements holds true for the term "html"? It refers to a system that connects end users to the Internet. It refers to the language used to create and format Web pages. It refers to a situation when separate ISPs link their networks to swap traffic on the Internet. It refers to high-speed data lines provided by many firms all across the world that interconnect and collectively form the core of the Internet. It refers to the broadband service provided via light-transmitting fiber-optic cables.
Answer:
Your answer is B. It refers to the language used to create and format Web pages.
Explanation:
HTML stands for "Hyper Text Markup Language", which is a specification used on any webpage, ever. It was created by Sir Tim Berners-Lee in late 1991 and was officially released in 1995. This language is actually what is sent to your browser, which then interprets it and allows you to see the pretty pictures of Brainly.com! As of right now, HTML is at it's 5th revision, also known as HTML5, which is another term you'll see around.
Thanks, let me know if this helped!
Answer:
b
Explanation:
The average transaction at a single channel, single phase automatic teller can be completed in 7.5 minutes and customers arrive at the average rate of one every ten minutes. On average, what is the server utilization? (Choose the closest answer.)
Answer:
server utilization = 0.75
Explanation:
given data
single phase automatic teller = 7.5 minutes
average rate = 1 every 10 minutes
solution
we get here Service rate that is
Service rate [tex]\mu[/tex] = [tex]\frac{7.5}{60}[/tex]
Service rate [tex]\mu[/tex] = 8 per hour
and here arrival rate will be
arrival rate [tex]\lambda[/tex] = [tex]\frac{10}{60}[/tex]
so here we get server utilization that is express as
server utilization = [tex]\frac{\lambda }{\mu}[/tex]
server utilization = [tex]\frac{6}{8}[/tex]
server utilization = 0.75
A bank tellers’ hourly wage will increase from $24 to $27.60. What percent increase does this represent?
Answer:
15%
Explanation:
24.00 increased by 15% is 27.60
The increase is $3.60
Answer:
The increase is $3.60
Explanation:
within a google form when looking which option do u use?
summary
question
individual
all of these
Well Macy, I don't doubt that you know this and your just testing us but I think you should use all of these.
What is the name of the small square in the bottom right-hand corner of a selected cell or range called?
grab bar
Autofill
fill handle
Flash Fill bar
Answer:
Fill Handle
Explanation:
because google told me
Is a psychrometer more likely used at a beach or a desert in California
Answer:
the desert
Explanation:
hope this helped
can you help me with a layout for a cafe?
I linked an image below, I feel like I know what you're doing... you can use this image for reference. Change a few things now and there to make it your perfect cafe layout!
In addition to paying $100 per month for health insurance, sam is responsible for paying her first $500 of medical bills every year before her insurance covers and cost. The $500 sam must pay is called the:
Answer:
Deductible
Explanation:
Deductible is the amount you must pay for a health care service before your health insurance begin to cover your remaining costs. Deductibles are not compulsory for all health care services therefore before registering to any insurance company, you should ask the company for list of covered service so that you can prevent unwanted billing surprises. After you pay your deductible, you usually pay only a copayment or coinsurance for covered services
Which method is an example of overloading the method that follows?public int ParseNumber(String numberString){...}a.public int Parse(String numberString){...}b.public int ParseNumber(String num){...}c.public int ParseNumber(String numberString, String entry){...}
Answer:
Option c public int ParseNumber(String numberString, String entry){...}
Explanation:
Method overloading is the way we can define different methods that share the same name but with different signatures. The method signatures can refer to the number of input parameters or the type of input parameters. For example, if given a method multiplication as below
public int multiplication(int a, int b){
....
}
We can overload the method above by having different signatures
//Overloaded method 1
public double multiplication(double a, double b){
.........
}
//Overloaded method 2
public int multiplication(int a, int b, int c ){
.........
}
There for the option c is an example of method overloading as it has the same method name with the original method but with different signature - one more string type parameter.
IT organizations implement powerful information systems like ERP and SCM that provide centralized data repositories. In addition, business units have tools for their particular units that individuals can use to report on and analyze collected data. This IT governance approach is best described as: ________.
Answer:
Federalism
Explanation:
IT companies apply different governance approaches like Distributed Control, Decentralized, Federalism, joint-Control, and Centralized control but in above mentioned scenario it is federalism which is best fitted in this case.
Answer:
Federalism
Explanation:
Federalism is a type of government in which the power is divided between the national government and other governmental units. It contrasts with a unitary government, in which a central authority holds the power, and a confederation, in which states, for example, are clearly dominant. Federalism is a system of government that divides power between a political unit and a central authority. Power is spread between a minimum of two units with powers divided between the parts. ... Some examples of Federalism include the United States, Canada, and the European Union.
Ronald downloads a movie from the Internet onto his company's computer. During this process, his system gets infected with a virus. The virus spreads rapidly in the company's network causing the server to crash. This type of virus is most likely to be ________. A) spam B) adware C) phishing mail D) a worm E) a Trojan horse
Answer:
The correct answer to the following question will be Option D (a worm).
Explanation:
A PC worm seems to be a form of harmful, self-replicating software that often infects other machines while remaining onto corrupted devices.
Worms may often go overlooked before their excessive propagation cycle utilizes machine resources, stopping the encrypted file as well as slowing it down.The virus is quickly spreading inside the company's servers leading the server or computer to fail.The other three options are not related to the given scenario. So that Option D is the right answer.
Given two variables, isEmpty of type boolean, indicating whether a class roster is empty or not, and numberOfCredits of type int, containing the number of credits for a class, write an expression that evaluates to true if the class roster is not empty and the class is more than two credits.
isEmpty of type boolean, indicating whether a class roster is empty or not.
numberOfCredits of type int, containing the number of credits for a class.
The expression that evaluates to true if the class roster is not empty is :
(isEmpty == false) && (numberOfCredits == 3 || numberOfCredits == 1)
Explanation:
Two variables, isEmpty of type boolean, indicating whether a class roster is empty or not, and numberOfCredits of type int, containing the number of credits for a class.
An expression that evaluates to true if the class roster is not empty and the class is more than two credits is
(isEmpty == false) && (numberOfCredits == 3 || numberOfCredits == 1)
If isEmpty is false, then the number of credits can be either three or one.
The statement shows the expression.
CottonPlus, a sportswear company, is releasing a new casual sportswear line. The company approaches a basketball star to endorse the new line and hosts a 10-kilometer run where the star is spotted wearing the new clothes. Which element of a program plan does this scenario illustrate?
Answer: Tactics
Explanation:
According to the given question, the tactics is one of the type of element of the given program planning that helps in illustrating the given scenario as by using the various types of tactics marketing approach we can easily promote the products in the market.
The tactics is one of the legal or authorized element which deals with the new products in the market.In the given scenario, the Cotton Plus is one of the sportswear organization and the main strategy of the company is to approach the basketballs stars for promoting their latest collection.Therefore, Tactics is the correct answer.
How can you evaluate digital news sources?
Answer:
Currency: Is this a recent article? Many articles shared on social media are older articles that may relate to current events. If the article is not recent, the claims may no longer be relevant or have been proven wrong.
Relevance: Is the article relevant? While some articles may appear to be addressing a current topic, you must read past the headline and determine the relevancy of the content for your purposes.
Authority: Who is the author? Has the author written other articles on the same or similar topic? What are the author's credentials? What is the domain of the website? Many websites these days mimic the legitimate source, take the time to look carefully. Is the source a blog or a news source? Is the website satirical or a hoax?
Accuracy: Is this article from an unbiased source? Can the content be verified by multiple sources? If it appears in only one publication with no links to sources, it is very likely to be inaccurate. This is particularly important with images that are shared widely across social media.
Purpose: Does this article provoke an emotional response? The intent of a valid news sources is to inform. While an emotional response to specific information is to be expected, inaccurate news articles are often written for the sole purpose of provoking anger, outrage, fear, happiness, excitement or confirmation of ones' own beliefs.
Explanation:
This is how you evaluate digital news sources
Which of the following factors is needed by online communicators to produce the same amount of impression formation and relationship development as face-to-face communicators, especially when the online channel is primarily text-based?A) directness of messages B) increased amount of social information conveyed C) extended time D) personalization of message content
Answer:
Option C
Extended time
Explanation:
Josepth Walther proposed the social information processing theory, where he said that given sufficient time, Computer-Mediated Communication (CMC) can adapt and still develop interpersonal relationships.
Joseph emphasised the place of extended time as a crucial variable in CMC.
This is because CMC takes at least four times as long to process messages, and it also requires that messages be sent more often. It also needs the use of anticipate future interactions and chronemic cues to establish a good relationship between the two communicators.
Extended time is a key factor needed by online communicators to produce the same amount of impression formation and relationship development as face-to-face communicators
Host to IP address lookup and its reverse lookup option are very important network services for any size network. It is also how a client, such as a browser, finds an address on the Internet without having to know the IP address.Which of the following is the recommended and secure version of that service?Domain Name System Security Extensions (DNSSEC) Remote access Secure/Multipurpose Internet Mail Extensions (S/MIME)
Answer:
Domain Name System Security Extensions (DNSSEC)
Explanation:
COGNITIVE ASSESSMENT What program is used to start and shut down a computer or mobile device, provide a user interface, manage programs and memory, and provide file management, among other functions? Group of answer choices an operating system a file utility a system utility application software
Answer:
An operating system
Hope this helps! :)
What affect does the corona virus have the United States economy
Answer:
It can disturb the worldwide stock of products, making it harder for U.S. firms to take care of requests. It can likewise waylay laborers in influenced regions, diminishing work supply toward one side and on the other moderate the interest for U.S. items and administrations. The monetary interruptions brought about by the infection and the expanded vulnerability are being reflected in lower valuations and expanded instability in the money related markets. While the specific impact of the coronavirus on the U.S. economy is obscure and mysterious, obviously it presents colossal dangers. Corona will most legitimately shape monetary misfortunes through inventory chains, request, and budgetary markets, influencing business speculation, family unit utilization, and global exchange. The infection won't just influence supply, yet a few parts of the U.S. economy may likewise encounter decreases sought after—and enormous decreases in income—in light of the general consequences for the economy. More households are in debt and are not able to purchase the things they would normally purchase without a fixed budget
-Hope this helps
A program is loaded into _________ while it is being processed on the computer and when the program is not running it is stored in ______________. A. memory, secondary storage B. memory, the CPU C. the monitor, memory D. secondary storage, memory
A program is loaded into memory while it is being processed on the computer and when the program is not running it is stored in secondary storage.
What is a computer?A computer is a digital electronic appliance that may be programmed to automatically perform a series of logical or mathematical operations. Programs are generic sequences of operations that can be carried out by modern computers.
As we know,
Secondary memory is non-volatile, permanent computer memory that is not directly accessible by a computer or processor.
While a computer is processing anything, a program is loaded into memory, and when it is not in use, it is saved in secondary storage.
Thus, a program is loaded into memory while it is being processed on the computer and when the program is not running it is stored in secondary storage.
Learn more about computers here:
brainly.com/question/21080395
#SPJ2
Final answer:
The program is loaded into "memory "for processing and stored in "secondary storage" when not in use. Main memory provides fast access for active tasks, whereas secondary storage maintains data long-term.
Explanation:
A program is loaded into memory while it is being processed on the computer and when the program is not running it is stored in secondary storage. The correct answer is A: memory, secondary storage.
Main memory is used to store information that the Central Processing Unit (CPU) requires quickly. It is nearly as fast as the CPU but loses information when the computer is turned off. In contrast, secondary memory is used for long-term storage of programs and data; it retains information even after the power has been turned off. Examples of secondary memory include disk drives and USB flash drives.
Boolean operators (AND, OR, NOT) affect your search results. If you do a search in Quick SearchLinks to an external site. for books using the search phrase graffiti AND Los Angeles, you'll retrieve about 10 records for books. If you re-do that search as graffiti OR Los Angeles, you will broaden your search results (retrieve more records). Why is this so?
Answer
Search engines use operators to more heavily define your search
Explanation:
In this instance, when using the boolean AND, the engine is searching for a book that talks about BOTH graffiti and Los Angeles or Graffiti in Los Angles. When you use OR you get more results because it is searching for books that are either about graffiti OR Los Angles. When using OR the criteria is not as strict and therefore returns more results.
Describe the parliamentary meeting procedure and its purpose.
I NEED HELP PLZ?!?
Answer:
Explanation:
Parliamentary procedure is a bunch of "proven rules" that were designed to move business along during a meeting. This would all occur while maintaining order and controlling communication.
The purpose of these rules is simple; help groups accomplish tasks through the "orderly" democratic process.
Answer:
The parliamentary meeting procedure begins when a meeting is called to order. After the meeting is called to order, any past business is discussed. Afterwards, any member can raise a motion. Motions are discussed and can be voted on. Once all business has been discussed, a meeting is adjourned, or ended. The purpose of parliamentary meeting procedure is to ensure all members of the meeting are treated fairly and the meeting is efficient.
Explanation:
Right on Edge
Ophelia is entering a Get Fit! sporting goods store in a shopping mall when her heel gets caught in a heating grate at the threshold between the mall and the store. She falls, is injured, and sues the store. After the accident, Get Fit! installs signs just inside the threshold, warning customers to watch their step. A few months later, the mall installs new thresholds with the heating grates on the ceiling instead of the floor. At trial, the manager of Get Fit! testifies that he had no control over the location of the heating grates on the threshold since the threshold was owned by the mall. On rebuttal, the plaintiff wants to bring in evidence of both the sign installation and the re-design of the grate.
a. Preclude both the sign installation and the re- design of the threshold as inadmissible under Rule 407.
b. Preclude evidence about the re-design of the threshold but allow evidence of the sign installation to prove ownership and control.
c. Preclude evidence of the sign installation but allow evidence of the re-design of the threshold to prove feasibility.
d. Allow evidence of both the re-design of the threshold and the sign installation.
Answer:
The correct answer is c. Preclude evidence of the sign installation but allow evidence of the re-design of the threshold to prove feasibility.
Explanation:
It is possible that Get Fit! will carry out the installation of the signs taking into account that he was going to be sued by Ofelia. What is shown in the statement is that this company anticipated the facts, and for this reason, at the time of the trial, it has adequate signage that may affect the judge's verdict. For this reason, Ofelia is left with no choice but to make a rebuttal based on reliable evidence that the sign was not found when she fell on the heating grid, for which she must attach photographic records or collect testimonies from people who were in that place when the accident happened.
Final answer:
Evidence regarding the sign installation may be permitted to suggest Get Fit! had b. control over the area of Ophelia's fall, while evidence of the threshold re-design is likely to be precluded under Rule 407 as a subsequent remedial measure.
Explanation:
The correct answer to the question of what evidence should be precluded or allowed in Ophelia's lawsuit against Get Fit! is the preclude evidence about the re-design of the threshold but allow evidence of the sign installation to prove ownership and control. Under Rule 407 of the Federal Rules of Evidence, subsequent remedial measures are generally not admissible to prove negligence, culpable conduct, or a need for a warning.
However, they can be allowed to prove ownership, control, or feasibility of precautionary measures, if contested. The sign installation could potentially show Get Fit!'s acknowledgment of an issue and suggest control over the area where the injury occurred, while the re-design of the threshold by the mall is a subsequent measure taken to improve safety, not an admission of liability.
Middleware is software used to: a. connect processes running on different computer systems across a network. b. integrate a computer's operating system and its applications. c. connect a computer system to the network. d. support agile process redesign. e. provide best business practices to ERP systems.
Answer:
a. connect ----------- a network.
Explanation:
Middleware sits in between the front end and the back end. The back end can be like a database residing on the server, which can be on the cloud or at any computer systems across the network, however, it is always on the server, and the front end or the client request is on the user's computer. Hence, it connects the processes running on different computer systems across the network. Hence, Option A is correct.
So it does not connect a computer system to a network, and nor does it provide the best business practices to ERP Systems, and it does not integrate the computer's operating system and its applications as well. The last one is application software like a word processor.
The DHCP server is configured with the address lease duration set at 5 days. An employee returns to the office after an absence of one week. When the employee boots the workstation, it sends a message to obtain an IP address. Which Layer 2 and Layer 3 destination addresses will the message contain
Answer:
both MAC and IPv4 addresses of the DHCP server
FF-FF-FF-FF-FF-FF and IPv4 address of the DHCP server
FF-FF-FF-FF-FF-FF and 255.255.255.255
MAC address of the DHCP server and 255.255.255.255
Explanation:
When the lease of a dynamically assigned IPv4 address has expired, a workstation will send a DHCPDISCOVER message to start the process of obtaining a valid IP address. Because the workstation does not know the addresses of DHCP servers, it sends the message via broadcast, with destination addresses of FF-FF-FF-FF-FF-FF and 255.255.255.255.
Answer:
FF-FF-FF-FF-FF-FF and 255.255.255.255
Explanation:
At the expiration of the assigned IPV4 address, the work station will send a DHCPDISCOVER message so as to initiate the process of getting an authentic IP address. This is because the workstation cannot identify the DHCP serves address.
The second layer address broadcast FF-FF-FF-FF-FF-FF is adopted on the ethernet frame and is assumed to be broadcasted on all equipment.
255.255.255.255 is the 3rd layer address used to label the exact same host.
Database designers typically do not add spaces in field names (LName), but can add details in the ________ field of the field properties to provide additional context to the field that is not displayed (Last Name).
A) captionB) detailsC) formatD) index
Answer:
Option A Caption
Explanation:
Caption is a direct and short description about the field that provide more contextual info about the field. For example, if a target field is expected to store a last name value, we can just put the string "Last Name" in the caption field to offer a more descriptive info about the field. This is a useful feature to enable database designer to stick with the naming convention of the database field names and on another hand does't compromise the descriptive level of each field.
Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates that value with total. Thus your code should associate 1*1 2*2 3*3 ... 49*49 50*50 with total. Use no variables other than k and total.
Answer:
total=0
def calcsumnumsquare(k,total):
while k>=1:
total+=int(k)*int(k)
k-=1
return total
print(calcsumnumsquare(4,0))
Explanation:
The program required is written above. It uses only two variables k and total as mentioned in the question. And the total is initially set to 9, and then its value is incremented by the square of each k during each loop established by while loop. And finally, when k=1, the output is returned. And we have printed the return value using print.
Which sort algorithm starts with an initial sequence of size 1, which is assumed to be sorted, and increases the size of the sorted sequence in the array in each iteration? insertion sort selection sort merge sort quicksort
Answer:
The correct answer is "Insertion Sort".
Explanation:
Insertion sort seems to be a specific sorting or ordering algorithm which creates one element at the same time, the ultimate sorted list. This sorting sophistication seems to be O(n) for the best scenario and O(n2) for the worst category.
Sort of insertion throughout java has always been a decent option for limited array sizes and even when you recognize the elements or items are mostly ordered.Kind of insertion requires a nested loop like upper as well as lower loop.