Fix the 2 error codes.
1 // DebugSix2.java
2 // Display every character between Unicode 65 and 122
3 // Start new line after 20 characters
4 public class DebugSix2
5 {
6 public static void main(String args[])
7 {
8 char letter;
9 int a;
10 final int MIN = 65;
11 final int MAX = 122;
12 final int STOPLINE1 = 85;
13 final int STOPLINE2 = 122;
14 for(a = MIN; a <= MAX; a++)
15 letter = (char)a;
16 System.out.print(" " + letter);
17 if((a == STOPLINE1) & (a == STOPLINE2))
18 System.out.println();
19 System.out.println("\nEnd of application")
20 }
21 }
1 // DebugSix4.java
2 // Displays 5 random numbers between
3 // (and including) user-specified values
4 import java.util.Scanner;
5 public class DebugSix4
6 {
7 public static void main(String[] args)
8 {
9 int high, low, count;
10 final int NUM = 5;
11 Scanner input = new Scanner(System.in);
12 // Prompt user to enter high and low values
13 System.out.print("This application displays " + NUM +
14 " random numbers" +
15 "\nbetween the low and high values you enter" +
16 "\nEnter low value now... ");
17 low = input.nextInt();
18 System.out.print("Enter high value... ");
19 high = input.nextInt();
20 while(low == high)
21 {
22 System.out.println("The number you entered for a high number, " +
23 high + ", is not more than " + low);
24 System.out.print("Enter a number higher than " + low + "... ");
25 high = input.nextInt();
26 }
27
28 while(count < low)
29 {
30 double result = Math.random();
31 // random() returns value between 0 and 1
32 int answer = (int) (result * 10 + low);
33 // multiply by 10 and add low -- random is at least the value of low
34 // only use answer if it is low enough
35 if(answer <= low)
36 {
37 System.out.print(answer + " ");
38 ++count;
39 }
40 }
41 System.out.println();
42 }
43 }

Answers

Answer 1

Answer:

See Explanation

Explanation:

Considering the first program: DebugSix2.java

The following statement needs to be terminated

System.out.println("\nEnd of application")

as

System.out.println("\nEnd of application");

Then, the loop needs to be enclosed as this:

for(a = MIN; a <= MAX; a++){

letter = (char)a;

System.out.print(" " + letter);

if((a == STOPLINE1) & (a == STOPLINE2))

System.out.println();}

Considering the first program: DebugSix4.java

You only need to initialize variable count to 0 as this:

count = 0

I've added the correct source code as an attachment


Related Questions

Shana works for a company that makes industrial kitchen equipment that is sold to cafeterias and restaurants. She helps the company’s sales representatives create presentations for clients. They regularly use a custom PowerPoint template to craft their pitches. The sales reps have asked for a slide that will allow them to add a diagram showing the benefits of the equipment they sell.

What steps should Shana take to meet the needs of the company’s sales representatives?

Insert a slide for a diagram each time a sales rep needs to create a new presentation.
In the template’s Slide Master tab, use Master Layout to pick a placeholder for a diagram.
In the template’s Slide Master tab, select Insert Layout, name the layout, and insert a placeholder.
Save a brand-new presentation using the template, select Insert, and choose Charts from the Illustrations command group.

Answers

Answer:

Its C on edg

Explanation:

100%

Answer:

c

Explanation:

write algorithm to find (a+b)^2=(a+b)*(a+b)​

Answers

Answer:

Basically

(a+b)^2 = a^2 + b^2 + 2ab

Explanation:

steps

       1: start

       2: read a value

        3: read b value

        4: c=(a+b)*(a+b);

        5: print  c value

         6:end

Which number is equivalent to 72.5e-2?
0.725

72.5

7.25

7250

Answers

Answer:

.725

Explanation:

You are going back 2 spaces.

Answer:

0.725

Explanation:

Edge 2022

his exercise creates a program to convert the temperature values form Fahrenheit to Celsius for a list of 10 temperature values between -10° and 75°. The program shall have the following features:1. Create a temperature list that contains 10 values ranging from -10° to 75°.2. Create a function to convert temperature values from Fahrenheit to Celsius.3. Create a while-loop to index the temperature value item in the list and call the function to calculate the temperature value in Celsius.4. Print the temperatures in the format of:32 degrees Fahrenheit = 0 degrees Celsius

Answers

Answer:

def fahrenheit_to_celsius(temperature):

   c = (temperature - 32) / 1.8

   return c    

temperature_list = [-10, -5, 0, 10, 20, 32, 40, 50, 60, 75.2]

i = 0

while i < 10:

   print(str(temperature_list[i]) + " degrees Fahrenheit = " + str(fahrenheit_to_celsius(temperature_list[i])) + " degrees Celsius")

   i += 1

Explanation:

*The code is in Python.

Create a function named fahrenheit_to_celsius that takes one parameter, temperature

Convert the temperature to celsius using the formula

Return the result of the conversion

Create a list holding ten temperatures

Create a while loop that iterates 10 times. Inside the loop, call the function to convert the each temperature in the list and print the result

html tags are surrounded by which types of brackets​

Answers

Right brackets example

A top priority of the Federal Bureau of Investigation (FBI) is protecting Internet users from what?
A.) spam marketers
B.) online predators
C.) viruses
D.) unsecured networks

Answers

Answer:

b

Explanation:

Answer:

B. Online Predators

Explanation:

differences between laptop andhandheld conputer​

Answers

Answer: a conputer has a moniter and a mouse and laptop doesn't

Explanation:

Why is it important for element IDs to have meaningful names?

Answers

Answer:

Explanation:

In programming, it is very important that element ID's have meaningful names because it allows anyone reading the code to be able to easily identify what that element is and where it is most likely to be found in the code. This also applies to variables in every programming language. The clearer and more unique the name is the easier it becomes to know what that variable or element ID is representing which ultimately makes reading and debugging the code that much easier. This means that the entire process becomes more efficient as well.

It is vital for element IDs to have meaningful names due to the fact that it allows easy identification of the codes.

Element IDs refer to the id property of the interface of the element. It should be noted that the id property is unique in a document.

Element IDs should have meaningful names due to the fact that it allows east identification of the codes. This makes it easy for the person reading the code to identify them easily. The uniqueness of an element ID is vital to know what it represents.

Read related link on:

https://brainly.com/question/18173585

// DebugFive1
// Adds your lunch bill
// Burger and hot dog are $2.59
// Grilled cheese and fish are $1.99
// Fries are 89 cents
import java.util.*;
public class DebugFive1
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
final double HIGH_PRICE = 2.59;
final double MED_PRICE = 1.99;
final double LOW_PRICE = 0.89;
String usersChoiceString;
int usersChoice;
double bill;
System.out.println("Order please\n1 - Burger\n2 - Hotdog" +
"\n3 - Grilled cheese\n4 - Fish sandwich");
usersChoiceString = input.next();
usersChoice == Integer.parseInt(usersChoiceString);
if(usersChoice == 1 && usersChoice == 2)
bill = bill + HIGH_PRICE;
else
bill = bill + MED_PRICE;
System.out.println("Fries with that?\n1 - Yes\n2 - No";
usersChoiceString = input.next()
usersChoice = Integer.parseInt(usersChoiceString);
if (usersChoice = 1)
bill = bill + LOW_PRICE;
System.out.println("Bill is " + bill);
}
}

Answers

Answer:

See Explanation

Explanation:

The lines with incorrect syntax and corrections are:

1.

Line:

usersChoice == Integer.parseInt(usersChoiceString);

Error

The error is that a relational operator (==) is used instead of an assignment operator (=)

Correction

usersChoice = Integer.parseInt(usersChoiceString);

2.

Line:

System.out.println("Fries with that?\n1 - Yes\n2 - No";

Error:

The line requires a corresponding close bracket

Correction

System.out.println("Fries with that?\n1 - Yes\n2 - No");

3.

Line:

usersChoiceString = input.next()

Error:

The line is not terminated

Correction:

usersChoiceString = input.next() ;

4.

Line

if (usersChoice = 1)

Error

A relational operator is needed

Correction:

if (usersChoice == 1)

Lastly, you need to initialize bill to a value or prompt user for input.

I've added the full source code as an attachment

Declare Integer values[SIZE] = 1, 2, 3, 4, Debugging Exercises 1. What is the error in the following pseudocode? // This program uses an array to display five names Constant Integer SIZE = 5 Declare String names [SIZE] = "Meg", "Jack", "Steve "Bill", "Lisa" Declare Integer index For index = 0 To SIZE Display names[index] End For ​

Answers

Answer:

In "Declare String names [SIZE] =", Meg and Jack are done correctly, however for Steve and Bill, there is no ending quote after Steve, and no comma separating the two. More of a common problem than one would think

it should look more like

Declare String names [SIZE] = "Meg", "Jack", "Steve", "Bill", "Lisa"

If you cut a piece of text but intended to copy it, what command can you use to correct your error?

Format painter
Paste
Redo
Undo

Answers

Answer:

It should be undo, as the deleted text is pasted. You can then, copy it.

Answer:

undo

Explanation:

you can undo the cutting and copy instead

Please answer this please solve it

Answers

Answer:

If you still can't figure it out look this up

nvcc cafe problem

Explanation:

What is the name of the file in which this
program is stored: public class myProgram
A. myProgram.class
B. myProgram.java
C. myProgram.jgrasp
D. myProgram.doc

Answers

Answer:

B

Explanation:

i’m an information technology  student and as I remember we used this  name

Java Eclipse homework. I need help coding this

Project 5A - Mixed Results

package: proj5A
class: MixedResults

Create a new project called MixedResults with a class called Tester. Within the main method of Tester you will eventually printout the result of the following problems. However, you should first calculate by hand what you expect the answers to be. For example, in the parenthesis of the first problem, you should realize that strictly integer arithmetic is taking place that results in a value of 0 for the parenthesis.

double d1 = 37.9; //Initialize these variables at the top of your program
double d2 = 1004.128;
int i1 = 12;
int i2 = 18;

Problem 1: 57.2 * (i1 / i2) +1
Problem 2: 57.2 * ( (double)i1 / i2 ) + 1
Problem 3: 15 – i1 * ( d1 * 3) + 4
Problem 4: 15 – i1 * (int)( d1 * 3) + 4
Problem 5: 15 – i1 * ( (int)d1 * 3) + 4

Your printout should look like the following:

Problem 1: 1.0
Problem 2: 39.13333333333333
Problem 3: -1345.39999999999
Problem 4: -1337
Problem 5: -1313

Answers

Java clips homework I need help loading this create a new project called the mix results

Consider the following class declaration: public class Square { private double sideLength; public double getArea() { return sideLength * sideLength; } public double getSideLength() { return sideLength; } } Assuming that a no-arg constructor already exists, write an overloaded constructor for this class. It should accept an argument that is copied into the sideLength field. The parameter’s name is s.

Answers

Answer:

Here is the constructor:

public Square(double s) {  //constructor name is same as class name

sideLength = s;  } //s copied into sideLength field

Explanation:

The above constructor is a parameterized constructor which takes a double type variable s as argument. The name of constructor is same as the name of class.This constructor requires one parameters. This means that all declarations of Square objects must pass one argument to the Square() constructor as constructor Square() is called based on the number and types of the arguments passed and the argument passed should be one and of type double.

Here is where the constructor fits:

public class Square {

private double sideLength;

public Square(double s) {  

sideLength = s;  }

public double getArea() {

return sideLength * sideLength;}

public double getSideLength() {

return sideLength; } }

Which human job is most similar to the role of a producer

Answers

Answer: Directors

Explanation:  directors create motion pictures, television shows, live theater, commercials, and other performing arts productions. directors work under a lot of pressure, and many are under stress to finish their work on time.  Work hours for producers and directors can be long and irregular.

Write a method that will receive 2 numbers as parameters and will return a string containing the pattern based on those two numbers. Take into consideration that the numbers may not be in the right order.

Note that the method will not print the pattern but return the string containing it instead. The main method (already coded) will be printing the string returned by the method.

Remember that you can declare an empty string variable and concatenate everything you want to it.

As an example, if the user inputs "2 5"

The output should be:

2
3 3
4 4 4
5 5 5 5

Answers

Answer:

The purpose of the Java compiler is to translate source code into instructions  public static void main(String[] args)  Arity is the number of arguments passed to a constructor or method or the number ... and objects, which are the focus of object-based programs.  Remove the 2 from between the square brackets to make.

Explanation:

What is a social media scam?

Answers

Answer:

Internet fraud is a type of cybercrime fraud or deception which makes use of the Internet and could involve hiding of information or providing incorrect information for the purpose of tricking victims out of money, property, and inheritance.

Is when people do fraud on the internet to take people money

What if were are not going to use our middle finger in typing the letters E And I what do you think will happen​

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

To use keyboard effectively and in a good way, there are guidelines that how put the fingers of the hand on the keyboard to use it properly. On the keyboard, there are two buttons, F and J, where you can put your first finger on it, the remaining three fingers on the remaining buttons on the same line of the keyboard.  

If you do not use the middle finger in typing the letter E and I, then you can not easily use the keyboard, because, the alignment of keeping fingers on the button becomes misplaced and you then get started typing wrong words. and it also becomes uncomfortable for you while using the keyboard in this way.

Code a program that asks the user for a bank savings account balance and an annual interest rate that is paid to the account. You are to display what the balance will be after one year, after two years, and after three years. We can assume that the interest compounds annually (no need to ask for compounding criteria or use the natural number for continuously compounding interest, whew!) If the balance after adding the interest paid to the user exceeds $1000 then let the user know that they are now a silver bank club member. If it exceeds $5000 then let the user know that they are now a gold bank club member. If it exceeds $10000 then let the user know that they are now a platinum bank club member. If they qualify for any of these exclusive member statuses then you should tell them by how much they are exceeding the minimum balance for that status.
The interest rate will need to be input whole numbers (ex: 15), but *hint* remember that you will need to divide by 100 to obtain the rate expressed as a decimal.
A- The structure of the program must follow the sample programs provided in the text.
B- The program will need to provide clear, explicit instructions.
C- The program will need to display clear statements for the balance and exceeding amount for the exclusive club status for each year.

Answers

Answer:

is_silver = False

is_gold = False

is_premium = False

balance = float(input("Enter the balance: "))

rate = float(input("Enter the annual interest rate: "))

for i in range(3):

   balance += balance * 0.15

   print("The balance after " + str(i+1) + " year is $" + str(balance))

   

   if balance > 10000 and is_premium == False:

       print("You are now a premium bank club member.")

       is_premium = True

       print("You are exceeding " + str(balance - 10000) + "$ for that status")

   

   elif balance > 5000 and is_gold == False and is_premium == False:

       print("You are now a gold bank club member.")

       is_gold = True

       print("You are exceeding " + str(balance - 5000) + "$ for that status")

   

   elif balance > 1000 and is_silver == False and is_gold == False and is_premium == False:

       print("You are now a silver bank club member.")

       is_silver = True

       print("You are exceeding " + str(balance - 1000) + "$ for that status")

Explanation:

*The code is in Python.

Set the is_silver, is_gold and is_premium as False

Ask the user to enter the balance and rate

Create a for loop that iterates three times. Inside the loop:

Add the interest to the balance (cumulative sum)

Print the balance

Check the balance. If it is greater than 10000 and is_premium is False, state that the customer is a premium member, set the is_premium as True, and state how much s/he is exceeding the minimum balance for that status. If the balance is greater than 5000, is_gold is False and is_premium is False, state that the customer is a gold member, set the is_gold as True, and state how much s/he is exceeding the minimum balance for that status. If the balance is greater than 1000, is_silver is False, is_gold is False and is_premium is False, state that the customer is a silver member, set the is_silver as True, and state how much s/he is exceeding the minimum balance for that status.

What changes has Sue made so far? Check all that apply.

She added a chart title.
She changed the legend.
She added a title for the x-axis.
She changed the title of the y-axis.
She changed the x-axis column labels.
She changed the color of the chart style.

Answers

Answer:

She added a title for the x-axis.

She changed the x-axis column labels.

She changed the color of the chart style.

Explanation:

Correct on Edg

Question #1
Dropdown
Choose the word that makes each sentence true.
Asking the user for four numbers is an example of____.

Finding the average of the four numbers is an example of_____.
Telling the user the average is an example of_____.

O input
O output
O processing

Answers

Answer: Dropdown

Choose the word that makes each sentence true.

Asking the user for four numbers is an example of__input__.

Finding the average of the four numbers is an example of__processing___.

Telling the user the average is an example of__output___.

Explanation:

Following are the discussion to the given question:

Input is displayed by asking users for four digits. Any data or information that's also supplied to a system for analysis is referred to as input. Its statement, 'input' tells the system that it uses must enter some data before the software can proceed.The instance of processing is computing the mean of four numbers. In the CPU, computing is the conversion of input information to a more meaningful form of information.An instance of output is giving the user the average. It refers to information produced by and sent through a computer or another electronic device. The act of generating it, the amount generated, or the procedure through which something is given are all instances of output.

Therefore, the answer is "input, processing, and output".

Learn more:

brainly.com/question/2882943

A script meaning sound effects

Answers

You write sound effects in a screenplay by capitalizing the sound your making in the action line of the script. For example “Jackie SLAMS the door shut.” or “The tires SCREECHES across the street.”

You need to control the number of people who can be in an oyster bar at the same time. Groups of people can always leave the bar, but a group cannot enter the bar if they would make the number of people in the bar exceed the maximum of 100 occupants. Write a program that reads the sizes of the groups that arrive or depart. Use negative numbers for departures. After each input, display the current number of occupants. As soon as the bar holds the maximum number of people, report that the bar is full and exit the program.

Answers

Answer:

count = 0

while True:

   people = int(input("Enter the number of people arrived/departed: "))

   count += people

   

   if count == 100:

       print("The bar is full")

       break

   elif count < 100:

       print("There are " + str(count) + " in the bar currently")

   else:

       print(str(people) + " people cannot enter right now")

       print("The maximum capacity is 100!")

       count -= people

       print("There are " + str(count) + " in the bar currently")

Explanation:

*The code is in Python.

Set the count as 0

Create an indefinite while loop.

Inside the loop:

Ask the user to enter the number of people arrived/departed

Add the people to the count (cumulative sum)

Check the count. If the count is 100, stop the loop. If the count is smaller than 100, print the current number of people. Otherwise, state that they cannot enter right now. The capacity is 100 at most. Subtract the people from the count and print the current number of people.

Your computer crashed, and you lost many personal and work-related files. You just got a new computer, but you are now much more concerned about viruses and other security threats. Which strategy can help you protect your computer against virus attacks?

Answer choices

A Disable your Web browser's automatic security settings so you can manually control the content you download.

B Open email attachments only from unknown senders.

C Update the definitions on your anti-virus application frequently.

D Perform regular backups of your hard drive.



PLS HELP!
WILL MARK BRAINLIEST!
:)

Answers

Answer: c

Explanation:

c

So I would make sure you back up your device first before you mess with anything in your computer then keep your browsers security settings On just so random files don’t download that may have viruses in it your browser will let you know it there are any viruses in the content you download along with your computer and if you downloaded the program before then you are able to accept the download even if google says it’s a virus

The CPU is located on what part of the computer?

the motherboard

the system bus

the random access memory

the hard drive

Answers

Answer:

the motherboard

Explanation:

The answer for this question is the first one.

______ means locating a file among a set of files​

Answers

Locating a file among set of flies is called file system.

Is there anybody who knows eris quirk but me- i feel lonely rn ;-;

Answers

Answer:i do Eri's Quirk allows her to rewind an individual's body to a previous state. She has shown the ability to rewind someone's body to a point before they existed, which she accidentally did to her father.

Answer:rewind

..........

RAM
Clear sel
19. Which computer memory is used for storing programs and data
currently being processed by the CPU?
Mass memory
RAM
O Neo-volatile memory

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

The correct answer is RAM.

RAM is used for storing programs and data currently being processed by the CPU.  So, the data in the RAM, can be easily accessible and processed by the CPU more fastly.

While Mass memory and neo volatile memory is not correct options. because these types of memory can stores a large amount of data but CPU fetch data from these memories into RAM. and, RAM can only be used by the CPU when performing operations.

Ken has inserted an image into his PowerPoint presentation, but the image contains a lot of empty and/or unnecessary space. He needs to eliminate this space. Which option should he use to achieve this goal?

cut
copy
crop
adjust

Answers

Answer:

C. crop

Explanation:

Answer:

c

Explanation:

Other Questions
Which of the following is the classic hot and dry desert?a. arid desertb. coastal desertC. cold desertd. none of the abovePlease select the best answer from the choices providedBD What are the differences between the Big Bang Theory and the Steady State Theory? I need help on 7 to 10 If 10 milliliters of liquid has a mass of 70 grams, what is its density?O 7 g/mL70 g/mL0.7 g/mL700 g/mL PLEASE HELP FIND FUNCTION FOR PIECEWISE! 60! POINTS! ILL GIVE BRAINLIEST Question 4 (3 points)Which of the following structures would you not find in a prokaryotic cell?third Which city is closest to sea level? Which two countries colonized most of North America What is minus 6 plus 2?-484 A car is moving at 18 m/s when it accelerates at 8 m/s2 for 2 sec. What is his new velocity ? Graph the equation y(1/2)x using the stope and y-intercept A number x is twice its reciprocal. What is x^6? The local school bought $1,464 worth of notebooks for it's $1,464 worth of notebooks for it's students. If the notebooks cost $1.22 each how many notebooks did the $1,464 worth of notebooks for it students. If the notebooks cost $1.22 each how many notebooks did the school by?A. 1,220B. 1,250C. 1,500D. 2,500 The author was only arrested aftercommitting another minor crime.committing a violent crime.turning himself in multiple times.a video was released of him committing the crime. How would this graph MOST likely change if the price of a complementary good were to increase?A.The demand curve would shift to the left.B.The demand curve would shift to the right.C.The supply curve would shift to the left.D.The supply curve would shift to the right. Question 2 (1 point) More deaths occur in users than in other drug users combined;approximately 60% die from overdose, another 25% from infection, and the final15% from an act of violence.A) cocaineB) marijuanaC) alcoholD) heroinQuestion 3 (1 point)What is the best remedy to offset the effects of using too much alcohol? Solve the equation given x = - 4.5 = x + 9 I just bombed this test and i have 1 retake left. please help!! What is being compared in the following metaphor in Emersons self-reliance there is a time in every mans education when he arrives at the conviction that envy is ignorance Stomata are pores in the leaves of plants that allow gases to enter and exit the cells.During the sunniest part of the day, the leaves are most actively performing photosynthesis.During this time, which gas do the stomata allow into the leaf cells?