AddAll - Adds all the doubles in the string with each other. Note every double is separated by a semi-colon. AddAll("1.245;2.9")=>4.145 double AddAll(const char* str) struct Sale char Person[100]; double sale; double tax; struct SaleStatistic double average Sale; double totalSale; double totalTax; (4) AddAl - Adds all the doubles in the string with semi-colon. AddAll("1.245;2.9")=>4.145 double AddAll(const char* str) { ww struct Sale { char Person[100]; double sale; double tax; }; struct SaleStatistic -- double average Sale: double totalSale: double totalTax:

Answers

Answer 1

Answer: provided below

Explanation:

The code is provided below/

// the method to add all double value in the string

double AddAll(const char *str)

{

double total = 0;

vector<string> vec;

 

stringstream strStream(str);

 

while (strStream.good())

{

string substr;

getline(strStream, substr, ';');

vec.push_back(substr);

}

 

for (size_t i = 0; i < vec.size(); i++)

{

total = total + stod(vec[i]);

}

return total;

}

 

Program code with addition of the above for testing is provided thus

#include <iostream>

#include <sstream>

#include <vector>

using namespace std;

//addin all double value in syring

double AddAll(const char *str)

{

double total = 0;

vector<string> vec;

 

stringstream strStream(str);

 

while (strStream.good())

{

string substr;

getline(strStream, substr, ';');

vec.push_back(substr);

}

 

for (size_t i = 0; i < vec.size(); i++)

{

total = total + stod(vec[i]);

}

return total;

}

int main()

{

//method calling and display result

cout<<AddAll("1.245;2.9");

}

This gives output as:

4.145


Related Questions

Suppose your network support company employs 75 technicians who travel constantly and work at customer sites. Your task is to design an information system that provides technical data and information to the field team. What types of output and information delivery would you suggest for the system?

Answers

Answer:

Proceso mediante el cual el SI toma los datos que requiere para procesar la información. Las entradas pueden ser manuales o automáticas. Las unidades típicas ...

Explanation:

Lidia is assigning her first name as the value to a variable. Which is the correct format to use? firstName = "Lidia" First Name = "Lidia" firstName! = "Lidia" firstName = Lidia

Answers

Answer:

firstName = "Lidia"

Explanation:

firstName = "Lidia"

Answer:

firstName = "Lidia"

Explanation:

you declare a variable by

variableName = value

her name is of data type string, so it should be enclosed in " "

Image-editing software is used to_____

Answers

Edit images.

(have to spam so i ahve enough words)

apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple apple

What is part of the computer?
Hardware
Software
CPU
All of these

Answers

Answer:

All of these are the parts of computer

Answer:

yes your answer is correct all those are the parts of the computer

hope it is helpful to you

Juan is interested in getting a job in the technological field. He is interested in protecting data from threats, and stopping hackers and viruses. Which job would should Juan apply for?

Answers

This question is incomplete because the options are missing; here is the missing section:

Which job would should Juan apply for?

A. Research and software development

B. Technical support

C. Training and support

D. Information security

The correct answer is D. Information security

Explanation:

In technology, information security is the area that deals with the protection of information or data in computers and other technological devices. This includes creating strategies, programs or protocols to stop unauthorized access to data, which can occur due to the action malicious programs such as viruses or due to hackers (experts in technology who use their knowledge to access illegally to data). In this context, Juan would need to apply to an information security job because this is part of the technology field and in this, he would need to protect data, which is exactly what he wants.

Density-based spatial clustering of applications with noise is a simple and effective density-based clustering algorithm that illustrates a number of important concepts that are important for any density-based clustering approach. True False

Answers

it is correct its TRUE

Multisensory input/output devices, such as data gloves or jumpsuits, are commonly used with _______________ systems.

Answers

Answer:

virtual reality

Explanation:

Virtual reality is basically a simulated or virtual environment. This environment is implemented by compute technology for the users that can interact with the virtual 3 dimensional objects instead of just watching them on the screen. With the use of multi-sensory input and output devices the senses of the user are simulated.

Virtual reality devices are the products used for interacting with a virtual environment for the users. Some of the multisensory input/output devices include:

data gloves

jumpsuits

track pads

joysticks

treadmills

multi-speaker audio

visual displays

controller wands

head set

For example a data glove enables the users to interact with virtual objects and feel the object rather than just a movement of hand in the air and it is also used in virtual gaming. Jumpsuits are also used to feel sensations in the virtual reality environment. It stimulates different body parts in response to any action taken by user in a virtual environment.

Answer:

virtual reality

Explanation:

yeah this is correct

Different network scenarios require the use of different tools. The tools you may consider should EXCLUDE:_________

Answers

Complete Question:

Different network scenarios require the use of different tools. The tools you may consider should EXCLUDE:

a. Port scanner

b. Banner grabbing tools

c. Vulnerability scanner

d. Honeypots

e. Protocol analyzer

f. Viruses

g. Honeynets

Answer:

f. Viruses

Explanation:

Different network scenarios require the use of different tools. The tools you may consider should include:

a. Port scanner: this is a program used by network administrators to scan various application, transport, internet and network ports which may be exploited by hackers or attackers when found vulnerable.

b. Banner grabbing tools: it is used to gather informations of a computer residing on a network and various services running on its open ports using telnet, zmap, netcat and nmap.

c. Vulnerability scanner: used for the detection of vulnerabilities in a network or systems.  

d. Honeypots: it is used to detect and redirect or prevent any unauthorized use of information of a network by mimicking the potential target systems.

e. Protocol analyzer: it is used to analyze traffic and packet captures in a network. Software programs such as wireshark, tshark can be used for protocol analysis.

f. Honeynets: is a combination of one or more honeypots used for attracting and trapping potential attackers.

However, a virus is a malicious program that can replicate and cause severe damage to a computer system.

What type of job involves working at client locations and the ability to work with little direct supervision?

a. field-based

b. project-based

c. office-based

d. home-based

Answers

Answer:

A

Explanation:

4.17 LAB: Data File A comma separated value (.csv) file has been included to be used for this program. Each line contains two values, a name and a number separated by a comma (except the first line, which contains the titles for the value types). The name is that of a writer and the number refers to the number of works the writer has written. Ex. Jane Austen,6. Each line is an entry and each entry number can be updated by identifying the associated name. Once complete, the following program opens data file allWorks.csv and asks if the user wants to update entries or add new entries. All entries are stored in an array while being read in and updated. The program then writes the array to the file, overwriting the original contents. The following TODO sections must be completed. Open allWorks.csv for reading/input. Locate an entry to be updated by name (use the Java String indexOf() method) Add a new entry if the name isn't found in the file (give the entry a new number) Open file allWorks.csv for output Write contents of the array to allWorks.csv (original file is overwritten)

Answers

Answer:

import csv

def Csvreader(filename):

   with open("filename", "r") as file:

   content = file.csv_reader()

   list_content = list(content)

   file.close

   return list_content

Explanation:

This is a python description of the function that reads the csv file and converts it to a list, from the list, each item can accessed with its index and updated directly. Use this to draw the same conclusion for a java program.

Give a tight bound on the number of times the z = z + 1 statement is executed. i = 2 while ( i > 1 ) { i = floor(i/2) z = z + 1 }

Answers

Answer:

zero ( 0) times.

Explanation:

In the code;

i = 2

while ( i > 2){

     i = floor( i/2 );

     z = z + 1;

}

the variable " i " is assigned the integer " 2 ", then the while statement loops with a condition of a greater " i " value and divides the value by two for every loop.

But in this case, the while statement is not executed as the value of " i " which is 2 is not greater than but equal to two.

In a six-story building, which floor would be the best option for the data center?

Answers

Answer:

243

Explanation:

Design a class named Person with fields for holding a person’s name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class’s fields. Next, design a class named Customer, which extends the Person class. The Customer class should have a field for a customer number and a boolean field indicating whether the customer wishes to be on a mailing list. Write one or more constructors and the appropriate mutator and accessor methods for the class’s fields. Demonstrate an object of the Customer class in a simple program.

Answers

Answer:

Here is the Person class:

class Person {  //class name

//below are the private data members/fields of Person class

   private String name;   //to hold name

   private String address;  //to hold address

   private String phoneNo;   // contains telephone number

   public Person(String name, String address, String phoneNo){  //constructor of Person class with name, address and phoneNo as parameters

       this.name = name;  

       this.address = address;

       this.phoneNo = phoneNo;     }  

   public String getName(){  //accessor method to get/access the name

       return this.name;     }   //returns the name

   public String getAddress(){  //accessor method to get/access the address

       return this.address;     }  //returns the address

   public String getPhoneNo(){ //accessor method to get/access the phone number

       return this.phoneNo;  } //returns the telephone number    

//mutator methods

   public void setName(String nam){  //mutator method to set the name

       this.name = nam;     }  

   public void setAddress(String addr){  //mutator method to set the address

       this.address = addr;     }  

   public void setPhoneNo(String phNo){   //mutator method to set the telephone number

       this.phoneNo = phNo;      } }

Here is the Customer class which extends the Person class:

class Customer extends Person{  //Customer class that is sub class of Person class

//below are the private data members/fields of Customer class

   private String CustomerNo;  //String type field to hold customer number

   private boolean MailingList;   //boolean field indicating whether the customer wishes to be on a mailing list

   public Customer(String name, String address, String phoneNo, String custNum, boolean mail) {  //constructor of Customer class that has parameters name, address and phoneNo (of Person class) and parameters custNum and mail ( of Customer class)

       super(name, address, phoneNo);  //  super keyword is used to refer to Person objects and to access the Person class constructor

       this.CustomerNo = custNum;  

       this.MailingList = mail;     }  

//accessor methods

   public String getCustomerNo(){  //accessor method to get/access the customer number

       return this.CustomerNo;     }  

   public boolean getMailingList(){ //accessor method to get/access the boolean mailing list to check whether a person wants to be on mailing list

       return this.MailingList;     }

//mutator methods

   public void setCustomerNo(String custNo){ //mutator method to set the customer number

       this.CustomerNo = custNo;     }  

   public void setMailingList(boolean mailing){ //mutator method to set the mailing list  

       this.MailingList = mailing;     } }

       

Explanation:

Here is the demonstration class to demonstrate object of Customer class, calls Person and Customer class methods to display the Customer information  such as name, address, phone number, customer number and if customer wants to receive mail.

import java.util.Scanner;   //used to take input from user

class Demonstration{   //test class

   public static void main(String args[]){   //start of main() function

Scanner input= new Scanner(System.in);   //creates object of Scanner class

       System.out.print("Enter Customer Name: ");  //prompts user to enter name

       String fname = input.nextLine();

       System.out.print("Enter Customer Address: ");  //prompts user to enter address

       String address = input.nextLine();

       System.out.print("Enter Customer Telephone Number: "); //prompts user to enter telephone number

       String phoneNumber = input.nextLine();

       System.out.print("Enter Customer Number: "); //prompts user to enter customer number

       String customerNum = input.nextLine();

       System.out.print("Does Customer wish to be on a mailing list? \nPress 1 for yes, 0 for no: "); //asks user if he wishes to receive mail

       String choice = input.nextLine();  

       boolean mailList = (choice.equals("1"));   //if user enters 1 indicating that he wishes to be on mailing list

       Customer customer = new Customer(fname, address, phoneNumber, customerNum, mailList);   //creates object of Customer class and calls Customer class constructor

       System.out.println("\nCustomer Information: ");

       System.out.println("Name: "+customer.getName());  //calls getName method of Person class using customer object to get the name and displays the name

       System.out.println("Address: "+customer.getAddress()); //calls getAddress method of Person class using customer object to get the name and prints the address

       System.out.println("Telephone Number: "+customer.getPhoneNo()); //calls getPhoneNo method of Person class using customer object to get the telephone number and prints phone number

       System.out.println("Customer Number: "+customer.getCustomerNo());   //calls getCustomerNo method of Customer class using customer object to get the customer number and prints the customer number

       System.out.println("Mailing List?: "+customer.getMailingList());     }} //calls getMailingList method of Customer class using customer object to get the mailing list and prints true of false on the basis of customers choice to be on mailing list.

"The ______ of an operational system that supports an organization includes policies, requirements, and conditional statements that govern how the system works."

Answers

Answer:

Decision logic.

Explanation:

The decision logic of an operational system that supports an organization includes policies, requirements, and conditional statements that govern how the system works.

Generally, the decision logic of an operational system comprises of systems which includes pricing, order processing, customer relationship management (CRM) and inventory control. In order to modify the decision logic of information systems, continuous interactions between information technology (IT) analysts and the clients of these businesses are created.

Additionally, operational decision logic are typically visible, can be measured, managed and can easily be shared across processes within an organization through the use of a business rule management system (BRMS).

Which is the ideal amount of time to set for viewers to take in a slide with just one photo and a short caption?
A. 1-2 seconds
B. 10-15 seconds
C. 5-10 seconds

Answers

a. cuz its just one photo and a lil caption

#We've started a recursive function below called #measure_string that should take in one string parameter, #myStr, and returns its length. However, you may not use #Python's built-in len function. # #Finish our code. We are missing the base case and the #recursive call. # #HINT: Often when we have recursion involving strings, we #want to break down the string to be in its simplest form. #Think about how you could splice a string little by little. #Then think about what your base case might be - what is #the most basic, minimal string you can have in python? # #Hint 2: How can you establish the base case has been #reached without the len() function? #You may not use the built-in 'len()' function.

Answers

Answer:

Here is the Python program:  

def measure_string(myStr): #function that takes a string as parameter  

 if myStr == '': #if the string is empty (base case)  

      return 0  #return 0  

  else: #if string is not empty  

      return 1 + measure_string(myStr[0:-1]) #calls function recursively to find the length of the string (recursive case)  

#in order to check the working of the above function the following statement is used    

print(measure_string("13 characters")) #calls function and passes the string to it and print the output on the screen      

Explanation:

The function works as following:  

Suppose the string is 13 characters  

myStr = "13 characters"  

if myStr == '': this is the base case and this does not evaluate to true because myStr is not empty. This is basically the alternate of  

if len(myStr) == 0: but we are not supposed to use len function here so we use if myStr == '' instead.  

So the program control moves to the else part  

return 1 + measure_string(myStr[0:-1])  this statement is a recursive call to the function measure_string.  

myStr[0:-1] in the statement is a slice list that starts from the first character of the myStr string (at 0 index) to the last character of the string (-1 index)  

This statement can also be written as:  

return 1 + measure_string(myStr[1:])

or  

return 1 + measure_string(myStr[:-1])  This statement start from 1st character and ends at last character  

This statement keeps calling measure_string until the myStr is empty. The method gets each character using a slice and maintains a count by adding 1 each time this statement is returned.The function breaks string into its first character [0:] and all the rest characters [:-1]. and recursively counts the number of character occurrences and add 1. So there are 13 characters in the example string. So the output is:  

13

write a pseudocode thats accept and then find out whether the number is divisible by 5 ​

Answers

Answer:

input number  

calculate modulus of the number and 5  

compare outcome to 0  

if 0 then output "divisible by 5"  

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Write a method to calculate and return the average score based on the data.

Answers

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

float Avg(float sum, int n)//defining method Avg that accepts float parameter

{

float average=sum/n;//defining float variable average that holds average value  

return average;//return average

}

int main()//defining main method

{

float ar[ ] = {24.1,24.5,24.4,23.8,28.2,29.1,27.4};//defining float array

float sum;//defining float variable sum

int n=7,i;//defining integer variable  

for (i = 0; i <n; i++)//defining loop to count total of array

{

sum=sum+ar[i];//add value in sum variable

}

cout<<"The average is: "<<Avg(sum,n);//use print method to call and print method return value

return 0;

}

Output:

The average is: 25.9286

Explanation:

In the above code, the float method "Avg" is declared, that accepts two parameters, that is "sum and n", inside the method, a float variable average is declared that divides and returns its values.

In the main method a float array "ar" is declared that holds values, in the next line, float variable "sum" and integer variable "n, j" is used.

In for loop, the "i" variable is used to add array values in the sum variable and pass into cout to call the "Avg" method and print its return value.

________ is part of the executive management team’s responsibility for protecting an organization’s information assets.
A. C-I-A triad
B. information security governance
C. risk management
D. A-I-C triad

Answers

Answer:

B) Information security governance

Explanation:

Information security governance is the process by which the information security activities of an organisation are controlled and directed.

Information security governance aims at providing direction to the executive management to implement a security program that ensures sufficient security to protect the information assets of an organisation. It consists of;

- Alignment of information security strategies and objectives with business strategies and objectives.

- Ensuring that risks are properly addressed.

- Promoting a positive security environment.

- Ensuring compliance with internal and external security requirements.

________ includes reviewing transactoin logs and uses real-time monitoring to find evidence

Answers

Complete Question:

________ includes reviewing transaction logs and uses real-time monitoring to find evidence.

Group of answer choices

A. Log analysis

B. Network analysis

C. Code analysis

D. Media analysis

Answer:

B. Network analysis

Explanation:

Network analysis includes reviewing transaction logs and uses real-time monitoring to find evidence. Network analysis is a form of computer forensic service, which involves the scientific process of identifying, capturing and analyzing or examining data that are stored on digital devices in an electronic format, for the sole purpose of unraveling the truth about an allegation such as fraud, without preempting the outcome of the investigation.

Network analysis involves the use of network analyzers such as a sniffing and tracing tool to analyze or examine network traffic in real-time. Some examples of network analyzing tools are netdetector, tcpdump, pyflag, networkminer, xplico, tsat, wireshark, omnipeek, etc.

Please note, network analysis is also known as network forensics in computer science.

The following program is supposed to display a message indicating if the integer entered by the user is even or odd. What is wrong with the program?
num = int(input("Enter an integer: "))
print("The integer is", evenOdd(num))
def evenOdd(n) :
if n % 2 == 0 :
return "even"
return "odd"
A. The function definition must appear before the function is called.
B. The input and print statements must reside in a function named main.
C. The variable num and the parameter variable n must have the same name.
D. An else clause must be added to the if statement.

Answers

Answer:

A. The function definition must appear before the function is called

Explanation:

Given

The above lines of code

Required

Determine the error in the program

In python, functions has be defined before they are called but in this case (of the given program), the function is called before it was defined and this will definitely result in an error;

Hence, option A answers the question

The correct sequence of the program is as follows:

def evenOdd(n):

     if n % 2 == 0:

           return "even"

     return "odd"

num = int(input("Enter an integer: "))

print("The integer is", evenOdd(num))

Carrie is creating a personal balance sheet. The heading includes the period of time that the balance sheet
represents
Which could be the header of Carrie's balance sheet?
Carrie's Balance Sheet (January 2013)
O Carrie's Balance Sheet (January 2012 - January 2013)
Carrie's Balance Sheet (January 2008 - January 2013)
Carrie's Balance Sheet (Birth - January 2013)

Answers

Answer:

the answer is A

Explanation:

carries balance sheet ( 2013)

Answer: the answer is A

Explanation: I got 100 ./.

ven if you skipped all the requirements analysis steps, the two steps guaranteed to be completed in any software development are

Answers

Complete Question:

Even if you skipped all the requirements analysis steps, the two steps guaranteed to be completed in any software development are;

Group of answer choices

A. policy and procedure development

B. use case activity diagram testing

C. method design and coding

D. data conversion and user training

Answer:

C. method design and coding

Explanation:

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are six (6) main stages in the creation of a software and these are;

1. Planning.

2. Analysis.

3. Design.

4. Development (coding).

5. Deployment.

6. Maintenance.

Among the listed stages, there are two (2) most important stages which cannot be ignored in the creation of a software application are.

Hence, even if you skipped all the requirements analysis steps, the two steps guaranteed to be completed in any software development are method design and coding.

I. Method design: this is the third step of the software development life cycle, it comes immediately after the analysis stage. This is the stage where the software developer describes the features, architecture and functions of the proposed solution in accordance with a standard.

II. Coding (development): this is the fourth step in the software development process and it involves the process of creating a source code which would enable the functionality of the software application.

Create a Python script that takes two parameters to do the following:-
1) List all files names, size, date created in the given folder
2) Parameter1 = Root Folder name
Parameter2= File size >>> to filter file size ( you can do =, > or <) it is up to you, or a range.
The script should check and validate the folder name, and the size
The script should loop until find all files greater than the specified size in all the sub-folders
3) Use catch-exception block (Make sure that the error messages do not reveal any of the application code)
4) Optionally, you can save the list into a file "Results.txt" using the redirection operator or by creating the file in the script.

Answers

Answer:

import sys, time

from os import walk, remove

from os.path import exists, join, getsize, getctime

file_counter = [ ]

folder_name, file_size = argv

isExist = exists( folder_name )

if folder_name == True:

    for root, folder, files in walk( folder_name ):

          for file in files:

               if getsize( join ( root, file ) ) >= file_size:

                   file_log = [ ]

                   file_log.append( file )

                   file_log.append( join ( root, file) )

                   file_log.append( time.ctime( getctime( file ) ) )

                   file_counter.append( file_log )

               else:

                   remove ( join ( root, file ) )

Explanation:

The python script above output the filename, size and file creation date of any folder passed to it.

Write the ColorfulBouncingCircle class, where you should write the constructor, setPlayingFieldSize, and tick methods, and override the overlaps method, each according to the above descriptions. You should not have to write any code which draws; instead, a test program will be provided which will animate ColorfulBouncingCircles based on your implementation. For every time tick, the test program will compare every circle against every other circle using the overlaps method

Answers

Answer: Circle class representing circle objects which have a radius, center x, and center y. It included overlaps and draw methods. Then, we wrote a Colorfulcircle class which included a Color property and overrode the draw method of Circle. For this assignment, you are asked to create a ColorfulBouncing circle class. Begin with the versions of Circle and ColorfulCircle uploaded to Canvas ColorfulBouncingCircle should extend ColorfulCircle, Unlike the other Circle classes, it will include a velocity for the x and y axes. The constructor for ColorfulBouncingCircle includes these parameters: public colorfulBouncingcircle (double radius, double centerx, double center Color color, double xVelocity, double yvelocity) Note that we are treating x as increasing to the right and y as increasing down, as with Java's graphics coordinates system. This was also seen with Circle's draw method. ColorfulBouncingCircles will bounce around in a playing field which the tester will provide. The Colorful Bouncinesicle class should have a public static method to set the playing field width and height: public static void setPlayingFieldsize (double newwidth, double newHeight) ColorfulBouncingCircle will also include a method which should alter its center and center with each time tick (similar to a metronome's noise guiding a musician to play a song). The circle's x position should be altered according to x velocity and y position according to y velocity. However, before changing the positions, check if the center position would, after moving, be either less than 0 or greater than the playing field dimensions. If so, instead of changing the center position, alter the velocity. If the ball hits the top or bottom, the sign of its vertical velocity should be flipped: if it hits the left or right, its horizontal velocity sign should be flipped. If it hits a corner, both should be. Notice that velocity may be positive or negativel The tick method which will be called by the tester is defined in this way:

public void tick() Finally, we should override the overlaps method to make balls bounce away from each other. You should call the super method to see if your circle overlaps another circle. If so, alter this circle's velocity according to its center relative to the other circle. If this circle" is above or below the "other circle," flip the sign of "this circle's" vertical velocity. If it's to the left or right, flip the horizontal velocity As before, both may be flipped. This is NOT the same as a true elastic collision, but it should be simpler for you to implement. The sign flipping will sometimes cause the balls to "vibrate" when caught between each other. Please review the velocity changing rules carefully; they are easy to get wrong!! To review: Write the ColorfulBouncineCircle class, where you should write the constructor setPlayingfield Size, and tick methods, and override the overlaps method, each according to the above descriptions. You should not have to write any code which draws; instead, a test program will be provided which will animate ColorfulBouncingCircles based on your implementation. For every time tick, the test program will compare every circle against every other circle using the overlaps method. The test program will ask you to press Enter in the console to launch the automated tests which will assign a tentative score based on your implementation. DO NOT ALTER the Circle OR Colorful Circle files!!

Explanation:

A monitor is a type of? CPU input memory output

Answers

Answer:

Un monitor es un periférico de salida en el que la computadora muestra las acciones y ejecuciones que se realizan él.

Explanation:

:D

Answer:

output

Explanation:

I just took the test.The person that answered it in Spanish is correct they also put output. Congrats :)

In order to use an object in a program, its class must be defined.

True
False

In object-oriented programming, what is initializing?

Concatenating the initial values of an attribute
Modifying the initial values of an attribute
Printing the initial values of an attribute
Setting the initial values of an attribute

Answers

Answer:

True

Setting the initial values of an attribute

Explanation:

A class in a program describes the contents of the objects that it belongs to and specifies how they behave. It defines the operations (methods).

Therefore, for an object to be used in a program, its class must be defined, which is TRUE.

Initialization with regards to object-oriented programming is defining or assigning values to a constant or variable. Thus, option D is correct as it is setting the initial values of an attribute

Answer:

Q1: True

Q2: Setting the initial values of an attribute

Explanation:

Got both answers correct in the class thanks to the guy above me!

#include using namespace std;void Swap(int x,int y); //prototypeint main(){ int num1, num2; cout << "Please enter two numbers to swap, the same numbers will quit." << endl; cin >> num1 >> num2; while (num1 != num2) { Swap(num1,num2); cout << "After swap, the numbers are " << num1 << " " << num2 << endl; cout << "Please enter two numbers to swap, "; cout << "the same numbers will quit." << endl; cin >> num1 >> num2; } cout << "Thanks!" << endl; return 0; }//***************************//This subroutine swaps two numbers//*****************************void Swap(int x, int y){ int temp; temp = x; x = y; y = temp;}1. Type in the above program as swap.cpp. Add a comment to include your name and date. Compile and run with different values.2. To find out why this is not working, add the following output statements to the swap function.a. cout << " beginning of swap" << x << " " << y << endl;b. cout << " end of swap" << x << " " << y << endl;Are the variables being swapped inside the swap function?3. Explain why this program is not working correctly.4. Fix the program so the swap will work. Compile and run and be sure the swap works.5. Submit a copy of the final listing and output. Also include a copy of the hierarchy chart for the program.

Answers

Answer:

Fix:

void Swap(int &x, int &y){

           int temp;

           temp = x;

           x = y;

           y = temp;        }

See the explanation

Explanation:

1. swap.cpp

//Name: ABC    Date: dd/mm/yyyy

#include

using namespace std;

void Swap(int x,int y); //prototype

int main(){

   int num1, num2;

   cout << "Please enter two numbers to swap, the same numbers will quit." << endl;

   cin >> num1 >> num2;    

   while (num1 != num2) {

       Swap(num1,num2);

       cout << "After swap, the numbers are " << num1 << " " << num2 << endl;

       cout << "Please enter two numbers to swap, ";

       cout << "the same numbers will quit." << endl;

       cin >> num1 >> num2; }

       cout << "Thanks!" << endl;

       return 0; }

//********************//This subroutine swaps two numbers // ********************

       void Swap(int x, int y){

           int temp;

           temp = x;

           x = y;

           y = temp;}

The output of this program with num1 = 1 and num2 = 2 is:

Please enter two numbers to swap, the same numbers will quit.                 1                                                                                                                               2                                                                                                                               After swap, the numbers are 1 2                                                                         Please enter two numbers to swap, the same numbers will quit.                 1                                                                                                                           

1                                                                                                                               Thanks!  

Notice that the numbers 1 and 2 are not swapped correctly even when the Swap() method is called in the main() function.

The other numbers 1 and 1 are entered in order to quit the program.

 

2.

In this part first output statement a) is added to the start of Swap() method before swapping the numbers x and y and the output statement b) is added to the last after the set of operations performed to swap x and y.

   void Swap(int x, int y){

       cout << " beginning of swap " << x << " " << y << endl;

           int temp;

           temp = x;

           x = y;

           y = temp;

           cout << " end of swap " << x << " " << y << endl;        }

Lets say x = 1 and y = 2

The output of these two statements is:

beginning of swap 1 2      

end of swap 2 1    

This shows that the Swap() function is working correctly and swapping the two numbers x and y.

3.    

The reason that the program is not working properly is that x and y are value parameters. They are like local variables and local to the Swap() function. So changes made to them have no effect on the calling functions arguments num1 and num2. That is why the result remains the same when this function is called in the main().

In these three statements of Swap() method:

int temp = x;

   x = y;      

   y = temp;    

temp is a local variable which is local to this Swap function

Similarly x=y; and y= temp statements make changes only in the local copy and not in the values of num1 and num2 which are passed to this function in main()

So for the above example where num1 = 1 and num2 = 2, the statement

 cout << "After swap, the numbers are " << num1 << " " << num2 << endl;

displays:

After swap, the numbers are 1 2

This means their real values are printed as it is without swapping the values.

4.

The solution is to mark the parameters x and y of the function Swap() as reference parameters in the following way:

void Swap(int &x, int &y)

In this way the memory address of each argument num1 and num2 is passed to the Swap(). The Swap() uses this address to both access and change the values.

So   Swap(num1,num2); function call passes the memory address the actual parameters.

For the reference parameter an ampersand (&) is used before the variables x and y of Swap method. Now any changed made to these variables will effect the calling function arguments num1 and num2. So if x and y are swapped then num1 and num2 are also swapped when this function is called in main().

So change the prototype of Swap function as:

void Swap(int &x,int &y);

Change the function definition as:

void Swap(int &x, int &y){

           int temp;

           temp = x;

           x = y;

           y = temp;        }

Now the program gives the following output:

Please enter two numbers to swap, the same numbers will quit.                                                                                 1                                                                                                                                             2                                                                                                                                             After swap, the numbers are 2 1                                                                                                               Please enter two numbers to swap, the same numbers will quit.                                                                                 1                                                                                                                                        1                                                                                                                                             Thanks!  

See now the numbers are correctly swapped. The program and its output is attached.

Use the Web to search for methods to prevent XSS attacks. Write a brief description of more than one method.

Answers

XSS attacks

Explanation:

Cross site scripting is a security vulnerability. it is a client side code injection attack, the attacker tries to execute a malicious JavaScript in the internet browser of the victim. The users browser executes this script on the users computer. Almost one in three websites are vulnerable to cross site scripting. To prevent cross site scripting, scan your web application or website regularly, your developers should also correct the code to eliminate vulnerabilities.Escaping is the first method one should use to prevent XSS attacks. Escaping means whatever data an application receives should be secure before sending it to user.  Validating input is he second method, it  means one should ensure that the application renders correct data and prevents malicious data from harming the site, database and users. Blacklisting is used for this. IT disallows several predetermined characters in user input. Sanitizing is the third way to prevent XSS attacks. It is helpful on sites that allow HTML markup to make sure that the data which is received is not doing any harm to users or your database by cleaning the data of harmful markups.

Which organization plays a key role in development of global health informatics?
a.International Council of Nurses (ICN)
b. International Organization for Standardization (ISO)
c. International Medical Informatics Association (IMIA)
d. World Health Organization (WHO)

Answers

Answer:

International Medical Informatics Association (IMIA)

Explanation:

In respect of the question which askabout the organization who play an important role in regards to the development of global health informatics is International Medical Informatics Association (IMIA).

International Medical Informatics Association (IMIA) which is an interni association which are independent which works toward expanding and sustaining of global Biomedical and Health Informatics community and give maximum support to international initiative which are geared towards providing adequate and standardized health for each and everyone in the world at large.

Other Questions
246.24 + 238.278 + 98.3= What is the appropriate t critical value for each of the following confidence levels and sample sizes? (Round your answers to two decimal places.) (a) 90% confidence, n = 17 (b) 90% confidence, n = 12 (c) 99% confidence, n = 24 (d) 90% confidence, n = 23 (e) 80% confidence, n = 13 (f) 95% confidence, n = 9 Standards and Skills Questions (Without Text Selections)Identify the choice that best answers the question.In which sentence does the word rain function as the object of a preposition?A. The rain lashed against the window all night.B.We saw the rain pouring into the basement.C. The tremendous amount of rain has caused a flood.D. We sincerely hope that the rain will stop soon! The table lists the profits of some of the worlds largest corporations in 2013. List the companies in order from greatest to least amount of profit. A. Ace Motors, MegaMart, Vision Cell, Urban, Punchbuggies B. Punchbuggies, MegaMart, Ace Motors, Vision Cell, Urban C. Punchbuggies, Ace Motors, MegaMart, Vision Cell, Urban D. Vision Cell, Ace Motors, Urban, Punchbuggies, MegaMart Someone help me solve this expression please Psychology is considered a social science, yet it has foundations in the natural sciences. truth or false How did the Islamicexpansion impactEuropean nations, suchas France and Spain? Which detail would be evidence to support the theme"Parents don't always know what's best for theirchildren."ike aul notsatinn't bee'd beMaynd"The biggest thing on the program is the May Poledancing, which I can do without."O "You'd think she'd be glad her daughter ain't outthere prancing around a May Pole getting the newclothes all dirty."trying to act like a fairy or a flower or whateveryou're supposed to be"I'reurself. A/nconnects information you're borrowing from a source to a citation in your bibliography.Select one:O a. paraphrased lineO b. in-text citationO c. summary The economy is in a recession and the government wants to increase output. If the multiplier equals 3 and the government increases spending by 250, how much will output increase by Which statement best defines the geographical theme, "location"? *The continent in which a country fallsThe theme that describes where a place is located on EarthThe lines of latitude and longitude at which a place is locatedHow do locate a place from the U.S. Select the correct answer from the drop-down menu. Complete the following sentences. One theory claims that Jews have been traced to the Khazar region in 1(_____)The second theory claims that 2(_____) originated from some 300 people in Europe, and form 80 percent of the European Jewish population.1.New England region, Northern Himalayas, Northern Caucuses 2.Ashkenazi Jews, Bene Israel Jews, Malabar Jews Which statements are TRUE regarding purchase limitations under Regulation A? I Tier 1 offerings are subject to purchase limitations II Tier 1 offerings are not subject to purchase limitations III Tier 2 offerings are subject to purchase limitations IV Tier 2 offerings are not subject to purchase limitations A. I and III B. I and IV C. II and III D. II and IV What is 6^2/3in radical form? Kurt, Sophia, and Franco had a paper airplane throwing contest after school. Kurt's airplane flew 8.6 yards. Sophia's airplane flew 2.2 yards farther than Kurt's airplane. Franco threw his airplane 1.5 times as far as Sophia's airplane. How far did Franco's paper airplane fly? please help :) Which expression is equal to 6+45 ? A 10 times 5 B 6 plus 20 C 6 plus 9 In a city, the record monthly high temperature for March is 56 degrees Fahrenheit. The record monthly low temperature is -4 degrees Fahrenheit. What Is the range of temperature for March? What is the heat-loss rate through the slab if the ground temperature is 5 C while the interior of the house is 25 C? Which Natural Numbers are not Integers? e Ohio legislature passed a law which made it a crime to harass someone by email. Such a law is an example of: _______. uniform law common law constitutional law