Questions
I need this code in java. Task (1) Create two files to submit: ItemToPurchase.java - Class...

I need this code in java.

Task

(1) Create two files to submit:

  • ItemToPurchase.java - Class definition
  • ShoppingCartPrinter.java - Contains main() method

Build the ItemToPurchase class with the following specifications:

  • Private fields
    • String itemName - Initialized in default constructor to "none"
    • int itemPrice - Initialized in default constructor to 0
    • int itemQuantity - Initialized in default constructor to 0
  • Default constructor
  • Public member methods (mutators & accessors)
    • setName() & getName() (2 pts)
    • setPrice() & getPrice() (2 pts)
    • setQuantity() & getQuantity() (2 pts)

(2) In main(), prompt the user for two items and create two objects of the ItemToPurchase class. Before prompting for the second item, call scnr.nextLine(); to allow the user to input a new string. (2 pts)

Ex:

Item 1
Enter the item name:
Chocolate Chips
Enter the item price:
3
Enter the item quantity:
1

Item 2
Enter the item name:
Bottled Water
Enter the item price:
1
Enter the item quantity:
10


(3) Add the costs of the two items together and output the total cost. (2 pts)

Ex:

TOTAL COST
Chocolate Chips 1 @ $3 = $3
Bottled Water 10 @ $1 = $10

Total: $13

This is the given code so far:

import java.util.Scanner;

public class ShoppingCartPrinter {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int i = 0;
String productName;
int productPrice = 0;
int productQuantity = 0;
int cartTotal = 0;
  
// TODO Create new item1 and new item2

// Prompt for item 1 details from user, create itemToPurchase object
System.out.println("Item 1");
System.out.println("Enter the item name:");
productName = scnr.nextLine();
  
System.out.println("Enter the item price:");
productPrice = scnr.nextInt();
  
System.out.println("Enter the item quantity:");
productQuantity = scnr.nextInt();
System.out.println("");
  
// TODO: Set item1 fields here
  

// Promptr for item 2 details from user, create itemToPurchase object
System.out.println("Item 2");
System.out.println("Enter the item name:");
scnr.nextLine(); // DO NOT OMIT THIS LINE
productName = scnr.nextLine();
  
System.out.println("Enter the item price:");
productPrice = scnr.nextInt();
  
System.out.println("Enter the item quantity:");
productQuantity = scnr.nextInt();
System.out.println("");
  
// TODO set item2 here

  
// Add costs of two items and print total
cartTotal = (item1.getPrice() * item1.getQuantity()) +
(item2.getPrice() * item2.getQuantity());
System.out.println("TOTAL COST");
System.out.println(item1.getName() + " " + item1.getQuantity() +
" @ $" + item1.getPrice() + " = $" +
(item1.getPrice() * item1.getQuantity()));
System.out.println(item2.getName() + " " + item2.getQuantity() +
" @ $" + item2.getPrice() + " = $" +
(item2.getPrice() * item2.getQuantity()));
System.out.println("");
System.out.println("Total: $" + cartTotal);
  
return;
}
}

In: Computer Science

Ikea is a Swedish based multinational corporation that designs and sells ready-to-assemble furniture and home accessories....

Ikea is a Swedish based multinational corporation that designs and sells ready-to-assemble furniture and home accessories. IKEA is the largest furniture company in the world. It is known for its modern architectural designs, as well as its attention to continuous product development, operations details, and cost control. IKEA relies on design innovation to bring great quality and beautiful designs to the market and its stores by collaborating with the best designers from various parts of the world. It has developed cost efficient and innovative methods to match people’s expectations of price and quality. Answer all the three following questions in relation to IKEA. You can use your study material and other resources to write your answers. Use your own words and adhere to the wordcount specified for each question

Question 1: Innovation at IKEA (30 marks, 300 words) A. Why is IKEA an innovative company? Support your answer with examples. B. Discuss the role of four business functions at IKEA. Give at least two innovation examples for each business function at IKEA

Question 2: Product offering and targeting (30 marks, 300 words) A. Discuss the three levels of a product by using the HAMARVIK mattress as an example. B. Discuss the four targeting strategies. Which targeting strategy does IKEA use for its mattresses. Justify your answer. (Check the mattress section on the IKEA website before answering this question)

Question 3: The marketing mix and innovation (40 marks, 500 words) IKEA’s marketing strategy consists of market segmentation, targeting, positioning and the marketing mix. IKEA’s marketing strategy enables the company to be a successful player in the global market. Using your B207A course material, evaluate how the innovation in IKEA’s marketing mix elements are used to position the products within the minds of consumers. Your answer should contain the following: 1- IKEA’s market segmentation and targeting 2- What is positioning. How is it related to the marketing mix? 3- Examples of IKEA’s marketing mix elements and their contribution to brand positioning

In: Operations Management

Compare and contrast domestic and international terrorism point out the differences? Homeland Security

Compare and contrast domestic and international terrorism point out the differences?

Homeland Security

In: Other

The biggest determining the value of a home square footage accompanying data represent the square footage...

The biggest determining the value of a home square footage accompanying data represent the square footage and selling price for a random sample of homes for sale in a certain region
Sample Footage, x. Selling Price ($000s), y
2292. 393.8
3216 381.5
1074 181.5
1948 333.8
3196 634
2670 354
4126 629.7
2126 363.8
2637 429.4
1707 298.1
1855 281.9
3930 708.6

a.) determine the linear correlation coefficient between square footage and asking price
b.) find the least squares regression line treating square footage as the explanatory variable
c.) interpret the slope
for every additional square foot, the selling price increased by ______ thousand dollars, on average
d.) is it reasonable to interprey the y-intercept? why?
a house of ___ square feet is not possible and outsidw the scope of the model
e.) one home that is 1431 square feet is sold for $210 thousand. is this home’s price above or below average for a homr of this size?
the average price of a home that id 1431 feet id $______ thosand.

In: Math

Scenario: Your organization has used a variety of collaboration systems developed by some project managers. Some...

Scenario: Your organization has used a variety of collaboration systems developed by some project managers. Some of these systems were successful while others were not. Your organization has one unique challenge—many of your employees are staffed at other locations or work from home (telework). You would like to standardize the collaboration process to improve team communication for all company projects. In your presentation, you should include the elements listed below.

Explain why collaboration information systems (IS) are important from the organization’s perspective.

Discuss how collaboration tools can improve team communication.

Identify three tools that will be used for synchronous communications and three tools that will be used for asynchronous communications. Be sure to explain why you made these choices.

Describe how project files, such as Microsoft (MS) Word, MS Excel, MS Project, and MS Visio, will be shared with team members. Be sure to explain the rationale behind your choice.

Explain how the task list for managing tasks will be shared with team members. Be sure to explain the rationale behind your choice.

Discuss how this new collaboration IS could provide competitive advantages for your organization.

Your presentation should be a minimum of six slides in length (not counting the title and reference slides). Use of images, graphics, and diagrams is encouraged. You can use an industry of your choosing or examples from your personal or professional experiences in developing this assignment.

In: Operations Management

in java write a program that initializes a String variable with "Welcome to Jac444!". Then, use...

in java

write a program that initializes a String variable with "Welcome to Jac444!". Then, use methods of the String class to examine the string and output a few properties of the string, namely The string by itself The length of the string The first character in the string The last character in the string The first word of the string The last word of the string Make sure that your output also contains how many words exists in the string.

In: Computer Science

Do you think IQ scores tell how smart a someone is? Why or why not?

Do you think IQ scores tell how smart a someone is? Why or why not?

In: Psychology

A. What's the difference between repeated play vs. one-shot games? B. How do you calculate the...

A. What's the difference between repeated play vs. one-shot games? B. How do you calculate the sum of future stream of payoffs?

In: Economics

The demand for subassembly S is 110 units in week 7. Each unit of S requires...

The demand for subassembly S is

110

units in week 7. Each unit of S requires

2

unitss

of T and

1

unitnothing

of U. Each unit of T requires

1

unitnothing

of​ V,

2

unitss

of​ W, and

1

unitnothing

of X.​ Finally, each unit of U requires

1

unitnothing

of Y and

2

units of Z. One firm manufactures all items. It takes 2 weeks to make​ S,

2

weekss

to make​ T, 2 weeks to make​ U,

1

weeknothing

to make​ V,

2

weeks to make​ W,

2

weekss

to make​ X, 2 weeks to make​ Y, and

2

weekss

to make Z.

LOADING...

Click the icon to view the product structure and the​ time-phased product structure.

In addition to

110

units of​ S, there is also a demand for

20

units of​ U, which is a component of S. The

20

units of U are needed for maintenance purposes. These units are needed in week 6. Modify the gross material requirements plan to reflect this change ​(type 0 if the input box is not​ used).

Week

Lead Time

Item

1

2

3

4

5

6

7

​(weeks)

S

Gross req

0

0

0

0

0

0

110

  Order release

0

0

0

0

110

0

0

2

T

Gross req

nothing

nothing

nothing

nothing

nothing

nothing

nothing

  Order release

nothing

nothing

nothing

nothing

nothing

nothing

nothing

2

In: Operations Management

1a. What does doping do to silicon? 1b. When no current is applied to a diode,...

1a. What does doping do to silicon?

1b. When no current is applied to a diode, what forms at the junction between the N-type and P-type layers?

1c. What is the biggest problem to account for while manufacuring silicon chips?

In: Computer Science

hello Mr\Mrs My question is about Security again. 1)What are security and its adjacent consepts ?...

hello Mr\Mrs
My question is about Security again.
1)What are security and its adjacent consepts ?
2) What is the disciplinary boundary of International Securit Studies ?
3) The Western-centrism conundrum (needs some brief explanation).
thanks in advance :)

In: Economics

Just answer 17,18,19,20 17. Five-year-old Angela scribbles on the wall with a crayon. Her mother scolds...

Just answer 17,18,19,20


17. Five-year-old Angela scribbles on the wall with a crayon. Her mother scolds her for this. Then Angela does it again and she gets another scolding. Now Angela does this more often. In terms of operant conditioning, the mother’s scoldings were:

18.You tell your dog to “Sit.” He sits and then you give him food. If he sits without getting the command first, he does not get the food. In terms of operant conditioning, the command is a:

19. To establish superstitious behavior in pigeons, Skinner gave the pigeons food: [...using what procedure?

20. In an experiment by Catania and Cutts on human superstition , what kind of evidence indicated the presence of a superstition

In: Psychology

1. A project has a PV of $65,000, an EV of $75,000 and an AC of...

1. A project has a PV of $65,000, an EV of $75,000 and an AC of $82,000.

Is the project over or under budget? How can you tell? 20. Is the project ahead of or behind schedule? How can you tell?

2. A project has a PV of $10,000, a SPI of 0.92 and a CPI of 0.90.

  1. What is the project’s EV?
  1. What is the project’s AC?

In: Operations Management

Do you think you could be completely disconnected from any type of modern technology? Would there...

Do you think you could be completely disconnected from any type of modern technology? Would there be benefits to disconnecting? Is there a specific technology or gadget that you use in your personal life that you could not live without? Could you do your current job without technology? Why or why not?

In: Operations Management

What are the Risk associated with gaining competitive advantages by Corus hotels? 600 words. No plagiarism...

What are the Risk associated with gaining competitive advantages by Corus hotels?

600 words. No plagiarism plz

In: Operations Management