1 // Application contains a starting list of three products for sale2 // The user is prompted for additional items3 // After each new entry, the alphabetically sorted list is displayed4 import java.util.*;5 public class DebugNine36 {7 public static void main(String[] args)8 {9 ArrayListproducts = new ArrayList();10 products.add(shampoo);11 products.add(moisturizer);12 products.add(conditioner);13 Collections.sort(products);14 display(products);15 final String QUIT = "quit";16 String entry;17 Scanner input = new Scanner(System.in);18 System.out.print("\nEnter a product or " + QUIT + " to quit >> ");19 entry = input.nextLine();20 while(entry.equals("quit"))21 {22 products.add(entry);23 Collections.sort(products);24 display()25 System.out.print("\nEnter a product or " + QUIT + " to quit >> ");26 entry = input.nextLine();27 }28 public static void display(ArrayList products)29 {30 System.out.println("\nThe size of the list is " + products.size());31 for(int x = 0; x == products.size(); ++x)32 System.out.println(products.get(x));33 }34 }35//Debugging Exercises, Chapter 9;Java Programming, Joyce Farraell, 8th

Answers

Answer 1

Answer:

Here is the corrected code:

import java.util.*;

public class DebugNine36 {  //class name

  public static void main(String[] args)    {  //start of main method

     ArrayList<String>products = new ArrayList<String>();  //creates an ArrayList of type String names products

     products.add("shampoo");  //add shampoo to product array list

     products.add("moisturizer");  //add moisturizer product array list

     products.add("conditioner");  //add conditioner product array list

     Collections.sort(products);  //sort the elements in products array list

     display(products);  //calls display method by passing products array list

     final String QUIT = "quit";  //declares a variable to quit the program

     String entry;  //declares a variable to hold product/element or quit

     Scanner input = new Scanner(System.in);  //creates Scanner object

     System.out.print("\nEnter a product or " + QUIT + " to quit >> ");  //prompts user to enter a product or enter quit to exit

     entry = input.nextLine();  //reads the entry value from user

     while(!entry.equals("quit"))       {  //loops until user enters quit

        products.add(entry);  //adds entry (product) to products array list

        Collections.sort(products);  //sorts the elements in products array list

        display(products);  //calls display method by passing products arraylist

        System.out.print("\nEnter a product or " + QUIT + " to quit >> ");  //keeps prompting user to enter a product or enter quit to exit

        entry = input.nextLine();        }    }  //reads the entry value from user

  public static void display(ArrayList products)    {  // method to display the list of products

     System.out.println("\nThe size of the list is " + products.size());  //displays the size of the array list named products

     for(int x = 0; x < products.size(); ++x)  //iterates through the arraylist products

        System.out.println(products.get(x));    }  } //displays each item/element in products array list

Explanation:

In the code the following statement are corrected:

1.

ArrayListproducts = new ArrayList();

This gave an error: cannot find symbol

This is corrected to :

 ArrayList<String>products = new ArrayList<String>();

2.

         products.add(shampoo);

         products.add(moisturizer);

         products.add(conditioner);

Here shampoo moisturizer and conditioner are String type items that are to be added to the products so these strings have to be enclosed in quotation marks.

This is corrected to :

     products.add("shampoo");

     products.add("moisturizer");

     products.add("conditioner");

3.

display();

This method is called without giving any arguments to this method. The method display takes an ArrayList as argument so it should be passed the arraylist products to avoid error that actual and formal argument lists differ in length .

This is corrected to :

display(products);

The screenshot of output is attached.

1 // Application Contains A Starting List Of Three Products For Sale2 // The User Is Prompted For Additional

Related Questions

You have a large text file of people. Each person is represented by one line in the text file. The line starts with their ID number and after that, has the person's name. The lines are sorted by ID number in ascending order. There are n lines in this file. You write a search function that returns the name of a person whose ID number is given The simplest way to do that would be to program a loop that goes through each line and compares the ID number in the line against the given ID number. If there is a match, then it returns the name in that line. This is very inefficient, because the worst-case scenario is that this program needs to go through almost everyone the person we are looking for could be last. using the fact that he tli s sored wil greany speed up the processbus to use a birarysearch alkrhm We go to the middle line of the file first and compare the ID found there (P) to the given ID (Q). (f the number of lines is even, we go above or below the arithmetic middle.) if P=Q then our algorithm terminates . we have found the person we are looking for. If P is less than Q, that means that the person we are looking for is in the second half of the file. We now repeat our algorithm on the second half of the file. If P is greater than Q, that means that the person we are looking for is in the first half of the file. We now repeat our algorithm on the first half of the file.

Required:
Of what order is the worst-case number of comparison operations that needed for this algorithm to terminate?

Answers

Answer:

...............fp......

g Unlike when you create a String, when you create a StringBuilder, you must use the keyword ____________.

Answers

Answer:

Unlike when you create a String, when you create a StringBuilder, you must use the keyword new

Explanation:

Strings are used in programming which also opens the way for StringBuilder to be used too. In javascript, for instance, variables are useful for storing data, We have "Let" and "const" variables. Const variables cannot be changed after they’re created. The data stored are in types an example is a string. Strings allow one to write a value and store the result in a variable.

For example, using the dot operator, when you:

console.log('love'.length); // Prints 4

Note that console.log()  allows the computer to evaluate the expression inside the parentheses and print that result to the console.

.length prints 4 as the result. This shows how the string has a property that stores the number of characters in that string.

StringBuilder with the keyword "new" is used when we want to change or modify data property stored in a string.

Which of the following works on the pay-per-click (PPC) and cost-per-click (CPC) concept?
A. Google Adwords B. Technorati search C. Bing Ads D. Radian6

Answers

Answer:

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

Explanation:

The correct answer to this question is Google Adwords and Bing Ads.

First we need to know what is CPC and PPC.

Cost per click (CPC) is a paid advertising term used by Google where an advertiser pays a cost to the publisher for every click when an internet user will click on the advertisement or ad.

Cost per click is also called PPC (Pay per click). CPC is used to determine the costs of showing advertisements on the search engine, for example Google Adwords and Bing Ads. Bing Ads is microsoft advertising strategy on internet using PPC advertising strategy.

While other options are not correct because:

technorati search does not allow you to apply these concepts because it searches the list of blogs on the internet.

Radian6 is a social media monitoring platform for marketers to study customer opinions on their products in real-time.

Answer:

A

Explanation:

This is for plato

Which of the following is NOT a reason to include comments in programs?

a. Comments help the computer decide whether certain components of a program
are important.

b .Comments help programmers debug issues in their own code

c. Comments help document how code was written for other programmers to use

d. Comments enable programmers to track their work throughout the development
process

Answers

Answer:

A Would be correct!

Explanation:

The reason for this is because in a code when you use the comment out the compiler will skip over it and will not do anything and will skip it. So the comment can help the computer do anything!

HOPE THIS HELPED MAKE ME THE BRAINLIST!

Using programming concepts, the option that is NOT a reason to include comments in a code is:

a. Comments help the computer decide whether certain components of a program  are important.

-------------------------

Usually, codes are very long, and each person is responsible for a part of the problem. The parts have to be intervened with each other, and thus, sometimes a programmer will have to look at another part of the code, not coded by him. Thus, for the programmer and other people working in the project to understand, comments are important.Additionally, the comments are used to help the programmers debug their own code, as they can go part by part and see what is done in each part, also helping them work throughout the development process.In a program, there may be some components that end up not being necessary, but this is not decided by comments, and thus, option A is not a reason to include comments in programs.

A similar problem is given at https://brainly.com/question/13527834

Carlie was asked to review a software project for her company to determine specific deadlines. Which part of project management must she consider?

Analysis
Resources
Scope
Time

Answers

Answer:

Resources

Explanation:

Answer:

scope

Explanation:

Low level security is designed to detect and impede _____ some unauthorized external activity Some None Most All

Answers

Answer:

Low-level security is designed to detect and impede some unauthorized external activity.

Examples of low-level security systems include:

Basic physical obstacles to defense  Locks for increased-security  Simple lighting coverage  Standard alarm Systems

Explanation

Protection devices that prevent and track any unwanted external actions are called Low-Level security measures.

Other obstacles to the installation of the security system, such as reinforced doors, fences, high-security locks, and window bars and grates, are often installed after simple physical protection barriers and locks have been created.

Also, a simple lighting system that could not be more complex than the standard security lighting systems over windows and doors and a regular security warning system that will be an unattended unit that offers monitoring capability and sound warnings at the location of unwanted entry.

Storage facilities, convenience shops, and small business premises are some of the locations that incorporate low-level security devices.

Cheers

Why is important to know the parts of a computer system?

Answers

Answer:

so that you'll know how it works.

Explanation:

We are designing a program that must do the following:
Read 3 integers from a file called "data.txt"
Sum the integers
Compute the mean of the integers
Output the mean to a file called "mean.txt".
We are required to select functions from the library provided below to complete our program. Inside of the main () function, fill in the correct C statements to satisfy the four requirements listed above. You must fill in all the lines labeled with "statement x", where x is 2, 3, 4, 5, or 6. The first statement has been completed for you.
// These are the library functions that we must invoke!
// Precondition: The input file must already be open.
int read_integer (FILE *infile)
{
int number = 0;
fscanf (infile, "%d", &number);
return number;
}

int calculate_sum (int number1, int number2, int number3)

{
int sum = 0;
sum = number1 + number2 + number3;
return sum;
}

double calculate_mean (int sum, int number)
{
double mean = 0.0;
mean = ((double) sum) / number;
return mean;
}
// Precondition: The input file must already be open.
void print_double (FILE *outfile, double number)
{
fprintf (outfile, "%0.2lf\n", number);
}
// Fill in the appropriate statements for main ().
#include
int main (void)
{
int n1 = 0, n2 = 0, n3 = 0, sum = 0;
double average = 0.0;
FILE *infile = NULL, *outfile = NULL;
// We will not check to see if files were opened successfully; assume they are
infile = fopen ("data.txt", "r");
outfile = fopen ("mean.txt", "w");
______n1 = read_integer (infile)_________________________ // statement 1
_________________________________________________________ // statement 2 (2 pts)
_________________________________________________________ // statement 3 (2
pts)
_________________________________________________________ // statement 4 (2 pts)
_________________________________________________________ // statement 5 (2 pts)
_________________________________________________________ // statement 6 (2
pts)
fclose (infile);
fclose (outfile);
return 0;
}

Answers

Data input

1. number1 = read_integer (infile) //read number1

2. number2 = read_integer (infile); //read number2

3. number3 = read_integer (infile); //read number3

Data treatment

4. values = calculate_sum (int number1, int number2, int number3);

5. average =  calculate_mean (int values, int number);

Output values

6. print_double (FILE *outfile, double average);

Coupon collector is a classic statistic problem with many practical applications. The problem is to pick objects from a set of objects repeatedly and determine how many picks are needed for all the objects to be picked at least once. A variation of the problem is to pick cards from a shuffled deck of 52 cards repeatedly and find out how many picks are needed before you see one of each suit. Assume a picked card is placed back in the deck before picking another. Write a program to simulate the number of picks needed to get total of four cards from each different suit and display the four cards picked (it is possible that a card may be picked twice). Here is a sample run of the program:
4 of Diamonds
8 of Spades
Queen of Clubs
8 of Hearts
Number of picks: 9

Answers

Answer:

Here is the JAVA program:

public class Main {  //class name

public static void main(String[] args) {   //start of main method

//sets all boolean type variables spades, hearts diamonds and clubs to false initially

   boolean spades = false;  

   boolean hearts = false;

   boolean diamonds = false;

   boolean clubs = false;  

   String[] deck = new String[4];  //to store card sequence

   int index = 0;  //to store index position

   int NoOfPicks = 0;  //to store number of picks (picks count)

   while (!spades || !hearts || !diamonds || !clubs) {   //loop starts

       String card = printCard(getRandomCard());  //calls printCard method by passing getRandomCard method as argument to it to get the card

       NoOfPicks++;   //adds 1 to pick count

       if (card.contains("Spades") && !spades) {  //if that random card is a card of Spades and spades is not false

           deck[index++] = card;  //add that card to the index position of deck

           spades = true;  //sets spades to true

       } else if (card.contains("Hearts") && !hearts) {  //if that random card is a card of Hearts and hearts is not false

           deck[index++] = card;  

           hearts = true;   //sets hearts to true

       } else if (card.contains("Diamond") && !diamonds) {  //if that random card is a card of Diamond and diamonds is not false

           deck[index++] = card;

           diamonds = true;  //sets diamonds to true

       } else if (card.contains("Clubs") && !clubs) {  if that random card is a card of Clubs and clubs is not false

           deck[index++] = card;

           clubs = true;         }     }   //sets clubs to true

   for (int i = 0; i < deck.length; i++) {  //iterates through the deck i.e. card sequence array

       System.out.println(deck[i]);     }  //prints the card number in deck

   System.out.println("Number of picks: " + NoOfPicks);  }   //prints number of picks

public static int getRandomCard() {  //gets random card

   return (int) (Math.random() * 52); }   //generates random numbers of 52 range

public static String printCard(int cardNo) {   //displays rank number and suit

   String[] suits = { "Spades", "Hearts", "Diamonds", "Clubs", };  //array of suits

   String[] rankCards = { "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10",

           "Jack", "Queen", "King" };   //array of rank

  int suitNo = cardNo / 13;  //divides card number by 13 and stores to suitNo

 int rankNo = cardNo % 13;   //takes modulo of card number and 13 and store it to rankNo

   return rankCards[rankNo] + " of " + suits[suitNo];  }}  //returns rankCard at rankNo index and suits at suitNo index

Explanation:

The program is explained in the comments attached with each line of code. The screenshot of the program along with its output is attached.

Lola is friends with a boy she chats with in an online video game. Lola only knows the boy by his screen name and avatar. He only knows her in the same way. Lola is careful to make good choices when talking to someone online, even someone she thinks she knows well. The boy asks her the following questions in a recent chat room meet-up. Which questions should she not answer?

a
What kind of music do you listen to?
b
What is your favorite subject?
c
What is your realname?
d
Will you promise to keep our friendship a secret?

Answers

Answer:

I think the answer should be d.

C and d follow the computer SMART code.

The global communication network that allows computers to connect and pass through information is called?

Answers

Answer: Internet

Explanation:

Answer:

The Internet.

Explanation:

المساعد للWhat property of a metal describes its ability to be easily drawn into
a wire but not rolled into a sheet without splitting? iww.

Answers

Answer:

Ductility

Explanation:

Which of the following is NOT one of the four benefits of using email ?

Answers

Answer:

It allows people to filter or screen messages.

Explanation:

The option that is note one of the four benefits of using email is the knowledge of using computer is required.

What is the benefit of e mail?

Emails are known to be good as they help to deliver information easy and  fast and as such a lot of people uses it a lot.

Concluisvely, Note that emails are often sent over the use of mobile phones or computer, and as such one do not need to have the knowledge of using computer is before they can send email.

Learn more about email from

https://brainly.com/question/24688558

#SPJ2

Assignment
Create an HTML form that will accept four fields: pet name, pet ID, pet weight, and birthdate. Name this file petInfo.html. There should be a submit and reset button on your html form. Your input fields for your form should be inside of a table. The submit button should send the data to a php file named updateInfo.php. The updateInfo.php file should check the data submitted by the html file for proper formatting. While it is allowable that you may check input on the client side (either HTML or Javascript), you MUST check for valid input on the server using PHP.
***IMPORTANT***
Your POST variables in your HTML file must be labeled as follows. I have written an automated script to run tests on your code, and it depends on the POST variables being labeled correctly within the HTML Form.
1) "pet_name"
2) "pet_id"
3) "pet_weight"
4) "birth_date"
The following rules must be enforced by your PHP script about the input.
• No field is allowed to be blank.
• Maximum length of pet name is 20 characters.
• Pet ID must be 4 lowercase letters followed by 3 numbers. Example: abcd123
• Max length of pet weight is 7 characters. Max of two digits after decimal point. Must be a positive value. Range: 0.00 – 9999.99.
• The name should be only made up of alphabetical characters. (no numbers or symbols).
• Birthdate should be in the format 1/1/2002. Examples of valid input: 01/01/2002, 12/1/1999, 12/25/2015. Do not allow: 12/25/02 (The whole year should appear in the input).
If all the fields are valid, your PHP script should save the data into a file named petInfo.txt which should have the following format, and be sorted by "pet_name". Put each record on its own line. To simplify things, you can assume that Names are unique - i.e. you can use the name as a key for your associative array. (I won't use two of the same name when I test your code).
PetName, PetID, PetWeight, PetBirthDate\n
Once the new data has been received, you should also display ALL data that has been entered into the text file from your PHP script into an HTML table. The table should be sorted by last name just like the text file. After successfully displaying your table, create a link back to the petInfo.html page.

Answers

Answer:

it

is

not

a

big

question

it

is

so

simple

what specific Philippine law discusses copyright? elaborate?​

Answers

Answer: Republic Act No. 8293 "Intellectual Property Code of the Philippines".

Explanation:

The Republic Act No. 8293 is the Intellectual Property Code of the Philippines. It is the Philippine law that discusses copyright. This law protects copyrights, intellectual property, trademarks, and patents.

Examples of copyright that are protected under the law are photographic works, drawings, audiovisual works, and cinematographic works.

When drivers have no control over their driving environment and are stuck in traffic, the lack of control over the traffic event is frustrating and frustration leads to ___________ .
aggression
courtesy
restriction
regulation

Answers

A nearby driver is your answer

What information is required for a complete citation of a website source?
A: the title, volume number, and page numbers
B: the responsible person or organization and the website URL
C: the responsible person or organization, date accessed, and URL
D: the responsible person or organization and the date accessed

Answers

Answer:

C: the responsible person or organization, date accessed, and URL

Explanation:

Which of these is outside the scope of an art director's responsibility?

Answers

Answer:

Establishing Tight deadlines for a rush job.

Explanation:

The time taken for a rush job has nothing to do with the art director because it has nothing to do with art. Also rush jobs already call for tight deadlines so technically the deadline is already established.

Answer: cropping a photograph for the sake of space

Explanation: edge 22

Jack has a fear of getting up in front of a group of people and giving a presentation when he gave his last presentation he taught quickly which made it hard for people to understand him what constructive criticism could you give Jack?

Answers

Answer:

You do not have confidence in your ability, and it shows. You need to get training on presenting.

Explanation:

Answer:

You did an amazing job on the research. When I present, I find it helpful to take a deep breath. It helps me relax and slow down, which helps my audience. (I haven't taken the exam yet. When I complete the exam I'll return to say if this is correct or not.) IT WAS CORRECT!!!

Explanation:

I want to emphasize that the question stated constructive criticism. If you say you don't have confidence and it shows. He could receive the criticism the wrong way.  When giving constructive criticism your goal is to help.

Raj’s computer just crashed and he lost most of his files. What should he do to avoid this problem in the future?

He should inspect the power and connection.
He should check all the cords and cables.
He should delete his browsing history.
He should back up his data regularly.

Answers

He should back up his data regularly

Answer:

Back up his data regularly.

Explanation:

Power and internet can go out at anytime

Cords (unless they are to a hard drive) is irrelevant in this situation

Browsing history is also irrelevant in this situation

I might be wrong about this, but that is the best solution in my opinion.

Hope this helps!

Implement the following logic in C++, Use appropriate data types. Data types are represented as either numeric (num) or string.
start
string name
string address
num item //use int
num quantity
num price //use double as data type
num SIZE = 6
num VALID_ITEM [SIZE] = 106, 108, 307, 405, 457, 688 //use int as data type
num VALID_ITEM_PRICE [SIZE] = 0.59, 0.99, 4.50, 15.99, 17.50, 39.00 //use double as data type
num i
bool foundIt = false
string MSG_YES = "Item available"
string MSG_NO = "Item not found" get name, address, item, quantity
i = 0
while i < SIZE
if item == VALID_ITEM [i] then
foundIt = true
price = VALID_ITEM_PRICE [i]
endif
i = i + 1
endwhile
if foundIt == true then
print MSG_YES
print quantity, " at " , price, " each"
print "Total ", quantity * price
else
print MSG_NO
endif
stop

Answers

Answer:

Follows are the modified code in c++ language:

#include<iostream>//header file

#include<string>//header file

using namespace std;

int main()//main method

{

string name,address, MSG_YES, MSG_NO;//defining string variable

int item,quantity,size=6, i=0;//defining integer variable

double price;//defining double variable  

int VALID_ITEM[]={106,108,307,405,457,688};//defining integer array and assign value

double VALID_ITEM_PRICE[]={0.59,0.99,4.50,15.99,17.50,39.00};//defining double array and assign value

bool foundIt=false;//defining bool variable  

MSG_YES="Item available";//use string variable to assign value

MSG_NO = "Item not found"; //use string variable to assign value

cout<<"Input name: ";//print message

cin>>name;//input value in string variable

cout<<"Input Address: ";//print message

cin>>address;//input value in string variable

cout<<"Input Item: "<<endl;//print message

cin>>item;//input value in string variable

cout<<"Input Quantity: "<<endl;//print message

cin>>quantity;//input value in string variable

while(i <size)//defining while that checks i less then size  

{

if (item ==VALID_ITEM[i]) //use if block to match item in double array

{

foundIt = true;//change bool variable value

price = VALID_ITEM_PRICE[i];//hold item price value in price variable  

}

i++;//increment the value of i

}

if (foundIt == true)//use if to check bool variable value equal to true

{

cout<<MSG_YES<<endl;//print value

cout<<"Quantity "<<quantity<<" at "<<"Price "<<price<<"each"<<endl;//print value

cout<<"Total"<<quantity*price;//calculate the total value

}

else//else block

cout<<MSG_NO;//print message  

}

Output:

please find the attached file.

Explanation:

In the above given C++ language modified code, four-string variable " name, address, MSG_YES, and MSG_NO", four integer variable "item, quantity, size, and i", and "integer and double" array is defined, that holds values.

In the string and integer variable "name, address, and item, quantity", we input value from the user-end and use the while loop, which uses the if block to check the "item and quantity" value from the user end and print its respective value.

Which of the following industries does not use technology?

Medicine

Marketing and advertising

Law enforcement

Arts and entertainment

None of the above

Answers

Answer:

None of the above

Explanation:

Medicine uses technology to research

Advertiseres use platforms like Instagram to share the product they are promoting

Law enforcement uses tech to pull up databases of people's records

Arts and entertainment use them to create (in some cases), share, and sell their art.

Hope this helps!

Answer:

E

Explanation: got it right on edge 2020

Suzanne has inserted an image into her document and would like to adjust the color and contrast of the image.

Where can Suzanne find these options?

Design tab, Picture Tools group
Contextual tab Picture Tools > Format in the Picture Tools group
Contextual tab Picture Tools > Format in the Adjust group
Contextual tab Picture Tools > Format in the Align group

Answers

Answer:

Contextual tab Picture Tools > Format in the Adjust group

Explanation:

edge/canva test review

Suzanne finds the options in the contextual tab Picture Tools > Format in the Adjust group. The correct option is B.

What is a contextual tab?

When a specific event occurs in the Office document, a contextual tab, which is a hidden tab control in the Office ribbon, is presented in the tab row. For instance, when a table is selected in Excel, the Table Design tab is displayed on the ribbon.

The contextual command tabs have the capabilities and commands you need to operate in a certain situation. The contextual tabs, for instance, provide actions that are only applicable while working with a table in the Design view when you open a table in that view.

Therefore, the correct option is B. Contextual tab Picture Tools > Format in the Adjust group.

To learn more about the contextual tab, refer to the link:

https://brainly.com/question/26680062

#SPJ2

what tools IS used to mine stones and ores​

Answers

Answer:

pickaxe

Explanation:

that is the tool u use

A pickaxe or a pick.

Shown in minecraft and talked about in many story's that take place in the mines.

Depending on the pickaxe material, many things could be mines like stone and ore.

write a program that reads in a number n and prints out n rows each containing n star charactersg

Answers

In python:

rows = int(input("How many rows would you like? "))

i = 0

while i < rows:

   print("*" * rows)

   i += 1

I hope this helps!

Could someone explain a Boolean?

Answers

Answer:

It is a "True" or "False" integer.

Explanation:

denoting a system of algebraic notation used to represent logical propositions, especially in computing and electronics.

a binary variable, having two possible values called “true” and “false.”.

Answer:

Booleans are “truth values” — they are a data type that can contain either the value true or false. (These values may be represented as 1 or 0 in other programming languages!) Boolean statements are statements that evaluate to be true or false.

1. Add an import statement above the class declaration to make the Scanner class available to your program.
2. In the main method, create a Scanner object and connect it to the System.in object.
3. Prompt the user to enter his/her first name.
4. Read the name from the keyboard using the nextLine method, and store it into a variable called firstName (you will need to declare any variables you use).
5. Prompt the user to enter his/her last name.
6. Read the name from the keyboard and store it in a variable called lastName.
7. Concatenate the firstName and lastName with a space between them and store the result in a variable called fullName.
8. Print out the fullName.
9. Compile, debug, and run, using your name as test data.
10. Since we are adding on to the same program, each time we run the program we will get the output from the previous tasks before the output of the current task.

Answers

Answer:

import java.util.Scanner;

public class Assignment{

public static void main(String [] args)

{

Scanner input = new Scanner(System.in);

String firstName, lastName;

System.out.print("Firstname: ");

firstName = input.nextLine();

System.out.print("Lastname: ");

lastName = input.nextLine();

String fullName = firstName +" "+lastName;

System.out.print(fullName);

}

}

Explanation:

I'll use the line numbers in the question to point at the corresponding instruction

import java.util.Scanner; -- The import statement (1)

public class Assignment{

public static void main(String [] args)

{

Scanner input = new Scanner(System.in); -- Scanner object (2)

String firstName, lastName; -- Variable declarations

System.out.print("Firstname: "); ---- Prompt to enter first name (3)

firstName = input.nextLine(); --- User input for firstName (4)

System.out.print("Lastname: "); ---- Prompt to enter first name (5)

lastName = input.nextLine(); --- User input for lastName (6)

String fullName = firstName +" "+lastName; --- concatenating both user inputs (7)

System.out.print(fullName); --- Print out fullName (8)

}

}

Help with number 12 please!

Answers

In #1 A can pass legally, in #2 B can pass legally, and in #3 neither can pass legally.

Can someone tell me why this code in Java won't run?

if (s.toLowerCase().equals(s.toUpperCase()))
{
System.out.println("*");
}

Answers

Answer:

try typing the following:

String lc = s.toLowerCase();

String uc = s.toUpperCase();

if(lc == uc){

System.out.println("*")

}

Which of the following is another word for a copyeditor?


microeditor

macroeditor

assignment editor

assistant editor

Answers

Answer: speaking of microeditor

Explanation: thats not the only thing i know of thats micro :0

Which of the following is another word for a copyeditor?


The answer: microeditor
Hope it helps:)

Other Questions
what are motherboards Write a poem about a rotten sandwich that can't stay in 1 spot What is 2.068 rounded to the nearest 0.1 3x-5 1. A Spanish soldier looking for a meal in an Indian home would most likely find everything EXCEPT To whom did the three fifths compromise refer What is the equation of the following line written in general form? (The y-intercept is -1.)A 2x + y - 1 = 0B -2x - y - 1 = 0C 2x - y - 1 = 0 Choose the best translation of the following sentence.I always read the newspaper.Je lis souvent le journal.Je lis toujours le journal.Je lis quelquefois le journal.Je lis de temps en temps le journal. -6x+13=25 what is X based on the half-life of Tc-99, how many half-lives have to pass for a 150 mg sample of Tc-99 to decay down to 30mg? In what area of Africa did the early Bantu originate? western and central Africa eastern Africa northeastern Africa southern and central Africa What is the solution to the equation 5 (n- 1/10) = 1/2 What connections do you see between Has situation and the information you read in the article Vietnam warsFrom Inside Out and Back Again Based on your data, how are elements arranged into chemical families? what is the answer to the question 1/2n+5=3? Which ideas in this paragraph support the idea that it isimportant to achieve one's dreams and help othersachieve theirs? Check all that apply.Pausch played football as a child.His coach taught him about enthusiasm.His coach tried new ways of making the teamsuccessful.It is important for people to not always be wherethey are supposed to be.Pausch learned that enthusiasm can come fromcreativity. Structural engineers, designing an eighty-story office building, need to account for sway. They would most likely use a(n) ____There aren't any answer choices Which is true about Embryonic Stem Cells. 3 Ag Brt Ga PO 4 AgPO4 + GabrzBalance or unbalanced Read the passage from Anne Frank: The Diary of a Young Girl.Mrs. Van Dann [is] trembling because of the planes, which take no notice of the speech but fly blithely on towards Essen . . .Which word best conveys the connotation of the word blithely?pitifullylightheartedlycasuallyterrifyingly