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
love history [14]
4 years ago
5

public class Questions { public static void main(String[] args) { System.out.print("Here "); System.out.println("There " "Everyw

here"); System.out.println("But not" "in Texas"); } } Refer to the class definition in Exam_Code_1. The program will print the word "Here" and then print
Computers and Technology
1 answer:
In-s [12.5K]4 years ago
6 0

Answer:

The output of this code can be given as follows:

Output:

Here There Everywhere

But notin Texas

Explanation:

In the give java code a class "Questions" is defined inside this class the main method is defined in the main method we use three print function that can be described as follows:

  • In the first print function, we print the message that is "Here".
  • In the second and third print function, we use println that print data or message in the next line that is "There Everywhere" and in the next line  "But not" and "in Texas".
You might be interested in
#1. List examples of where it matters whether items are in order (sorted).
garri49 [273]

Answer:

Have volunteers provide examples from their lists and explain why it matters that they are sorted. Such examples are:

Data collected by students

Data collected by researchers.

In schools to keep record of students

In the hospital to keep record of patients

At the airports to keep booking records straight.

Explanation:

It would not be easy to sort data by hand except by the use of computer. This is the biggest advantage of the computer.

3 0
3 years ago
The visitor's age is stored in the variable age, the day of the week is stored in a variable day, and the price in dollars is st
Hoochie [10]

Answer:

If a museum charges different prices based on the day of the week and age of the visitor. The pricing rules are shown below.

- On Tuesday and Thursday children 10 and under get in free ($ 0).

- For all other days and ages the cost is ten dollars ($ 10).

The code in python is;

if (day == 'Tuesday' or day == 'Thursday') and age <= 10:

   price = 0

else:

   price = 10

Explanation:

The logic of the algorithm suggests that that the conditional if-statement assigns zero to the price variable if the day variable is either Tuesday or Thursday and the child's age is 10 or below but assigns 10 to the price variable if the condition is not met.

4 0
3 years ago
Consider two different implementations, M1 and M2, of the same instruction set. There are three classes of instructions (A, B, a
kkurt [141]

Answer:

(a) Calculate the average CPI for each machine, M1, and M2

Average CPI = Cycles per Instruction * Frequency of each  Instruction

                     = CPI * F

For Machine M1:

Cycles per Instruction/ Clocks per Instruction =  (60%)* 1 + (30%)*2 + (10%)*4

                                                                        = (0.60) * 1 + (0.30) * 2 + (0.10) * 4

                                                                          = 0.6 + 0.6 + 0.4

                                                                          = 1.6

For Machine M2:

Cycles per Instruction/ Clocks per Instruction=  (60%)*2 + (30%)*3 + (10%)*4

                                                                         = (0.60) *2 + (0.30) * 3 + (0.10) *4        

                                                                         = 1.2 + 0.9 + 0.4

                                                                          = 2.5

(b) Calculate the average MIPS ratings for each machine, M1 and M2.

MIPS rating can be found by using this formula

MIPS rating = Instruction Count / Execution Time * 10^6

                   = Instruction count  / IC X CPI * Clock cycle time * 10^6

                   = IC X Clock rate  / IC X CPI X 10^6

                   = Clock Rate/(CPI * 10^6)

MIPS rating for Machine M1:

The clock rate for M1 is 80 MHz and CPI calculated in (a) is 1.6 So:

MIPS rating = (80 * 10^6) / (1.6 * 10^6 )

                   =  80000000/ 1600000

                   =  50

MIPS rating for Machine M2:

The clock rate for M1 is 100 MHz and CPI calculated in (a) is 2.5 So:

MIPS rating = (100 * 10^6 ) / (2.5 * 10^6 )

                   =  100000000 / 2500000

                  =  40

(c) Which machine has a smaller MIPS rating?

  • M2 has a smaller MIPS rating which is 40.

Which individual instruction class CPI do you need to change, and by how much, to have this machine have the same or better performance as the machine with the higher MIPS rating.

Machine M1 has the higher MIPS rating than M2 and in order to make M2 perform better than M1, the CPI of instruction class A should be modified. Lets change the instruction class A CPI to 1 in place of 2.

Then:

Cycles per Instruction/ Clocks per Instruction= (60%)*1 + (30%)*3 + (10%)*4

                                                                       = (0.60 * 1) + (0.30 * 3) + (0.10 * 4)

                                                                       = 0.60 + 0.9 + 0.4

                                                                       = 1.9

Average MIPS rating = (100 * 10^6) / (1.9 * 10^6 )

                                   = 100000000 / 1900000

                                   =  52.6

Average MIPS rating is of M2 after changing instruction class A CPI is 52.6 which is better than the average MIPS rating of M1 which is 50.0

4 0
3 years ago
Tipos de lenguajes relacionados con c++?
Ber [7]

Answer:

Programación Java, Programación Python, Ruby

Explanation: Porque ellas son ...

3 0
3 years ago
Is doing free lancing from age 16 good or bad?​
Art [367]

Answer:

I think it's good. It will serve as an experience for you. Having experience at an early age is better as you could be at your best before you go into the field that you want. Plus free lancing wouldnt tie you down, gives you more freedom. And extra income(?). ^^

8 0
3 years ago
Other questions:
  • The system should enable the staff of each academic department to examine the courses offered by their department, add and remov
    14·1 answer
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • ____ is an object-oriented programming language from Sun Microsystems which allows small programs called applets to be embedded
    13·1 answer
  • Which of the following is an example of joint problem solving?
    12·1 answer
  • Catastrophic injuries and illnesses account for two-thirds of total health care costs in the country of Gnut. The Gnuti governme
    15·1 answer
  • Study the following two class interfaces: class Question { public: Question(); void set_text(string new_text); void set_answer(s
    11·1 answer
  • BIOS has two jobs. One is to boot up, or start, the computer. What is the other? Maintain the computer’s software firewall. Ensu
    5·1 answer
  • Think of a genre (science, music, math, sports, video games, etc.) and create at least 10 questions. You can decide whether you
    12·2 answers
  • Write a function that will sum all of the numbers in a list, ignoring the non-numbers. The function should takes one parameter:
    8·1 answer
  • Mark just finished reading the cay and must write a book report comparing events in the book to events in his life. based on eac
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!