1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Tcecarenko [31]
3 years ago
8

What is a parameter variable?

Computers and Technology
1 answer:
max2010maxim [7]3 years ago
6 0

Answer:

Option c: A variable that is declared in the header of a method.

is correct answer.

Explanation:

  • Parameter variable is also known as Reference variable. They are used while dealing with functions, methods or procedures in order to pass the value(variable) to the method and getting the output value back as return.
  • The parameter variable is written in front of the method's name inside the parenthesis, in the method's header indicated by keyword "var".
  • Parameter variables are infact the assumed names for actual arguments that are given by calling routine.
  • Passing parameter variables to a function is further divided into two parts:
  1. Pass by reference
  2. Pass by value

i hope it will help you!

You might be interested in
Create a class called Hokeemon that can be used as a template to create magical creatures called Hokeeemons. Hokeemons can be of
Viefleur [7K]

Answer:

See Explaination

Explanation:

/*****************************************Hokeemon.java********************************/

import java.io.File;

import java.io.FileNotFoundException;

import java.util.Scanner;

public class Hokeemon {

private String name;

private String type;

private int age;

public Hokeemon(String name, String type, int age) {

super();

this.name = name;

this.type = type;

this.age = age;

}

public Hokeemon() {

this.name = "";

this.type = "";

this.age = 0;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public String getType() {

return type;

}

public void setType(String type) {

this.type = type;

}

public int getAge() {

return age;

}

public void setAge(int age) {

this.age = age;

}

public String liveIn() {

if (this.type.equalsIgnoreCase("dwarf")) {

return "Mountain";

} else if (this.type.equalsIgnoreCase("elf")) {

return "Dale";

} else if (this.type.equalsIgnoreCase("fairy")) {

return "Forest";

} else {

return "Shire";

}

}

public boolean areFriends(Hokeemon other) {

if (this.type.equalsIgnoreCase(other.type)) {

return true;

} else if ((this.type.equalsIgnoreCase("dwarf") && other.type.equalsIgnoreCase("elf"))

|| (this.type.equalsIgnoreCase("elf") && other.type.equalsIgnoreCase("dwarf"))) {

return true;

} else if ((this.type.equalsIgnoreCase("hobbit") && other.type.equalsIgnoreCase("fairy"))

|| (this.type.equalsIgnoreCase("fairy") && other.type.equalsIgnoreCase("hobbit"))) {

return true;

} else {

return false;

}

}

public static Hokeemon[] getData(String file) {

Hokeemon[] hokeemons = new Hokeemon[8];

int i = 0;

try {

Scanner scan = new Scanner(new File(file));

while (scan.hasNextLine() && i < hokeemons.length) {

String line = scan.nextLine();

String[] data = line.split("\\s+");

String name = data[0];

String type = data[1];

int age = Integer.parseInt(data[2]);

hokeemons[i] = new Hokeemon(name, type, age);

i++;

}

scan.close();

} catch (FileNotFoundException e) {

System.err.println(e);

}

return hokeemons;

}

public static String getBio(Hokeemon[] hokeemons) {

String s = "";

for (Hokeemon hokeemon : hokeemons) {

s += "I am " + hokeemon.getName() + ": Type " + hokeemon.getType() + ": Age=" + hokeemon.getAge()

+ ", I live in " + hokeemon.liveIn() + "\n";

s += "My friends are: ";

for (Hokeemon hokeemon2 : hokeemons) {

if (hokeemon.areFriends(hokeemon2) && !hokeemon.equals(hokeemon2)) {

s += (hokeemon2.getName() + " ");

}

}

s += "\n";

}

return s;

}

atOverride

public String toString() {

return "Name " + name + ": Type " + type + ": Age=" + age + "\n";

}

}

/*******************************HokeemonMain.java**************************/

import java.util.Arrays;

public class HokeemonMain {

public static void main(String[] args) {

Hokeemon[] hokeemons = Hokeemon.getData("data.txt");

System.out.println(Arrays.toString(hokeemons));

System.out.println(Hokeemon.getBio(hokeemons));

}

}

/**********************************data.txt********************/

Noddy Dwarf 4

Legolas Elf 77

Minerva Fairy 33

Samwise Hobbit 24

Merry Hobbit 29

Warhammer Dwarf 87

Ernedyll Elf 19

Frodo Hobbit 18

3 0
3 years ago
Every chart has a corresponding ____ that contains the numerical data displayed by the chart.
katen-ka-za [31]

Answer:

B) Worksheet

Explanation:

In Microsoft Excel and all the other spreadsheet applications, a worksheet is  a file that contains cells, the cells are an intersections of rows and columns, and it provides the interface where the users can input and modify data, because of the row/column nature of worksheets, a table structure can easily be developed for the organization of data/information from where they can be plotted to a chart. Hence every chart has a corresponding worksheet containing its numerical data.

4 0
3 years ago
Inc AX,2 is valid in assembly language ?
masya89 [10]

Answer:

in most so yes

Explanation:

4 0
2 years ago
Like when writing a paragraph, the subject becomes the __________ of the photograph.
Natali5045456 [20]
It is A, the theme is the subject.
8 0
3 years ago
Statement: There are two files. One file, "badIP_list.txt" has a listing of known bad IP addresses. These addresses were extract
lapo4ka [179]

Answer:

See explaination

Explanation:

SOURCE CODE IN PYTHON:

inp=open('badIP_list.txt', 'r') #opening file for input

badIPs=[i.rstrip('\n') for i in inp.readlines()] #reading bad IPs

inp.close() #closing file

inp=open('server_logs.txt', 'r') #opening file for input

IPs=[i.rstrip('\n') for i in inp.readlines()] #reading all IPs from log

inp.close() #closing file

uniqueBadIPs=[] #to store unique bad IPs

countBadIPs=0 #to store count of bad IPs

countIPs=0 #to store count of all IPs

for IP in IPs: #iterating through the log of IPs

if IP in badIPs: #checking if IP is bad

countBadIPs+=1

if IP not in uniqueBadIPs: #checking if bad IP is unique

uniqueBadIPs.append(IP)

countIPs+=1

out=open('filter_list.txt', 'w') #opening file for output

out.write('_________________________________________________________\n')

out.write('Date : 26/07/2018\nName : Last, First\nMajor: CS\n\n')

out.write('Server logs contained these known bad IP addresses:\n')

for IP in uniqueBadIPs: #output the unique bad IPs

out.write(IP+'\n')

out.write('\n')

out.write('Total unique known bad IP\'s detected:\n'+str(len(uniqueBadIPs))+'\n\n')

out.write('Percentage of bad IP addresses in server logs:\n{:.2f}%\n'.format(countBadIPs*100/countIPs))

out.write('_________________________________________________________')

out.close() #closing file

5 0
3 years ago
Other questions:
  • . What physical characteristic does a retinal scan biometric device measure?
    8·1 answer
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • Mention five features of word processing application​
    10·1 answer
  • What event in the 1970s contributed to the current
    6·2 answers
  • Rainfall_mi is a string that contains the average number of inches of rainfall in Michigan for every month (in inches) with ever
    12·1 answer
  • Which wildcard characters will return a single character when using the Find dialog box?
    6·2 answers
  • Select the correct answer.
    14·2 answers
  • A network systems administrator would most likely help with
    13·2 answers
  • Which item is essential to know before sketching a navigation menu flowchart?
    7·2 answers
  • 9.11: Array Expander
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!