Mark the following statements as true or false. a) A double type is an example of a primitive data type. b) A one-dimensional list is an example of a structured data type. c) Lists can be passed as parameters to a method. d) A method can return a value of the type list. e) The size of a list is determined at compile time

Answers

Answer 1

Answer:

(a) true

(b) true

(c) true

(d) true

(e) false

Explanation:

(a) Primitive data types are the most basic data types in programming. They can hold only a single value. A double type is an example of a primitive data type. Other examples are integers, booleans, e.t.c

(b) A data is a structured type if each of its data items is a collection of other data items. A one-dimensional list is a great example.

(c) Parameters are used by methods to perform a specific task. About any data type could be used as a parameter to a method. Lists are no exemptions. For example, to write a method that sorts a list, the list could be passed as argument/parameter to that method.

(d) A method is allowed to return a single value. This value can be of any logical type such as a List, double, string e.t.c.

(e) A list is a dynamic or variable length array and as such its size is determined only at run time.


Related Questions

Consider the following code segment, where num is an integer variable.

int [][] arr = {{11, 13, 14 ,15},
{12, 18, 17, 26},
{13, 21, 26, 29},
{14, 17, 22, 28}};
for (int j = 0; j < arr.length; j++)
{
for (int k = 0; k < arr[0].length; k++)
{ if (arr[j][k] == num){System.out.print(j + k + arr[j][k] + " ");
}
}
}

What is printed when num has the value 14?

Answers

Answer:

Following are the complete code to the given question:

public class Main//main class

{

public static void main(String[] args) //main method

{

    int [][] arr = {{11, 13, 14 ,15},{12, 18, 17, 26},{13, 21, 26, 29},{14, 17, 22, 28}};//defining a 2D array

    int num=14;//defining an integer variable that holds a value 14

       for (int j = 0; j < arr.length; j++)//defining for loop to hold row value

       {

       for (int k = 0; k < arr[0].length; k++)//defining for loop to hold column value

       {

           if (arr[j][k] == num)//defining if block that checks num value

           {

               System.out.print(j + k + arr[j][k] + " ");//print value

           }

       }

       }

}

}

Output:

16 17

Explanation:

In the question, we use the "length" function that is used to finds the number of rows in the array. In this, the array has the 4 rows when j=0 and k=2 it found the value and add with its index value that is 0+2+14= 16.similarly when j=3 and k=0 then it found and adds the value which is equal to 3+0+14=17.So, the output is "16,17".  

Implement a class Rectangle. Provide a constructor to construct a rectangle with a given width and height, member functions get_perimeter and get_area that compute the perimeter and area, and a member function void resize(double factor) that resizes the rectangle by multiplying the width and height by the given factor

Answers

Answer:

Explanation:

The following code is written in Java. It creates the Rectangle class with the height and width variables. The constructor takes these variables as parameters to create Rectangle objects. It creates the get_perimeter method that sums up two of each side in order to get the perimeter of the Rectangle. A get_area method multiplies the height by the width to get the area. Finally, a resize method takes in a double factor variable and multiplies the height and the width by the factor to get a resized Rectangle object.

class Rectangle {

   double height, width;

   public Rectangle(double height, double width) {

       this.height = height;

       this.width = width;

   }

   

   public double get_perimeter() {

       return (this.height + this.height + this.width + this.width);

   }

   

   public double get_area() {

       return (this.height * this.width);

   }

   

   public void resize(double factor) {

       this.height *= factor;

       this.width *= factor;

   }

}

To convert microseconds to nanoseconds: a. Take the reciprocal of the number of microseconds. b. Multiply the number of microseconds by 0.001. c. Multiply the number of microseconds by 0.000001. d. Multiply the number of microseconds by 1,000. e. Multiply the number of microseconds by 1,000,000.

Answers

Answer: D. Multiply the number of microseconds by 1,000.

Explanation:

In order to convert microseconds to nanoseconds, it should be noted that one should multiply the number of microseconds by 1,000.

For example, if we want to convert 12 microseconds to nanoseconds. This will be:

= 12 × 1000

= 12000 nanoseconds.

Therefore, with regards to the information given above, the correct option is D.

The main part of your program has the following line of code.
answer = divide(30,5)
Which function finds the quotient of 30 and 5 and returns 6?

Answers

Answer: D

Explanation:

It is not A or C because the "d" in "Divide" is capitalized and the d is lowercase in calling the function. Therefore the answer is D (the last choice) because numA / numB (30 / 5) equals 6.

The major portion of the program has a line of code. The functions that find the quotient of 30 and 5 and returns 6 is as follows:-

def divide(numA, numB)

: return numA/numB

Thus, option D is correct.

What is program?

A computer program is a collection of instructions written in a programming language that a computer can execute. Software contains computer programs as well as documentation and other immaterial components. Source code refers to a computer system in its human-readable form.

Source lines of code, often known as lines of code, is an algorithm computes that counts the number of lines in the text of a computer program's source code to determine the size of the program.

It is not A or C since the "d" in "Divide" is uppercase, but the d in invoking the function is lowercase. As a result, D (the last option) is the correct solution, since numA / numB (30 / 5) = 6. Therefore, it can be concluded that option D is correct.

Learn more about the program here:

https://brainly.com/question/3224396

#SPJ2

Write the names of different types of communication.​

Answers

Answer:

There are four types of communication: verbal, nonverbal, written and visual.

To avoid legal issues and set clear guidelines and expectations for employees, employers should put which of the following in place?
Group of answer choices

Answers

Answer: social media policy

Explanation:

In order to avoid legal issues and also set clear guidelines and expectations for the employees in an organization, it is required that employers should put a social media policy in place.

A social media policy refers to a document which outlines how an organization and the employees will behave and conduct themselves online. This helps to checkmate and curtail the activities of the employees so that there won't be a detrimental effect on the organization.

State ant two reasons why information should be saved on the computer. ​

Answers

Having duplicate copies of your most important information saved in a remote location keeps it safe in case anything goes badly wrong with your computer. When you think about it there are a number of ways files can be lost unexpectedly.

quired to the weight
you
4. Your deodorant sprays with a force of 15 N. What mechanical advantage is
achieved if your finger presses the deodorant nozzle with a force of 60 N?
Explain your answer.
[TOTAL: 201​

Answers

Answer:

The mechanical advantage is 0.25

This mechanical advantage shows that the force at which the deodorant sprays is the quarter of the applied effort, and hence the efficiency of your finger as a machine is 25%.

Explanation:

Given;

output force, F₂ = 15 N

input force, F₁ = 60 N

Mechanical advantage also known as force ratio is defined as the ratio of the output force (load) to the ratio of input force (effort).

[tex]M.A = \frac{0utput \ Force}{1nput \ Force} \\\\M.A = \frac{15 \ N}{60 \ N} \\\\M.A = 0.25[/tex]

This shows that the force at which the deodorant sprays is the quarter of the applied effort, and hence the efficiency of your finger as a machine is 25%.

Select the correct answer
What kind of approach should you follow to create a website a visually challenged person as well as a person with normal vision can use
with ease?

Answers

As a visually disabled person my self (if you want to check it out I have something called Aniridia) I love when websites have tabs easy to identify each category of the website. Additionally, when websites have clear bold titles and not to many words close together (it really do be putting strain on ones eye when that happens so having separated paragraphs is awesome if the website has words) but other than that it’s all I could think of from my POV. Hope this helps you :)

Answer:

Understand web standards and code using XHTML.

Explanation:

trust me

A form of payment that is guaranteed to be as good as cash is a

Answers

Answer:

bank check

A bank check, more commonly known as cashier's check, is a payment order which is issued against the bank's fund rather than any individual account holder's deposit with the bank.

plsssssss mark me brianliest

helplpl,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Answers

With what??????????????

Why do we use functions?
To stop the program from repeating.
To test for true and false.
To simplify code.
To ask the user for input.

Answers

to stop the program from repeating :)
To stop the program from repeating. That is the answer

WILL GIVE BRAINLIEST + 50 points!!
Quincy would like to view the contents of a specific message in his Inbox. A portion of his computer screen is shown.


What should Quincy do in order to complete this task?

Click on the Inbox in the Navigation Pane, and click on the specific message in the Folder Pane to display its contents.
Click on the Inbox in the Outlook Today window, and click on the specific message in the Folder Pane to display its contents.
Double-click the message’s header in the Outlook Today window, and right-click on the specific message to display its contents.
Double-click the Mail option in the Navigation Pane, and right-click on the specific message to display its contents.

Answers

Answer:

i put a

Explanation:

Answer:

A

Explanation:

please mark brainliest i only need 1 more :/

How will Information Technology Fundamental improve on nursing career.​

Answers

Answer:

One of the primary ways that informatics has changed nursing practice is through documentation. ... Health informatics is also an important part of care coordination in nursing. The ability to track staffing, workflow and communication can help nurses to identify areas where current processes can be improved.

Answer:

The advancing in information technology and new devices have improved the quality of life for patients and health care professionals alike.

Explanation:

nurse burnout has been a factor in the shortage of nurses in the u.s. prolonged mental and physical exhaustion can cause nurses to feel streched thin which leads to nurses leaving their practice setting.

If you are writing an article on your favorite cuisine, which form of illustration would best fit the article?
Bill needs to make a presentation in which he has to represent data in the form of a pyramid. Which feature or menu option of a word processing program should Bill use?

Answers

Answer:

images

Explanation:

Adding images to the text gives it more life and makes the topic interesting

Create a new Java class called AverageWeight. Create two arrays: an array to hold 3 different names and an array to hold their weights. Use Scanner to prompt for their name and weight and store in correct array. Compute and print the average of the weights entered using printf command. Use a loop to traverse and print the elements of each array or use Arrays class method to print. Submit your code.

Answers

Answer:

//import the Scanner class

import java.util.Scanner;

//begin class definition

public class AverageWeight{

       //declare the main method

    public static void main(String []args){

     

       //declare the names array

       String [] names = new String [3];

       

       //declare the weights array

       double [] weights = new double [3];

       

       //Create an object of the Scanner class

       Scanner input = new Scanner(System.in);

       

       

       //create a loop to ask for the names and weights.

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

           System.out.println("Enter name " + (i+1));

           names[i] = input.next();

           

           System.out.println("Enter weight " + (i+1));

           weights[i] = input.nextDouble();

           

       }

       

       

       

       //find the sum of the weights

       double sum = 0.0;

       for(int j = 0; j< weights.length; j++){

           sum += weights[j];

           

       }

       

       //find the average

       double average = sum / weights.length;

       

       //print out the average of the weights

       System.out.printf("%s%f \n", "The average of the weights is ", average);

       

       

       //print out the elements of the names array

       System.out.println("Names : ");

       System.out.print("{ ");

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

           

           System.out.print(names[i] + " ");

           

       }

       System.out.print(" }");

       

       

       //print out the elements of the weights array

       System.out.println();

       System.out.println();

       System.out.println("Weights : ");

       System.out.print("{ ");

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

           

           System.out.print(weights[i] + " ");

           

       }

       System.out.print(" }");

       

     

    } //end of main method

   

   

} //end of class definition

Sample Output

>> Enter name 1

Peter

>> Enter weight 1

12.0

>> Enter name 2

Joe

>> Enter weight 2

23.4

>> Enter name 3

Paul

>> Enter weight 3

23.9

The average of the weights is 19.766667  

Names :  

{ Peter Joe Paul  }

Weights :  

{ 12.0 23.4 23.9  }

Explanation:

The code contains comments explaining important lines.

The source code file has been attached to this response.

A sample output has also been provided.

Design a base class, Road, with the following members:
.
Attributes for storing the road's name, number of lanes, and maximum speed limit.
A three-parameter constructor to initialize the three attributes
Accessors and Mutators (Gets and Sets) for each attribute.
Input Validation: You should ensure that the number of lanes is always a value greater
than 0, and that the maximum speed limit is a value between 0 and 100 MPH. This input
validation should apply to both the 3-parameter constructor and the individual accessor
functions
A display function that prints the road's information in a single line format

Design a derived class, TollRoad, which inherits from Road. It should have the following members:
.
An attribute for storing the toll for using the road.
A 4-parameter constructor to initialize the three attributes of the base class, as well as
the toll
Accessor and Mutator methods for the toll.
Input Validation: You should ensure that the toll is a value greater than 0.0. This validation
should apply to both the 4-parameter constructor as well as the individual accessor
An overridden display function that displays the information of the TollRoad in a two-line
format, where the first line displays basic Road information, and a second line specifies
the current toll

Answers

I've attached my Java implementation.

You are in the process of configuring a new computer. The motherboard has four memory slots and supports dual-channel memory. You install two memory modules. When you boot the computer, the BIOS recognizes both modules, but the memory is not configured to run in dual-channel mode. What should you do

Answers

Answer:

Place the modules in the appropriate slots on the motherboard.

Explanation:

You must install memory in the correct slots to use dual-channel memory. The two slots may be next to one other or alternate depending on the motherboard. For the correct configuration, consult the motherboard manual. Dual-channel support is primarily determined by the motherboard (e.g., the memory controller), rather than the memory. With Rambus RAM, continuity modules are employed; if they were necessary on this system, none of the memory would have been identified. Memory timing is based on the CAS latency. If the system is unstable with the current memory timing settings, you may want to change the timing.

how do you fix The lag on your zsnes emulator

Answers

Try resetting the phone if that doesn’t work do a hard reset

How do you answer a question that's already been answered?

Answers

there should still be a button that says answer

which key do you press on the keyboard to indent a statment
a. ctrl

b. shift

c. tab

d. enter

Answers

Answer:

c. TAB

Explanation:

Answer:

c

Explanation:

What is the difference between encryption and hashing?

Answers

Hashing and Encryption have different functions. Encryption includes encryption and decryption process while hashing is a one-way process that changes data into the message digest which is irreversible. ...

Hashing algorithm. A hash can simply be defined as a number generated from a string of text. ...

Encryption. ...

The difference between hashing and encryption. ...

Encryption and Hashing are both ways in which information is secured. The

differences between Encryption and Hashing include the following:

Encryption is a two- way process which involves encoding and decoding

while Hashing is a one way process  which involves encoding.

Encrypted information can be retrieved through decoding and getting a

plain text while Hashed information can't be retrieved as a plain text but as

hash value.

Read more about Encryption and hashing here https://brainly.com/question/9979590

What happens when in Word 2016 when the home ribbon tab is clicked on?

Answers

Answer: The home tab is opened up.

Explanation:

When using Word 2016 and the home ribbon tab is clicked on, the home tab is opened up. This tab houses the very basic functions of the word document, a lot of which have to be used if even a simple document needs to be typed.

This tab allows you to change the font as well as the font size and color. The page alignment is also set here as well as the text direction. Even headings can be customized here.

There are a lot more functions but the high level point is that the home tab is where the most basic of functions are, as shown in the attachment.

You are in the process of implementing a network access protection (NAP) infrastructure to increase your network's security. You are currently configuring the remediation network that non-compliant clients will connect to in order to become compliant. The remediation network needs to be isolated from the secure network. Which technology should you implement to accomplish this task

Answers

Answer:

Network Segmentation

Explanation:

The best technology to implement in this scenario would be Network Segmentation. This allows you to divide a network into various different segments or subnets. Therefore, this allows you to isolate the remediation network from the secure network since each individual subnet that is created acts as its own network. This also allows you to individually implement policies to each one so that not every network has the same access or permissions to specific data, traffic, speeds, etc. This would solve the issues that you are having and add multiple benefits.

Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lower even number. Hint: Use an if statement and the % operator to detect if n is odd, decrementing n if so. Enter an integer: 7 Sequence: 64 20 (2) If n is negative, output 0, Hint: Use an if statement to check if n is negative. If so, just set n = 0. Enter an integer: -1 Sequence: 0 Show transcribed image text (1) Given positive integer n, write a for loop that outputs the even numbers from n down to 0. If n is odd, start with the next lower even number. Hint: Use an if statement and the % operator to detect if n is odd, decrementing n if so. Enter an integer: 7 Sequence: 64 20 (2) If n is negative, output 0, Hint: Use an if statement to check if n is negative. If so, just set n = 0. Enter an integer: -1 Sequence: 0

Answers

Answer:

The program in Python is as follows:

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

if n < 0:

   n = 0

print("Sequence:",end=" ")

for i in range(n,-1,-1):

   if i%2 == 0:

       print(i,end = " ")

Explanation:

This gets input for n

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

This sets n to 0 if n is negative

if n < 0:

   n = 0

This prints the string "Sequence"

print("Sequence:",end=" ")

This iterates from n to 0

for i in range(n,-1,-1):

This check if current iteration value is even

   if i%2 == 0:

If yes, the number is printed

       print(i,end = " ")

In this lab, you open a file and read input from that file in a prewritten C program. The program should read and print the names of flowers and whether they are grown in shade or sun. The data is stored in the input file named flowers.dat. Instructions Ensure the source code file named Flowers.cpp is open in the code editor. Declare the variables you will need. Write the C statements that will open the input file flowers.dat for reading. Write a while loop to read the input until EOF is reached. In the body of the loop, print the name of each flower and where it can be grown (sun or shade). Execute the program by clicking the Run button at the bottom of the screen.

Answers

Answer:

#include <stdio.h>

#include <string.h>

void main( )

{

array flowerProp[2];

FILE *fp; // file pointer

char flower[255]; // creating a char array to store data

fp = fopen("flowers.dat","r");

if (fp == NULL){

   printf("File flower.dat does not exist");

   return;

}

// assuming the growing condition is next line to the flower name.

while(fscanf(fp, "%s", flower)!=EOF){

   flowerProp.push(flower);

   if (flowerProp.length == 2){

       printf("%s: %s\n ", flowerProp[0], flowerProp[1]);

       memset(flowerProp, 0,0);

   }

}    

fclose (fp );

}

Explanation:

The algorithm creates a pointer to the memory location to the file starting position, the character size is used to get a string from the file line by line. Then it opens and checks if the file exists.

If the file exists, the while gets the name and growth condition of the flower, saves it to an array, prints the name and condition, and clears the array for the next flower type in the loop.

Write a recursive method named power that accepts two integers representing a base and an exponent and returns the base raised to that exponent. For example, the call of power(3, 4) should return 34 or 81 . If the exponent passed is negative, throw an IllegalArgumentException. Do not use loops or auxiliary data structures; solve the problem recursively. Also do not use the provided Java pow method in your solution.

Answers

Answer:

The method in java is as follows:

   public static int power(int num, int exp){

       if(exp == 0){            return 1;        }

       if(exp < 0){

           throw new IllegalArgumentException("Positive exponents only");        }

       else{            return (num*power(num, exp-1));        }

   }

Where

[tex]num\to[/tex] base

[tex]exp \to[/tex] exponent

Explanation:

This defines the method

   public static int power(int num, int exp){

This represents the base case, where the exponent is 0

       if(exp == 0){

If yes, the function returns 1

           return 1;        }

If exponent is negative, this throws illegal argument exception

       if(exp < 0){

           throw new IllegalArgumentException("Positive exponents only");        }

If exponents is positive, this calls the function recursively

       else{            return (num*power(num, exp-1));        }

   }

Will mark brainliest plzz help

Answers

Answer:

planes

rendering engine

coordinate

frame range

i could be wrong....

10. This question refers to the chart from the previous question.
Which of the following conclusions is BEST supported by the scatter plot?
OOOO
A. Most dogs breeds have a maximum weight of 100 lbs or more
B. Most dog breeds have a maximum life span of 10 or fewer years
C. All dog breeds that weigh less than 50 pounds have a maximum lifespan of more than 10 years
D. No dog breeds that weigh more than 150 pounds are expected to live more than 10 years.

Answers

Answer: C. All dog breeds that weigh less than 50 pounds have a maximum lifespan of more than 10 years.

Explanation:

Looking at the scatter plot, it is shown that all dogs that weigh less than 50 pounds have a maximum lifespan that is above 10 years with a number of them even approaching 20 years.

This means that on average, dogs that weigh less tend to live longer than dogs that weigh more which as shown in the scatter plot have a lower lifespan the heavier they are.

Which output device would a teacher use to show
a movie to the class? Check all of the boxes that
apply.
braille embosser
3D printer
speakers
projector
DONE

Answers

Answer:

projector

Explanation:

The output device that would be used would be a projector. From the available options, this is the only option capable of showing a movie to the class. A projector "projects" (in other words sends an image) the movie that was inputted into the machine onto a screen. This allows a video image to be shown on the screen which the entire class can see. Speakers only output audio, 3D printers output physical objects, and a braille embosser only outputs braille onto paper.

Answer:

prejector and speakers

Explanation:

Other Questions
You are valuing multiple steady-state companies in the same industry. Company A is projected to earn $160 in EBITA, grow at 2 percent per year, and generate ROICs equal to 15 percent. Company B is projected to earn $160 in EBITA, grow at 6 percent per year, and generate ROICs equal to 10 percent. Both companies have an operating tax rate of 25 percent and a cost of capital of 10 percent. What are the enterprise-value-EBITA multiples for both companies 17. In the 1600s, a blacksmith could make a living by hand-forging horseshoes and nails. A diligent blacksmith couldmake one horseshoe in 12 minutes and a nail in 1 minute. In the 1600s, it would take the blacksmith 210minutes to complete a particular job. With advances in technology, the blacksmith was able to make ahorseshoe in 9 minutes and a nail in 40 seconds, and could complete the same job in 155 minutes. In theequations below, h represents the number of horseshoes in the job, and n represents the number of nails inthe job.12h + n = 2102n9h += 155How many nails were in the job the blacksmith completed? write down the coordinates of a point which lies in the second quadrant and 6 units far from both the axes what it means to be from Spain g The bursar a conducts a test of hypothesis that the mean amount of student debt a WCU undergrad will leave college with is equal to $10,000, versus the alternative that it is less than $10,000. The data leads to the rejection the null hypothesis. However, it is learned later that the mean is indeed $10,000. What type of error (if any) occurred Plz help me I'll give brainly and 60 points . If F(x) = log base5(2x,) find the Inverse of F(x)A) 5^y=2xB) 5^2y=xC) y = (5^x)/2 help with this question!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! big help someone clutch up for me.TIMED!! ames has 268 cookies to put into bags. Each bag holds 8 cookies.If James uses as many of the cookies as possible, how many bags can he make, and how many cookies are left over?Enter your answers in the boxes. If you get an 85% on a quiz and the quiz is 40 questions how many questions did you get right? Directions: In the box below, write your explanation of Equality 7-2521's point of view in Anthem, Chapter 12. Be sure to include a statement of Equality 7-2521's point of view a description of the details that support Equality 7-2521's point of view an explanation of what Equality 7-2521 has learned from his experience Calculate the total area of the figure below:24 cm24 cm218 cm216 cm2 how did boll weevil helped the war effort The dot plot shows 20 students scores on a quiz in English class.If one student from the class is chosen at random, what is the probability that he or she scored MORE than 15 points on the quiz?A 25B 112C 35D 18 I need help with this one asw MARKING BRAINLIEST IF RIGHT!1.) Which of the following characters dies in these chapters?A.) Victor FrankensteinB.) the monsterC.) Victor's motherD.) Elizabeth There are three major types of forests: rain forests, deciduous forests, and coniferous forests. The type of forest which develops in an area depends upon what? Write a recipe for happiness. What would the ingredients be? In what order and amounts would you add them? What instructions would you include for cooking/baking and serving? Samantha needs 9 feet of fencing to make repairs from a storm. If the hardware store sells fencing only in yards, how muchfencing does Samantha need?A. 6 yardsB. 27 yardsC. 3 yardsD.108 yards 2,6,18,54,162,486,1458.. find the term in position 12 (include all the steps, using the formula)