Answer: B. Since I usually make the wrong decision and the last two decisions I made were correct, I will reverse my next decision.
C. I am getting tired so I am probably not thinking clearly
Explanation:
Meta-Reasoning simply refers to the processes which monitor how our reasoning progresses and our problem-solving activities and the time and the effort dedicated to such activities are regulated.
From the options given, the examples of meta reasoning are:
B. Since I usually make the wrong decision and the last two decisions I made were correct, I will reverse my next decision.
C. I am getting tired so I am probably not thinking clearly
Answer:
// Here is SammysRentalPrice.java file
// import package
import java.util.*;
// class definition
class SammysRentalPrice
{
// main method of the class
public static void main (String[] args) throws java.lang.Exception
{
try{
// object to read value from user
Scanner scr=new Scanner(System.in);
// ask to enter rented minutes
System.out.print("enter rented minutes: ");
// read minutes
int min=scr.nextInt();
// find hours
int hour=min/60;
//reamining minutes
min=min%60;
// total cost
int cost=hour*40+min*1;
// print cost
System.out.println("total cost is: "+cost);
}catch(Exception ex){
return;}
}
}
Explanation:
Read rented minutes from user and assign it to variable "min".Find the hours from minutes and then update the remaining minutes.After this multiply hours with 40 and remaining minutes with 1.Sum them and this will be the cost of rented a sports equipment.
Output:
enter rented minutes: 145
total cost is: 105
Answer:
The method in Java is as follows:
public static int numUnique(int list[]) {
int unique = 1;
for (int i = 1; i < list.length; i++) {
int j = 0;
for (j = 0; j < i; j++) {
if (list[i] == list[j])
break;
}
if (i == j)
unique++;
}
return unique;
}
Explanation:
This line defines the numUnique method
public static int numUnique(int list[]) {
This initializes the number of unique elements to 1
int unique = 1;
This iterates through the list
for (int i = 1; i < list.length; i++) {
The following iteration checks for unique items
int j = 0;
<em> for (j = 0; j < i; j++) {
</em>
<em> if (list[i] == list[j]) </em><em>If current element is unique, break the iteration</em><em>
</em>
<em> break; </em>
<em> }
</em>
if (i == j)
unique++;
}
This returns the number of unique items in the list
return unique;
}
Answer:
1st buble goes to web address 2nd goes to browser 3rd goes to chat 4th goes to email
Explanation: