C: bar graph
bar graphs are used to track changes over time, so I would say that C is your best bet
Access hundreds of professional development resources for museum professionals. Museum professionals can benefit at any career stage from student to retiree. Student Membership. Industry Membership. Established Since 1906. Museum Memebership. 501(c)3 Nonprofit Org.
Answer:
c. decDiscount = GetDiscount(decSales, decRate)
Explanation:
Option a. is incorrect because it is using Call word which is not a valid way to invoke a function.
Similarly option b. is also incorrect because it uses Call word to invoke function GetDiscount() which is not a valid way to call a function and also it is passing it the contents of three variables decSales, decRate and decDiscount and as mentioned in the question only two parameters are to be passed to GetDiscount() function.
Option c. is correct as it invokes the function GetDiscount() and passes it the contents of two variables decSales and decRate and assigns this to a variable decDiscount. For example if the GetDiscount() method has to calculate the discount using decSales and decRate then the resultant value of this computation is assigned to decDiscount. So whatever this function returns or computers is assigned to and stored in decDiscount variable. So this is a valid way to invoke a method.
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class num4 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("How many numbers? ");
int n = in.nextInt();
int []intArray = new int[n];
//Entering the values
for(int i=0; i<intArray.length;i++){
System.out.println("Enter the numbers");
intArray[i]=in.nextInt();
}
System.out.println(Arrays.toString(intArray));
int min =intArray[0];
for(int i =0; i<intArray.length; i++){
if(min>intArray[i]){
min = intArray[i];
}
}
System.out.println("The Minimum of the numbers is "+min);
}
}
Explanation:
- Using Java programming language
- Prompt the user for the number of values
- Using Scanner class receive and store in a variable
- Create an array of size n
- Using an for loop continuously ask the user to enter the integers
- Print the array of integers
- Using another for loop with an if statement, find the smallest element in the array of numbers
- Output the the smallest number