IN C++ PLEASE!!!! Define a function FilterStr() that takes a string parameter and returns "Good" if the character at index 4 in the string parameter is uppercase. Otherwise, the function returns "Bad".

Ex: FilterStr("sandwich") returns

Bad

Recall isupper() checks if the character passed is uppercase. Ex: isupper('A') returns a non-zero value. isupper('a') returns 0.

string's at() returns a character at the specified position in the string. Ex: myString.at(3)
)
#include
#include
#include
using namespace std;

/* Your code goes here */

int main() {
string input;
string output;

getline(cin, input);
output = FilterStr(input);
cout << output << endl;

return 0;
}

Answers

Answer 1

Answer:

Replace /*Your code goes here */ with

string FilterStr(string str){

   string retStr= "BAD";

   if(isupper(str.at(4)) != 0){

     retStr = "GOOD";

   }

   return retStr;

}

Explanation:

This defines the function

string FilterStr(string str){

This initializes the return string to BAD

   string retStr= "BAD";

This checks if the string at index 4 is uppercase;

   if(isupper(str.at(4)) != 0){

If yes the return string is updated to GOOD

     retStr = "GOOD";

   }

This returns the return string

   return retStr;

}

See attachment for complete program


Related Questions

True or False? Using your traffic analytics report, you can see the source of traffic to your website

Answers

Answer:

True

Explanation:

Because the bastion host stands as a sole defender on the network perimeter, it is commonly referred to as the __________ host.

Answers

The good answer is: Sacrificial

which one of the following is not hardware​

Answers

Firewall is not hardware. It is only software.

Answer:

There r no options

Explanation:

I think the application r not the hardware.

The DuPage Freight Shipping Company charges the following rates: Weight of Package Rate per Pound 2 pounds or less $1.10 Over 2 pounds, but not more than 6 pounds $2.20 Over 6 pounds, but not more than 10 pounds $3.70 Over 10 pounds $3.80 Design a program that does the following: asks the user to enter the weight of a package and displays the shipping charges. 1. Prompt the user for the weight of a package 2. Determines the rate per pound in a getRate module 3. Calculates and displays the total shipping charge in a getTotal module Hint - you may want to use a global variable for this! Please submit three things:

Answers

Answer:

The program in Python is as follows:

def getRate(weight):

   if weight<=2.0:

       rate = 1.10

   elif weight>2 and weight<=6:

       rate = 2.20

   elif weight>6 and weight<=10:

       rate = 3.70

   else:

       rate = 3.80

   return rate

def getTotal(weight,rate):

   total = weight * rate

   print("Total: ",total)

weight = float(input("Weight: "))

rate = getRate(weight)

getTotal(weight,rate)

Explanation:

This defines the getRate function

def getRate(weight):

The following if conditions determine the corresponding rate based on the value of weight passed to the function

   if weight<=2.0:

       rate = 1.10

   elif weight>2 and weight<=6:

       rate = 2.20

   elif weight>6 and weight<=10:

       rate = 3.70

   else:

       rate = 3.80

This returns the rate back to the main method

   return rate

The getTotal module begins here

def getTotal(weight,rate):

This calculates the total charges

   total = weight * rate

This prints the calculated total

   print("Total: ",total)

The main begins here

This gets input for weight

weight = float(input("Weight: "))

This gets the rate from the getRate function

rate = getRate(weight)

This passes values to the getTotal function

getTotal(weight,rate)

In the context of computer and network security, _____ means that a system must not allow the disclosing of information by anyone who is not authorized to access it.

Answers

Answer:

Confidentiality

Explanation:

Cyber security can be defined as a preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

In Cybersecurity, there are certain security standards, frameworks, antivirus utility, and best practices that must be adopted to ensure there's a formidable wall to prevent data corruption by malwares or viruses, protect data and any unauthorized access or usage of the system network.

In the context of computer and network security, confidentiality simply means that a computer system used for performing certain functions such as exchange of data must not allow the disclosing of information to and by anyone who is not authorized to access it.

Confidentiality refers to the act of sharing an information that is expected to be kept secret, especially between the parties involved. Thus, a confidential information is a secret information that mustn't be shared with the general public.

In conclusion, confidentiality requires that access to collected data be limited only to authorized staffs or persons.

What penetration testing tool combines known scanning and exploit techniques to explore potentially new attack routes

Answers

Answer:

metasploit.

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

Metasploit is a penetration testing tool that combines known scanning and exploit techniques to explore potentially new attack routes. It's officially and formally licensed to Rapid7, a company based in Boston, Massachusetts.

Basically, metasploit is a framework that's mainly focused on availing end users such as ethical hackers, with information about security vulnerabilities in a system, development of intrusion detection system (IDS) signature and modular penetration testing.

One property of light that makes it possible to record the image of an object with the camera

Answers

Answer:

Reflection

Explanation:

Reflection is the property of light in which when a ray of light hits a smooth surface, it bounces back in the direction in which it came from. If i is the angle between the normal to the surface and the incident ray, and r is the angle between the normal and reflected ray, the law of reflection states that the angle of incidence equals the angle of reflection. That is, i = r.

So, to record the image of an object with a camera, one property of light that makes that possible is reflection because, the incidence rays form an image of the object in the camera, while the reflected rays reflect the image so that it is visible to the eye.

state the use of an x-ray machine​

Answers

Answer:

The use of an x-ray machine is used to take pictures of dense tissues such as teeth or bones. This is because bones absorb the radiation more than the less dense soft tissue. X-rays from a source pass through the body and onto a photographic cassette.

I hope this helps you!

Explanation:

plz help me to do 4 number

Answers

Answer:

A is an abbaccus.  B is Blaze Pascal.  C is The Jacquard Loom.  D is Charles Babbage.  E is The Manchester Baby.

Explanation:

Which type of infrastructure service stores and manages corporate data and provides capabilities for analyzing the data

Answers

Answer:

Data management.

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to effectively and efficiently create, store, modify, retrieve, centralize and manage data or informations in a database. Thus, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Generally, a database management system (DBMS) acts as an intermediary between the physical data files stored on a computer system and any software application or program.

Hence, a database management system (DBMS) is a software that enables an organization or business firm to centralize data, manage the data efficiently while providing authorized users a significant level of access to the stored data.

In conclusion, data management is a type of infrastructure service that avails businesses (companies) the ability to store and manage corporate data while providing capabilities for analyzing these data.

Write a python application that allows a user to enter any number of student test scores until the user enters 999. If the score entered is less than 0 or more than 100, display an appropriate message and do not use the score. After all the scores have been entered, display the number of scores entered and the arithmetic average.

Answers

Answer:

This program is as follows

total = 0; count = 0

testscore = int(input("Score: "))

while testscore != 999:

   if testscore < 0 or testscore > 100:

       print("Out of range")

   else:

       total+=testscore

       count+=1

   testscore= int(input("Score: "))

print(count,"scores entered")

print("Arithmetic Average:",total/count)

Explanation:

This initializes total and count to 0

total = 0; count = 0

This gets input for score

testscore = int(input("Score: "))

The following iteration stop when 999 is entered

while testscore != 999:

This prints out of range for scores outside 0 - 100

   if testscore < 0 or testscore > 100:

       print("Out of range")

Otherwise

   else:

The total score is calculated

       total+=testscore

The number of score is calculated

       count+=1

Get another input

   testscore = int(input("Score: "))

The number of score is printed

print(count,"scores entered")

The average of score is printed

print("Arithmetic Average:",total/count)

What temperature is most commonly used in autoclaves to sterilize growth media and other devices prior to experimentation

Answers

Answer:

The most effective temparature used in autoclave is 121°C

What type of display allows the user to access a large amount of vocabulary in one device, uses spelling to convey the message, is changeable by the user, depicts language in electronic form, uses context-based pages, and uses conversational pages

Answers

Answer:

Dynamic

Explanation:

As defined by Walter Woltos, DYNAMIC DISPLAY is a type of display that allows the user to access a large amount of vocabulary in one device, uses spelling to convey the message, is changeable by the user, depicts language in electronic form, uses context-based pages, and uses conversational pages.

For example, a dynamic display includes smartphones, laptops, etc. This is the opposite of Static display.

A computer is assigned an IP address of 169.254.33.16. What can be said about the computer, based on the assigned address?

Answers

Group of answer choices.

A. It can communicate with networks inside a particular company with subnets.

B. It can communicate on the local network as well as on the Internet.

C. It has a public IP address that has been translated to a private IP address.

D. It cannot communicate outside its own network.

Answer:

D. It cannot communicate outside its own network.

Explanation:

Dynamic Host Configuration Protocol (DHCP) is a standard protocol that assigns IP address to users automatically from the DHCP server.

Basically, a DHCP server is designed to automatically assign internet protocol (IP) address to network devices connected to its network using a preconfigured DHCP pool and port number 67.

When a computer that is configured with DHCP cannot communicate or obtain an IP address from the DHCP server, the Windows operating system (OS) of the computer automatically assigns an IP address of 169.254.33.16, which typically limits the computer to only communicate within its network.

Generally, a computer cannot communicate outside its own network when it is assigned an IP address of 169.254.33.16.

en que consiste excel

Answers

Answer:

Microsoft Excel es un programa para calcular y simplificar las tareas de administración de datos que forma parte del paquete Microsoft Office de Microsoft Corporation. Microsoft Excel tiene funciones básicas que se pueden usar para trabajar con hojas de cálculo, usando una cuadrícula que consta de celdas. Las funciones también están disponibles para mostrar gráficos y datos visuales similares.

The process where the programmer steps through each of the program's statements one by one is called

Answers

The process where the programmer steps through each of the program's statements one by one is called [tex]\sf\purple{hand \:tracing}[/tex].

[tex]\bold{ \green{ \star{ \orange{Mystique35}}}}⋆[/tex]

In contrast to data in a database, data in a data warehouse is described as subject oriented, which means that it _____.

Answers

Answer:

focuses on a certain subject

Explanation:

it means that it focuses on that one subject and none others

Hope it helps c:

Determine whether the phrase below is a sentence or a fragment.

While we were in Greece, we ate a lot of feta cheese.
a.
Sentence
b.
Fragment

Answers

sentence.


i believe it is sentence

John wants to assign a value to the favorite sport variable:

favoriteSport = indoor soccer

However, he gets an error message. What does he need to change in order to make the code work?


Add a space between the words in the variable name

Create a longer variable name

Put quotation marks around the string literal

Omit the symbol in the string

Answers

Put quotation marks around the string literal

Jon wants to assign a value to the favorite sport variable: favoriteSport! = "indoor soccer" but gets an error message by Removing the exclamation mark from the variable name it will fix for the code to work.

In laptop programming, code refers back to the set of instructions, or a machine of rules, written in a selected programming language (i.e., the supply code).

If you've got ever observed an exclamation mark (!) earlier than the variable in a person's JavaScript code the negation operator (!) definitely simply reverses the means of its operand. ! is the logical now no longer operator in javascript.

Learn more about the javascript here:

brainly.com/question/27683041

#SPJ3

If you set the Decimal Places property to 0 for a Price field, and then enter 750.25 in the field, what does Access display in the datasheet

Answers

Answer:

The answer is "750".

Explanation:

Throughout this question the even though it used to provides the precise decimal which is used as the representation or rounding requirement in software such as billing, it also used to represents only the 750, demonstrating the nearest rounding of the given technique, that's why the solution is 750.

which one will be the correct answer​
pls tell

Answers

Answer:

option c clean boot. it is correct.

Option c, clean boots is the correct answer

The logical structure in which one instruction occurs after another with no branching is a ____________.

Answers

Answer:

sequence

Explanation:

The logical structure in which one instruction occurs after another with no branching is a sequence.

Write a letter of application to your school as a chemistry teacher​

Answers

Answer:

Dear Mr./Mrs (Employer's name), I am writing this in response to the ad, which you have listed in the newspaper (mention the name here) for the post of a chemistry teacher. I believe my extensive knowledge and writing skills make me an excellent candidate for the post.

define computer network

Answers

Computer network is a group of computers that use a set of common communication protocols over digital interconnections for the purpose of sharing resources located on or provided by the network nodes.

50 POINTS! PLEASE HELP!
________ is a VMware Network setting that does not put the virtual machine directly on the physical network of the computer.


Host Only

MAT

NAT

VNAT

Answers

Answer:

NAT

Explanation:

The Network Address Translation (NAT) is a Virtual Machine Software which allows organizations to make use of a single Internet Protocol by altering the private network addresses to a private one. It makes it possible to Map multiple network addresses to a public address thereby providing security. The NAT VMware allows a single device such as a router provide an information transfer interface between a private and public network. Hence, it does not use the physical network of the computer.

Answer:

NAT

Explanation:

I took the test :D Hope this helps!

i am doing 7th grade coding 3.02 assignment can anybody help me it says bad input on line 3 and this is what it is can someone help me
grade = int(input("What grade are you in?"))

Answers

Answer:

grade = int(input("What grade are you in?")

if grade == 9:

print ("Freshman")

elif grade == 10:

print ("Sophomore")

elif grade == 11:

print ("Junior")

elif grade == 12:

print ("Senior")

else:

print ("Invalid")

Explanation:

You fail to provide the complete code. So, I will rewrite the code from scratch

The complete question requires that the level is printed based on the input grade.

The code has been added in the answer section.

The explanation is as follows:

[Thus gets input for grade]

grade = int(input("What grade are you in?")

[If grade is 9, this prints Freshman]

if grade == 9:

print ("Freshman")

[If grade is 10, then level is sophomore]

elif grade == 10:

print ("Sophomore")

[If grade is 11, then grade is Junior]

elif grade == 11:

print ("Junior")

[If grade is 12, then level is senior]

elif grade == 12:

print ("Senior")

[All other inputs are invalid]

else:

print ("Invalid")

What is the ghosted text or picture behind the content on the page?​

Answers

Answer:

Watermark

Explanation:

This is actually called a Watermark. It is usually used as a way of showing the name or logo of the author who owns the content that is underneath the watermark. This is done so that individuals cannot steal the owner's work and use it as their own. Usually, the owner has the original version of the content without any watermark, as well as individuals that have purchased the content or a licence to use the content for personal or commercial usage.

computer can do work very___​

Answers

Answer:

Explanation:

quickly      

Answer:

fast......................

Technology is used today in manufacturing, health care, and the transportation industry, but education has not yet embraced
it.
True
Оr
False

Answers

Answer:

False

Explanation:

Digital learning tools are nowadays used In Education. Countries like Japan, China, India and Korea use computers and internet in their educational system.

Hope it helps!

Draw a flow chart except the principle, time and date from the user. and display the simple interest and amount as output.​

Answers

Answer:

See attachment for flowchart

Explanation:

The explanation is as follows

1. Start

2. Get input for principal, time and rate

3. Calculate Interest using Interest = Principal * Rate * Time/100

4. Print Interest

5. Stop

Other Questions
What erythrocyte production disorder results from an autoimmune disease associated with insufficient vitamin B12 absorption (step 6) someone help me please with this algebra problem Lucian was hiking through a field directly toward his car, which was parked on a long, straight road perpendicular to his path, when he came to a swamp. He turned 55 degrees to the right and hiked 3 miles in that direction to reach the road. How far did he need to walk down the road to reach his car? (Please include a labeled diagram so step by step solution is easy to follow). x = 4y + 3, 2x + y = -3System of Equations what are the types of cheque Which piece of equipment would be BEST to measure 5 mL of a liquid? A 50 mL beaker filled half way between 0 and 10 mL markings A 50 mL Erlenmeyer flask filled half way between 0 and 10 ml markings A 10 mL graduated cylinder A disposable dropper A 100 mL graduated cylinder If there is a greater quantity supplied than the quantity demaded ( an excess supply of a good or service) you are most likely dealing with:_______.A- price ceiling set below the equilibrium priceB- price floor set above equilibrium price I am buying a firm with an expected perpetual cash flow of $1,000 but am unsure of its risk. If I think the beta of the firm is 0, when the beta is really 1, how much more will I offer for the firm than it is truly worth? Assume the risk-free rate is 4% and the expected rate of return on the market is 10%. (Input the amount as a positive value.) one particular ice cream parlor has 28 different flavors available. How many ice cream cups are possible if you order 4 scoops? this is a combination Travelling becoming much faster change into future perfect tense Q. Which one of the following properties does NOT give the water the ability to become a suitable medium for chemical reactions? a. Helps the ionization of salts b. It is considered a good solvent for salts C. Gives off the heat produced from the chemical reactions d. It has a specific heat capacity. It is said that a smile is universally understood. And nothing triggers a smile more universally than a taste of sugar. Nearly everyone loves sugar. Infant studies indicate that humans are born with an innate love of sweets. Based on statistics, a lot of people in Great Britain must be smiling because on average, every man, woman, and child in that country consumes 95 pounds of sugar each year.From this passage it seems safe to conclude that the EnglishA. do not know that too much sugar is unhealthy.B. eat desserts at every meal.C. are fonder of sweets than most people.D. have more cavities than any other people. AD = 6, DC = 8, find DB A regression analysis between sales (in $1000s) and price (in dollars) resulted in the following equation: = 50,000 8x The above equation implies that an increase of _____. a. $8 in price is associated with an increase of $8,000 in sales b. $1 in price is associated with a decrease of $8,000 in sales c. $1 in price is associated with a decrease of $42,000 in sales d. $1 in price is associated with a decrease of $8 in sales The conversion rate would be the highest for keyword searches classified as Group of answer choices buyers grazers researchers browsers Does the expression represents a positive or negative 3(-2 1/3) Which technique of creating emphasis is in primary use in this painting?A. scaleB. closure C. movement D. perspective Crossword Help me!AN OVERDONE TAN_ _ N _ _ _N Arlene is a clothing store manager and she set the price for a pair of jeans at $40 and is selling 120 pairs each week. She estimates that if she changes the price by x dollars, where x can be positive or negative. she will sell 120 - 3x pairs of jeans a week, for a total of (40 + x)(120 - 5x) dollars in sales. According to her estimate, what will result in the greatest value of sales? A) Decreasing the price by $2.50 B) Decreasing the price by 51.50 C) Leaving the price unchanged. D) Increasing the price by $2.00. Which statement best expresses the theme of "Wherefore Art Thou Romeo?"A friend's genuine help can actually cause one pain.One must get along with everyone in order to succeed. Sometimes, one's weakness can become one's strength. In order to succeed, one must have an enemy to focus on.