A function's return data type must be the same as the function's
parameter(s).
True
False


// For c++

A Function's Return Data Type Must Be The Same As The Function'sparameter(s).TrueFalse// For C++

Answers

Answer 1

Answer:

False

Explanation:

Return data type has no relation with the function's parameter

Answer 2
this answer would be false.

Related Questions

You read an interesting article about data analytics in a magazine and want to share some ideas from the article in the discussion forum. In your post, you include the author and a link to the original article. This would be an inappropriate use of the forum.

Answers

It is FALSE to state that if one read an interesting article about data analytics in a magazine and wants to share some ideas from the article and a discussion forum, that if one in their your post, includes the author and a link to the original article, that this would be an inappropriate use of the forum.

Why is the above assertion false?

The above assertion is false because:

One will be sharing relevant information in the group;One will also be referencing the owner of such information.

An Internet forum, often known as a message board, is a website where individuals may have conversations in the form of posted messages. Unlike discussion rooms, messages are frequently longer than one line of text and are at least briefly stored.

The nature of discussion forums is reflective. They require pupils to study opposing viewpoints and carefully evaluate their reactions. Many students find the social parts of the face-to-face classroom difficult, particularly ESL speakers, new students, and those who are plain shy or quiet.

Learn more about the Use of Forum:

https://brainly.com/question/13707619

#SPJ1

Full Question:

TRUTH or FLASE: You read an interesting article about data analytics in a magazine and want to share some ideas from the article and a discussion forum. In your post, you include the author and a link to the original article. This would be an inappropriate use of the forum.

4. A piece of wire of cross-sectional area 2 mm² has a resistance of 300.Find the resistance of a wire of the same length and material if the cross-sectional area is 5 mm². the cross-sectional area of a wire of the same length and material of resistance 750.​

Answers

The resistance of a wire of the same length is 750Ω.The cross-sectional area of a wire is 5mm².

What is cross-sectional area?

The area of a two-dimensional shape obtained when a three-dimensional object, such as a cylinder, is sliced perpendicular to some defined axis at a point is known as the cross-sectional area. A cylinder's cross-section, for example, is a circle when sliced parallel to its base.

The solution of the question will be:

A= 2mm²

= 2 × 10⁻⁶m

R= 300Ω

Let, the resistance= R¹

A¹ = 5mm²

= 5 × 10⁻⁶m.

(R= lA/l)/(R¹= lA¹/l)

⇒ R/R¹ = A/A¹

⇒R¹/R = A¹/A

R¹ = A¹/A × R

    = (5×10⁻⁶/2×10⁻⁶) × 300

    = 750Ω

Let, the area be A¹¹

A¹¹ = ?, R¹¹ = 750Ω

R¹¹/R = A¹¹/A

(750/300) = (A¹¹/2 × 10⁻⁶)

⇒A¹¹ = (750/300) × (2 × 10⁻⁶)

=5 × 10⁶

=5mm²

To learn more about cross-sectional area

https://brainly.com/question/12820099

#SPJ13

The main issues covered by IT law are: Hardware licensing Data privacy Department security True False

Answers

The main issues covered by IT law are: Hardware licensing, Data privacy, Department security is a true statement.

What topics are addressed by cyber law?

There are three main types of cyberlaw:

Human-targeted crimes (e.g.: harassment, stalking, identity theft) Vandalism of property (e.g.: DDOS attacks, hacking, copyright infringement) The theft from the govt (e.g.: hacking, cyber terrorism)

Cyber law includes provisions for intellectual property, contracts, jurisdiction, data protection regulations, privacy, and freedom of expression. It regulates the online dissemination of software, knowledge, online safety, and e-commerce.

Note that some Internet security issues that must be considered are:

Ransomware Attacks. IoT Attacks. Cloud Attacks. Phishing Attacks.Software Vulnerabilities, etc.

Learn more about IT law from

https://brainly.com/question/9928756
#SPJ1  

Which menu option allows you to change the display to close-up, single, or multiple pages?

Question 3 options:

Insert


Edit


View


File

Answers

The menu option that allows you to change the display to close-up, single, or multiple pages is view. The correct option is C.

What is menu option?

A menu is a set of options presented to a computer application user to assist them in finding information or performing a function.

Menus are common in graphical user interfaces (GUIs) provided by operating systems such as Windows and MacOS. They're also used in speech recognition and on websites and web pages on the internet.

The View menu, located at the top of the screen, contains the following commands: Sheets: Upon selection, a cascade menu appears, displaying a list of all sheets used in the document, sorted from left to right.

View is the menu option that allows you to switch between close-up, single, and multiple page displays.

Thus, the correct option is C.

For more details regarding menu option, visit:

https://brainly.com/question/3507017

#SPJ1

Data for each typeface style is stored in a separate file.
a. True
b. False

Answers

Data for each typeface style is stored in a separate: a. True.

What is a typeface?

In Computer technology, a typeface can be defined as a design of lettering or alphabets that typically include variations in the following elements:

SizeSlope (e.g. italic)Weight (e.g. bold)Width

Generally speaking, there are five (5) main classifications of typeface and these include the following:

SerifSans serifScriptMonospacedDisplay

As a general rule, each classifications of typeface has its data stored in a separate for easy access and retrieval.

Read more on typeface here: https://brainly.com/question/11216613

#SPJ1

You have found a file named FunAppx86.exe on your hard drive. Which system(s) would this executable file MOST likely run on?

Answers

Since you have found a file named FunAppx86.exe on your hard drive, the systems that this executable file MOST likely run on is Both 32-bit and 64-bit systems.

What does 32- and 64-Bit Mean?

When it comes to computers, the processing capability differential between a 32-bit and a 64-bit is everything. 64-bit processors are newer, quicker, and more secure than 32-bit processors, which are older, slower, and less secure.

Therefore, A computer file that contains an encoded sequence of instructions that the system can directly execute when the user clicks the file icon," is the definition of an executable file.

Learn more about executable file from

https://brainly.com/question/28146265
#SPJ1

7.At a project party outside the office premises, your colleague Mr.A has had a lot to drink and is making sexual gestures and comments, at one of your other female colleagues, Mr.B who is sitting next to you.
She looks visibly upset.What should you do?
a.Ignore and let Ms.B handle the situation at hand.
b.Become a supportive bystander and intervene to stop the inappropriate behaviour, with help
from a senior staff at the pub. Subsequently, report this matter to grb mail address
c.Only Ms.B can report such a complaint.Hence, there is no action required from your end.
d.Since the incident happened at the pub, there is no need to report it further to the organization.

Answers

Answer:

b.becomr a supportive bystander and intervene to stop the inappropriate behavior with help from a senior staff at the pub.

remember to give be Brainest.

like,star and comments.

You should become a supportive bystander and intervene to stop the inappropriate behavior, with help from senior staff at the pub. Subsequently, report this matter to grab the mail address. The correct option is b.

What is sexual harassment?

Unwanted physical contact or touching. Inappropriate sexual approaches. It is forbidden to make unwanted sexual advances toward a candidate or employee.

Unwelcome sexual advances, requests for sexual favors, and other forms of verbal or physical harassment of a sexual character can all be considered harassment.

Therefore, the correct option is b. Become a supportive bystander and intervene to stop the inappropriate behavior, with help from senior staff at the pub. Subsequently, report this matter to grab mail address.

To learn more about sexual harassment, refer to the link:

https://brainly.com/question/13182824

#SPJ2

Which option determines the number of pages, words, and characters in a
document?
View Print Layout
File > Properties
Tools > AutoCorrect
Tools Word Count

Answers

View>print layout because it just makes sense

Select the three main repetition structures in Java.

Answers

The three main repetition structures in Java are while loops, do-while loops and for loops.

What is java?

Java is a high-level, class-based, object-oriented programming language with a low number of implementation dependencies. It is a general-purpose programming language designed to allow programmers to write once and run anywhere (WORA), which means that compiled Java code can run on any platform that supports Java without the need for recompilation. Java applications are usually compiled to bytecode which can run on any Java virtual machine (JVM), regardless of computer architecture. Java's syntax is similar to that of C and C++, but it has very few low-level facilities than either of them. The Java runtime supports dynamic capabilities that traditional compiled languages do not have.

To learn more about java

https://brainly.com/question/25458754

#SPJ13

Write an HLA Assembly language program that prompts for two specific int8 values named start and stop and then displays a repeated digit pattern starting with that number. The repeated digit pattern should show all the numbers beginning with the start value and then adding 1, 2, 3, 4, ... to this value until you hit a number greater than the stop value. Shown below is a sample program dialogue.

Answers

Using the knowledge of computational language in python it is possible to write a code that prompts for two specific int8 values named start and stop and then displays a repeated digit pattern starting with that number.

Writting the code:

  start:

mov   al, start

add   al, '0'

mov   ah, 0eh

int   10h

 

stop:

mov   al, stop

add   al, '0'

mov   ah, 0eh

int   10h

 

prompt:

mov   dx, offset start

mov   ah, 09h

int   21h

 

mov   dx, offset stop

mov   ah, 09h

int   21h

 

mov   dx, offset pattern

mov   ah, 09h

int   21h

 

;display start

mov   al, start

add   al, '0'

mov   ah, 0eh

int   10h

 

;display stop

mov   al, stop

add   al, '0'

mov   ah, 0eh

int   10h

 

;display pattern

mov   dx, offset pattern

mov   ah, 09h

int   21h

 

;get input

mov   ah, 01h

int   21h

 

cmp   al, start

je    start

cmp   al, stop

je    stop

cmp   al, 0ffh

je    done

jmp   prompt

 

done:

mov   ah, 4ch

int   21h

 

start   db   'start: ', 0

stop    db   'stop: ', 0

prompt  db   'prompt: ', 0

pattern db   'Here's your answer: ', 0

end start

See more about HLA Assembly language at brainly.com/question/13034479

#SPJ1

wireless network devices use ________ to communicate with each other.

Answers

Radio Waves/RF which is radio frequency.

wireless network devices use Radio Waves to communicate with each other.

What is Radio Waves?

Radio waves are one type of electromagnetic radiation. A radio wave has a significantly longer wavelength than visible light. People frequently use radio waves for communication. In order to transmit and receive radio frequency energy, this radio tower employs both rectangular and circular antennas.

AM and FM radio broadcasting deliver sound to a large audience. Radar is a detection tool that collects data about objects using radio waves. Bluetooth and wireless communication connect devices by using radio waves.

Radio equipment requires electromagnetic waves to transmit and receive in order to function. The radio signal is an electronic current that moves very quickly.

Thus, it is a Radio Waves.

For more information about Radio Waves, click here:

https://brainly.com/question/21995826

#SPJ12

Eunice Lee likes technology and video games, so she is thinking of pursuing a career as a video game designer. Research the requirements of a video game designer. What kinds of interests, skills, and courses do you need? What is a typical career path for someone in the video game field

Answers

In order to be a video game designer, one must have:

Creativity.A love of video games.Storytelling talent.Broad understanding of game trends.Strong analytical abilities.Outstanding programming abilities.Capability to collaborate as part of a team.

How can a typical career path for someone in the video game field be described?

A popular job path is to begin as a game artist before progressing to lead artist and finally creative director. This is an excellent profession for anybody wishing to develop their creative muscles, and no two projects are ever the same.

A bachelor's degree in art and design, multimedia design, or a similar discipline is required for the majority of video game designers. Some colleges provide a degree in video game design. Software engineering, 2D and 3D animation, computer languages, and computer design are common courses.

Learn more about Video Game Designer:
https://brainly.com/question/14788186
#SPJ1



if you have two folders open on your desktop and you want to move a file from one folder to the other, simply ___ the file.

Answers

if you have two folders open on your desktop and you want to move a file from one folder to the other, simply Drag and Drop the file.

What are the different ways to move or copy a file or folder?

By dragging and dropping with the mouse, using the copy and paste commands, or by utilizing keyboard shortcuts, a file or folder can be transferred or relocated to a new location.

Note that in Drag & drop, Just like you would with a file on your desktop, you can move a file or folder from one folder to another by dragging it from its present location and dropping it into the destination folder.

Learn more about copying files from

https://brainly.com/question/17019048
#SPJ1

Driving is expensive. Write a program (in Python) with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 20 miles, 75 miles, and 500 miles.


Output each floating-point value with two digits after the decimal point, which can be achieved as follows:

print('{:.2f} {:.2f} {:.2f}'.format(your_value1, your_value2, your_value3))

Answers

x=float(input("How many miles can your vehicle travel on 1 gallon of gasoline?: "))

y=float(input("How much does 1 gallon of gasoline cost?: "))

print('20 miles: {:.2f}$\n75 miles: {:.2f}$\n500 miles: {:.2f}$'.format((20/x)*y, (75/x)*y, (500/x)*y))

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

Answers

Services for managing and storing corporate data as well as giving users the tools to analyze it.

VoIP, also known as IP telephony, enables users to place or receive phone calls through a broadband internet connection. In this regard, VoIP serves as the foundational technology for the online transmission of speech and other multimedia material. The services offered by all the software and hardware are the main emphasis of IT infrastructure. IT infrastructure is a group of company-wide services that management budgets for and consists of both technical and human resources. SaaS offers on-demand or recurring delivery of software programs through the internet. The cloud service providers host, control, and manage the software program as well as look after the supporting infrastructure.

Learn more about Services here-

https://brainly.com/question/12096912

#SPJ4

Define network architecture?

short answer please​

Answers

Network architecture refers to the approach network devices and services area unit structured to serve the property desires of shopper devices.

Network devices usually embrace switches and routers.Types of services embrace DHCP and DNS.Client devices comprise end-user devices, servers, and smart things.

Networks additionally got to be dynamic, agile, and in lockstep with business desires. ancient, manually intensive strategies of managing pc networks area unit proving to be unsustainable. New approaches area unit necessary, ones that need transformational changes in however networks area unit architected.

This is what spec is all regarding. It’s however information flows expeditiously from one pc to a different. And for businesses with an internet element, it’s a vital idea that encompasses a vital impact on their operation

Learn more about Network Architecture at

https://brainly.com/question/13327017

PLEASE HELP
Find five secure websites. For each site, include the following:

the name of the site

a link to the site

a screenshot of the security icon for each specific site

a description of how you knew the site was secure

Use your own words and complete sentences when explaining how you knew the site was secure.

Answers

The name of the secure websites are given as follows:

wwwdotoxdotacdotuk [University of Oxford]wwwdotmitdotedu [Massachusetts Institute of Technology]wwwdotwordbankdotorg [World Bank]wwwdotifcdotorg [International Finance Corporation]wwwdotinvestopediadotorg [Investopedia]

Each of the above websites had the security icon on the top left corner of the address bar just before the above domain names.

What is Website Security?

The protection of personal and corporate public-facing websites from cyberattacks is referred to as website security.

It also refers to any program or activity done to avoid website exploitation in any way or to ensure that website data is not accessible to cybercriminals.

Businesses that do not have a proactive security policy risk virus spread, as well as attacks on other websites, networks, and IT infrastructures.

Web-based threats, also known as online threats, are a type of cybersecurity risk that can create an unwanted occurrence or action over the internet. End-user weaknesses, web service programmers, or web services themselves enable online threats.

Learn more about website security:
https://brainly.com/question/28269688
#SPJ1

Chris is unfamiliar with the word processing program he is using. He wants to find
the drop-down text-driven options for the document view because he does not yet
recognize the icons at the top of the window. Where can Chris find these drop down
options?

Answers

Answer:

Explanation:

Chris is unfamiliar with the word processing program he is using. He wants to find the drop-down text-driven options for the document view because he does not yet recognize the icons at the top of the window. Where can Chris find these drop down options?

Question 4 options:

Options bar

Scroll bar

Toolbar

Menu bar

why do companies use online collaborative productivity software?

Answers

Answer:

to allow easy access to colleagues for assistance

To allow easy access to colleagues for assistance is the way companies use online collaborative productivity software.

What is online collaborative?

Working together online while utilizing online tools is known as online collaboration. Employees can communicate digitally from many locations and devices by using shared online workspaces and virtual work environments, as opposed to physically gathering in an office.

Teams can communicate online thanks to software called online collaboration tools. Some examples are Trello, Asana, and Slack. These tools are created to make it simpler for remote teams to coordinate their efforts and communicate.

The following are some advantages of working together online: saving the business money and valuable resources. Increasing productivity so you can focus on the most important activities. improving communication within and between teams as well as with external parties.

Thus, To allow easy access to colleagues for assistance.

For more information about online collaborative, click here:

https://brainly.com/question/28289861

#SPJ12

Ali receives an email from a person posing as a bank agent, who asks Ali to share his bank account credentials. Which type of network attack does this scenario indicate?
The network attack in this scenario is . This attack can occur .

Answers

Phishing is the type of network attack which this scenario indicates. This type of attack can take place via electronic messages.

What is network attack?

Network attacks are illegal activities on digital assets within an organization's network. Malicious parties typically use network assaults to change, destroy, or steal private data. Network attackers typically target network perimeters in order to obtain access to interior systems. In a network attack, attackers aim to breach the business network perimeter and obtain access to internal systems. Once inside, attackers frequently combine different forms of assaults, such as compromising an endpoint, propagating malware, or exploiting a weakness in a system within the network.

To learn more about network attack

https://brainly.com/question/14980437

#SPJ13

In cell A17, use the SUMIF function and structured references to display the total
membership in 2023 for groups with at least 40 members.

Answers

Since, in cell A17, use the SUMIF function and structured references to display the total membership in 2023 for groups with at least 40 members, to do so one need to use"

On cell G16, type the formula "=SUMIF(G2:G11, ">=40")".

What is the  function "SUMIF" about?

The SUMIF function is used to add numbers in a range that satisfy certain requirements. Assume, for instance, that you wish to sum only the integers larger than 5 in a column of numbers. The following formula can be used: =SUMIF(B2:B25,">5")

Therefore, In Microsoft Excel, formulas are used to produce results or assign values to cells. The equal sign must be the first symbol in the formula. The function "SUMIF" in the formula above is utilized to provide a sum of numerical values dependent on a condition.

Learn more about SUMIF function  from

https://brainly.com/question/19595606
#SPJ1

See full question below

Switch to the Academic Groups worksheet. In cell A14, use the INDEX function to display the value in the first row and first column of the AcademicGroups table.

In cell A17, use the SUMIF function to display the total membership in 2023 for groups with at least 40 members.

I don't know who to do this assignment
An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage. Write a program that takes as inputs the hourly wage, total regular hours, and total overtime hours and displays an employee’s total weekly pay.

Answers

Python:

wage=int(input("What the hourly wage?: "))

total_reg_hours=int(input("Enter total regular hours: "))

total_over_hours=int(input("Enter total overtime hours: "))

#Calculate the weekly pay.

print("The weekly pay of this employee is ",(total_reg_hours*wage)+(total_over_hours*(1.5*wage)))

C++:

#include <iostream>

int main(int argc, char* argv[]) {

   int wage,t_reg,t_over;

   std::cout << "Enter wage: "; std::cin>>wage;

   std::cout << "\nEnter total regular hours: "; std::cin>>t_reg;

   std::cout << "\nEnter total overtime hours: "; std::cin>>t_over;

   

   //Calculate the weekly pay.

   std::cout << "The weekly pay of this employee is " << (t_reg*wage)+(t_over*1.5*wage) << std::endl;

   return 0;

}

Chris is unfamiliar with the word processing program he is using. He wants to find
the drop-down text-driven options for the document view because he does not yet
recognize the icons at the top of the window. Where can Chris find these drop down
options?

Answers

Since Chris wants to find the drop-down text-driven options for the document view because he does not yet recognize the icons at the top of the window. The place that Chris can  find these drop down options is option D: Menu bar.

What does a computer menu bar do?

The area of a browser or application window known as the menu bar, which is normally found at the upper left corner, contains drop-down menus that let users interact with the application or content in a variety of ways.

Therefore, while menu bars list all of a program's top-level commands, toolbars only display the most commonly used commands. Immediacy. A menu command could require additional input, but clicking a toolbar command has an immediate impact.

Learn more about Menu bar from

https://brainly.com/question/20380901


#SPJ1

See full question below

Chris is unfamiliar with the word processing program he is using. He wants to find the drop-down text-driven options for the document view because he does not yet recognize the icons at the top of the window. Where can Chris find these drop down options?

answer choices

Options bar

Scroll bar

Toolbar

Menu bar

1. PP 2.1 Create a revised version of the Lincoln program from Chapter 1 to print the quotation
inside a box made up of character ^.
2. PP 2.2 Write a program that reads four integers and prints the sum of their squares.
3. PP 2.3 Write a program that reads three floating point numbers and prints the cube of their
average.
4. PP 2.7 Write a program that prompts for and reads integer values for typing speed and number
of characters in the document, then prints the time required to type them as a floating point
result.

Answers

The revised version of the Lincoln program from Chapter 1 to print the quotation us illustrate below.

What is a program?

A computer program is a set of instructions written in a programming language that a computer can execute. Software contains computer programs as well as documentation and other intangible components.

The program will be:

public class Print {

public static void main(String[] args)

{

char ch='"';

System.out.println("A quote by Abraham Lincoln:\n"+ch+"Whatever you are, be a good one."+ch);

//by using char for storing double quote

System.out.println("A quote by Abraham Lincoln:\n"+'"'+"Whatever you are, be a good one."+'"');

//in single quote

System.out.println("A quote by Abraham Lincoln:\n\"Whatever you are, be a good one.\"");

//using \"

}//end of main

}//end of Print class

/******OUTPUT*******

A quote by Abraham Lincoln:

"Whatever you are, be a good one."

A quote by Abraham Lincoln:

"Whatever you are, be a good one."

A quote by Abraham Lincoln:

"Whatever you are, be a good one."

*/

Learn more about programs on:

https://brainly.com/question/26568485

#SPJ1

2_What is the shape of the potato peleer?Why does it have this shape and dimensions

Answers

Answer: call 023 2344 0092

Explanation:

he is my teacher

Stem assessment 4: divisible by

Answers

Explanation:

4 IS DIVISIBLE BY 2,4,1

IF MY ANSWER IS USEFUL MARK ME AS BRILLINT

Jordan is a 3D modeler using three circle made from edges—one large, one medium, and one small circle—and lines them up in front of one another from largest to smallest. Then Jordan fills the space between the edges of the circles with faces, making a telescope-looking cylinder. What type of modeling is Jordan using?

Question 7 options:

Digital Sculpting


Polygonal Edge Modeling


NURBS Modeling


Procedural Modeling

Answers

Since Jordan is a 3D modeler using three circle made from edges—one large, one medium, and one small circle—and lines them up in front of one another from largest to smallest.  The type of modeling is Jordan using is option B: Polygonal Edge Modeling.

What is a polygon 3D modeling?

Polygonal modeling is a technique used in 3D computer graphics to represent or approximate an object's surface using polygon meshes. For real-time computer graphics, polygonal modeling is the preferred technique since it is ideally suited to scanline rendering.

A 3D model's fundamental geometric elements are polygons. The polygon's vertices and edges are all straight. The created plane is known as a face and is typically a "triangular polygon," a geometric object with three sides. There are additionally "quads" and "n-gones" with four sides and several vertices.

Note that We build a polygon around each hole to identify an area of influence for that hole using the polygon method, an established and time-tested technique based on a straightforward geometric algorithm.

Learn more about Edge Modeling from

https://brainly.com/question/2141160

#SPJ1

some websites and organizations organize card drives, sending thousands of cards to u.s. troops overseas. besides the support these cards express, what else do they provide through the power of language?

Answers

Besides the support these cards express, identity provide through the power of language.

What do you mean by power of language?

The power of language is comprised of two main components: the power to talk and be understood, and the ability to listen and comprehend. Individuals with high language skills can communicate effectively in social situations. When non-native speakers participate in oral communication, native speakers of that language identify sufficiently well-formed speech, in the sense that it is sufficiently 'native' or close to what they know as 'their language' to be totally understood. Non-native speakers must be capable of comprehending and digesting words delivered at real-world rates of speech in the manner spoken by native speakers of that language when listening to a secondary language.

The card drives that send thousands of cards to US troops deployed around the world also establish identity through the power of language.

To learn more about power of language

https://brainly.com/question/28275319

#SPJ4

Answer: comfort

Explanation:

How should companies incorporate Agile methodology into their initiatives?

Answers

Answer:

down below

Explanation:

be more carful with things double checking because we are not perfect mistakes can be made , and shipping and packaging needs to better jobs with delivering items and for the not to be broken or box damaged

Variance for accumulator. Validate that the following code, which adds the
methods var() and stddev() to Accumulator, computes both the mean and variance
of the numbers presented as arguments to addDataValue():
public class Accumulator
{
private double m;
private double s;
private int N;
public void addDataValue(double x)
{
N++;
s = s + 1.0 * (N-1) / N * (x - m) * (x - m);
m = m + (x - m) / N;
}
public double mean(

Answers

Using the knowledge of computational language in JAVA it is possible to write a code that Validate that the following code, which adds the methods var() and stddev() to Accumulator, computes both the mean and variance of the numbers presented as arguments to addDataValue()

Writting the code:

import java.util.*;

public class Accumulator {  

private static double m;  

private static double v;  

private static double st;  

private static  double s[]=new double[5];

private static int N;

private static int count =0;

public static void main(String[] args) {

// TODO Auto-generated method stub

Random r = new Random();

System.out.println("hello world");

for(int i=0;i<5;i++) {

   double randomvalue = r.nextDouble();

addDataValue(randomvalue);

}

for(int i=0;i<s.length;i++) {

   System.out.println("dataValue:"+s[i]);

}  

mean();

System.out.println("mean:"+m);

var();

System.out.println("variance:"+v);

stddev();

System.out.println("standard deviation:"+st);

}

public  static void addDataValue(double value) {     // addes data values to array

 s[count]=value;

 count++;

}

public static double mean() {        // returns mean

double sum=0.0;

for(int i=0;i<s.length;i++) {

   sum+=s[i];

}

m = sum/s.length;

return m;

}  

public static double var() {    //returns variance

double mm = mean();

    double t = 0;

    for(int i=0;i<s.length;i++) {

        t+= (s[i]-mm)*(s[i]-mm);

}

    v= t/(s.length-1);

     return v;  

}

public static  double stddev() {        // returnsn the stardard deviation

st= Math.sqrt(var());

return st;

}

}

See more about JAVA at brainly.com/question/12975450

#SPJ1

Other Questions
What is the probability of the parents having a child who is homozygous dominant for this trait? 0%25%50%75% ________ occurs when the supplier, rather than the retailer, manages the entire inventory process for a particular product or group of products, resulting in more effective inventory replenishment. find the zeros of the function and state the multiplicities change this standard form equation into slope intercept form. 4x-5y= -17 11. FINANCIAL LITERACY The surf shop has a weekly overhead of $2300. b. How many skimboards and longboards must the shop sell each week to make a profit a. Write an inequality to represent the number of skimboards and longboards the shop sells each week to make a profit.Skimboard costs 115 longboard costs 685 Ashlynn is trying a low-carbohydrate diet. She would like to keep the amount of carbs consumed in grams between the levels shown in the following compound inequality:460 < 2x + 10 and 2x + 10 < 660Solve for x in the inequality, and explain what the answer represents Find the average rate of change of f(x)=x^2-4x+1 from x=2 to x=6 What uses clickstream data to determine the efficiency of the site for the users and operates at the server level?. Sound is an example of a longitudinal wave because the wave travels by compressions and rarefactions of air particles?True or false 21 Mr. Bracken has 2 children that like to sit in trees. Jedi weighs 20kg and Phin weighs 25kg. The tallesttree in their yard is 20m high. The shortest branch is 10m high. If Jedi climbs to the highest branch andPhin climbs to the lowest brach, how much potential energy does each child have and which child has themost potential energy?A Jedi has 200 J, Phin has 500 J, therefore Jedi has the most potential energyB Jedi has 400 J, Phin has 250 J, therefore Phin has the most potential energy.c Jedi has 400 J, Phin has 250 J, therefore Jedi has the most potential energy.D Jedi has 200 J, Phin has 500 J, therefore Phin has the most potential energy. a database designer interviews a sales team that will be using a new database. during the interview, the designer documents entities as , and relationships as . Seth earns $25 a day and $3 for each ticket he sells at the local theatre. Write and solve aninequality that can be used to find how many tickets he must sell in a day to earn at least $115.Solve. according to laplace's law: group of answer choices should remain inflated because the pressure inside of the alveoli is greater than atmospheric pressure should remain in a stable state should increase gas exchange during inhalation The sun was approaching the long mesa where it disappeared during the winter. what type of figurative language is included in this passage? hyperbole metaphor personification simile please helpcould you measure the volume of an object with a cube shape using the overflow can explain your answer. how far will you go (km) in 3 min traveling 60 km/hr? Simplify the following: (4x + 3) -2(4x - 7) - 3(x +7) Find the area of the prism in the figure shown. Solve for y.|6y + 12| = -18 True or False: Blood sugar would be lower than normal if the liver continually converted sugars into carbohydrates regardless of the amount of insulin circulating in the blood.