Answer:
The program to the given question as follows:
Program:
import java.util.*; //import package for user input.
public class Main //defining class Main
{
public static void main(String[] as) //defining main method
{
final double over_time_factor = 1.5; //define final variable
double number_Of_hours,wages,total_Wages=0; //defining variables
System.out.println("Enter hours and wages rate:"); //print message
Scanner obc = new Scanner(System.in); //creating Scanner class object for user input
number_Of_hours = obc.nextDouble(); //taking input
wages = obc.nextDouble(); //taking input
if(number_Of_hours>40) //check condition if number_Of_hours greter then 40
{
total_Wages=40*wages+(number_Of_hours-40)*wages*over_time_factor; //calculate value
}
else //else part
{
total_Wages = number_Of_hours*wages; //calculate total_Wages
}
System.out.println("Total Wages: $"+total_Wages); //print value
}
}
Output:
Enter hours and wages rate:
12
3
Total Wages: $36.0
Explanation:
In the above java program, the package is first imported into the user input and then the class is defined and inside this, the main method is defined, that defines a double type final variable "over_time_factor" is defined that holds a value "1.5", Then double type variable is defined that are " number_Of_hours, wages, and total_Wages", in which first two variables are used for taking input from the user and the third variable is used to calculate their values. After taken input from the user, the conditional statement is used that can be defined as follows:
Answer:
vowels = ("a", "e", "i", "o", "u")
word = input("Enter a word: ")
is_all = True
for c in vowels:
if c not in word:
is_all = False
if is_all == True:
print(word + " is a vowel word.")
else:
print(word + " is not a vowel word.")
Explanation:
Initialize a tuple, vowels, containing every vowel
Ask the user to enter a word
Initially, set the is_all as True. This will be used to check, if every vowel is in word or not.
Create a for loop that iterates through the vowels. Inside the loop, check if each vowel is in the word or not. If one of the vowel is not in the vowels, set the is_all as False.
When the loop is done, check the is_all. If it is True, the word is a vowel word. Otherwise, it is not a vowel word.
Answer:
Return are predicted in the modern microprocessor as, branch predictor is the modern method for the processor for the prediction. The basic function of the branch predictor is improving in the pipeline instruction. It is basically the important part for implement the execution and the pipe lining. And the return predicted uses the call by reference technique for the data in instruction.
Answer:
Must use mutators to initialize class data.
May use assignment statements to initialize class data.
Explanation:
These are the two characteristics that are present in constructors. A constructor is an instance method of a class or structure that creates an object of the class to which it belongs. This is mostly used in object-oriented programming. These constructors usually have the same name as the actual class, and can be used in order to set the values of the members of an object.
Answer:
the word processing
Explanation:
the word is a good word
Paging disk 98%
Other I/O devices 10%
For each of the following, indicate yes or no to say whether or not it will (or is likely to) improve CPU utilization:
a. Install a faster CPU
b. Install a bigger paging disk
c. Increase the degree of multiprogramming
d. Decrease the degree of multiprogramming
e. Install more main memory
f. Install a faster hard disk
g. Increase the page size
Answer:
a. Install a faster CPU - No
b. Install a bigger paging disk - No
c. Increase the degree of multiprogramming - No
d. Decrease the degree of multiprogramming - Yes
e. Install more main memory - Yes
f. Install a faster hard disk - Yes
g. Increase the page size - Yes
Explanation:
a. Install a faster CPU No.
Installing a faster CPU will not improve CPU utilization too much because the CPU utilization is low (20%) and the utilization of the paging disk is very high (98%), we can see that the system has lack of free memory.
b. Install a bigger paging disk No.
Installing a bigger paging disk doesn't improve the CPU utilization because the system has lack of free memory.
c. Increase the degree of multiprogramming No.
If the level of multiprogramming is increased more processes would have to be swapped in and out of the memory with a higher chance of page fault much frequently and the CPU utilization would reduce.
d. Decrease the degree of multiprogramming Yes.
If the level of multiprogramming is reduced less processes would have to be swapped in and out of memory, reducing the chance of page fault and the CPU utilization would improve.
e. Install more main memory
This is likely to improve CPU utilization as more pages can remain resident and not require paging to or from the disks.
f. Install a faster hard disk
With a faster hard disk, the CPU will get more data more quickly and this will lead to faster response and more throughput to the disks. With a faster hard disk, the disk is not a bottleneck to utilization.
g. Increase the page size
Increase the page size will likely degrade the performance, because the internal fragmentation will be worse, the utilization of main memory will be low, more processes will not be able to fit into main memory, and the system will have to spend more time in swapping. So this is as likely to decrease utilization as it is to increase it.
O Tim McGraw
O Alan Jackson
O Billy Currington
Answer: Tim McGraw
Explanation:
The National FFA Organization is a youth organization that originally aimed to encourage the youth to venture into agriculture by offering agriculture education to youth in high schools and middle schools. In recent years they started offering education in other areas such as business and technology.
The FFA is quite famous and has had and still has a lot of members. It is of no surprise therefore that some of their alumni are now stars. Famous Country musician Tim McGraw is one such alumni and he was a member of the FFA in his hometown of Start, Louisiana.
Other stars who were part of the FFA include; Taylor Swift and Sterling Martin.