Questions
Many fast-food restaurants use automatic soft-drink dispensing machines that fill cups once an order is placed at a drive-through window.

Many fast-food restaurants use automatic soft-drink dispensing machines that fill cups once an order is placed at a drive-through window. A regional manager for a fast-food chain wants to determine if the machines in her region are dispensing the same amount of product. She samples four different machines and measures a random sample of 16-ounce drinks from each machine. Here is the data she collects (in ounces):

Machine 1

Machine 2

Machine 3

Machine 4

16.5

15.0

16.0

16.6

16.6

15.4

16.3

15.9

16.5

15.3

16.5

15.5

15.8

15.7

16.4

16.2

15.6

15.2

17.3

17.0

16.4

16.0

16.7

15.5

16.1

15.6

15.7

16.3

a) “Number of ounces” is a quantitative variable. Is it discrete or continuous?

b) “Number of ounces” is what level of measurement?

c) Is this a designed experiment or an observational study? Briefly explain.

d) At the 5% Level of Significance, determine whether or not the data indicate that the mean amount dispensed from the machines is not the same, by doing each of the following:

            1) Write the Hypotheses.

2) Use your calculator to do a one-way ANOVA test. Explain in some detail how the results of the test lead you to reject or not reject the null hypothesis.

3) Write a formal conclusion.

e) Using the language of our textbook on bias, name at least one type of bias that might be present in this research. Briefly explain.

In: Statistics and Probability

Assignment; For this component, you will write a report or critique on the paper you chose...

Assignment; For this component, you will write a report or critique on the paper you chose from Assignment 1. Your report should be limited to approx. 1500 words (not including references).

Use 1.5 spacing with a 12 point Times New Roman font. Though your paper will largely be based on the chosen article, you should use other sources to support your discussion or the chosen papers premises.

Citation of sources is mandatory and must be in the IEEE style.

TOPIC: Social Engineering and phishing attacks

Your report or critique must include: Introduction: Identification of the paper you are critiquing/ reviewing, a statement of the purpose for your report and a brief outline of how you will discuss the selected article (one or two paragraphs).

Body of Report: Describe the intention and content of the article. If it is a research report, discuss the research method (survey, case study, observation, experiment, or other method) and findings. Comment on problems or issues highlighted by the authors. Report on results discussed and discuss the conclusions of the article and how they are relevant to the topics of this Unit of Study.

3 Conclusion: A summary of the points you have made in the body of the paper. The conclusion should not introduce any ‘new’ material that was not discussed in the body of the paper. (One or two paragraphs) References: A list of sources used in your text. They should be listed alphabetically by (first) author’s family name. Follow the IEEE style.

In: Computer Science

Can you please rewrite this Java code so it can be better understood. import java.util.HashMap; import...

Can you please rewrite this Java code so it can be better understood.

import java.util.HashMap;
import java.util.Scanner;
import java.util.Map.Entry;

public class Shopping_cart {
  
   static Scanner s= new Scanner (System.in);
  
//   declare hashmap in which key is dates as per mentioned and Values class as value which consists all the record of cases
   static HashMap<String,Item> map= new HashMap<>();

   public static void main(String[] args) {
       // TODO Auto-generated method stub
       getupdates();
   }
  
   static void getupdates() {
      
       System.out.println("Welcome to Shopping Cart. Enter:");
       System.out.println("1 : Add an Item ");
       System.out.println("2 : Add multiples Quantities of Given Item ");
       System.out.println("3 : Remove an unspecified Item ");
       System.out.println("4 : CheckOut");
       System.out.println("5 : Checkbudget");
       System.out.print("Choice: ");
       int selection= s.nextInt();
      
      
       switch(selection) {
       case 1:
          add_new_item();
          getupdates();
            
          case 2:
              Add_multiples_items();
              getupdates();
                
          case 3:
              remove_unspecified_data();
              getupdates();
                
          case 4:
                  checkout();
                  getupdates();
                 
          case 5:
                
              checkbudget();
              getupdates();
                    
          case 6:
              System.out.println("Stay Safe");
              break;
                
              default:
                  System.out.println("Invalid choice");
                   System.out.println("Please enter the valid choice");
                   getupdates();
                    
       }
   }

   public static int total_price() {
      
       int total_price=0;
       for (Entry<String, Item> entry : map.entrySet()) {
                  
                   Item it=map.get(entry.getKey());
                  
                   total_price+=it.getPrice()*it.get_quantity();
                  
               }
         
       return total_price;
      
   }
  
  
     
  
   private static void checkbudget() {
      
       System.out.print("Enter your Total Budget : ");
       int budget=s.nextInt();
      
       int totalprice=0;
  


System.out.println("Total Amount = "+total_price());

while(budget<total_price()) {
   totalprice = remove_unspecified_data();
     
     
     
   if(budget>=totalprice) {
       break;
   }
}


System.out.println();

System.out.println("Now updates cart : ");

checkout();

System.out.println();
      
   }

   private static void checkout() {
       System.out.println(" Here list of Items in Your Cart");
      
       int i=1;
       int total_price=0;
       System.out.println(" S.no Name of item Quantity price ");
       System.out.println(" ");
       for (Entry<String, Item> entry : map.entrySet()) {
          
           Item it=map.get(entry.getKey());
          
           System.out.println(" "+i+" "+entry.getKey()+" "+it.get_quantity()+" $"+it.getPrice()*it.get_quantity());
           total_price+=it.getPrice()*it.get_quantity();
           i++;
       }
      
       System.out.println();
      
       System.out.println("Total Amount = "+total_price);
      
       System.out.println();
       System.out.println();
   }

   private static int remove_unspecified_data() {
      
       System.out.print("Enter the item you want to remove from your cart : ");
       String name=s.next();
      
       Item it1=map.get(name);
      
       int quant=it1.get_quantity();
      
       if(quant>1) {
          
       quant--;
       it1.set_quantity(-1);
      
       map.put(name, it1);
       }
         
       else {
           map.remove(name, it1);
       }
      
       int total_price=total_price();
         
       total_price-=it1.getPrice();
         
       System.out.println();
       System.out.println();
      
       return total_price;
      
   }

   private static void Add_multiples_items() {
       System.out.print("Enter the item you want to add in your cart : ");
       String name=s.next();
      
System.out.println("Enter price of Item : ");
      
       int price=s.nextInt();
      
       System.out.print("Enter the quantity of that item you want to add : ");
       int quan=s.nextInt();
      
       if(map.containsKey(name)) {
           Item it1=map.get(name);
           it1.set_quantity(quan);
           map.put(name, it1);
       }
       else {
           Item it= new Item(name,price,quan);
           map.put(name, it);
       }
      
       System.out.println();
       System.out.println();
      
   }

   private static void add_new_item() {
       System.out.print("Enter the item you want to add in your cart : ");
      
       String name=s.next();
      
       System.out.println("Enter price of Item : ");
      
       int price=s.nextInt();
      
      
      
       if(map.containsKey(name)) {
           Item it1=map.get(name);
           it1.set_quantity(1);
           map.put(name, it1);
       }
       else {
           Item it= new Item(name,price,1);
           map.put(name, it);
       }
      
       System.out.println();
       System.out.println();
      
   }
  
  

}

class Item
{   
private String name;
private int price;
private int quantity; //in cents
  
//Constructor
public Item(String n, int p,int quantity)
{
name = n;
price = p;
this. quantity=quantity;
}
  
public boolean equals(Item other)
{
return this.name.equals(other.name) && this.price == other.price;
}
  
//displays name of item and price in properly formatted manner
public String toString()
{
return name + ", price: $" + price/100 + "." + price%100;
}
  
//Getter methods
public int getPrice()
{
return price;
}
  
public int get_quantity()
{
return quantity;
}
  
public void set_quantity(int qa)
{
   quantity+=qa;
}
  
public String getName()
{
return name;
}
}

In: Computer Science

Can you please take this code and just rewrite it so it can be easily be...

Can you please take this code and just rewrite it so it can be easily be able to put into a complier. in java

Implementation of above program in java:

import java.util.HashMap;
import java.util.Scanner;
import java.util.Map.Entry;

public class Shopping_cart {
  
   static Scanner s= new Scanner (System.in);
  
//   declare hashmap in which key is dates as per mentioned and Values class as value which consists all the record of cases
   static HashMap<String,Item> map= new HashMap<>();

   public static void main(String[] args) {
       // TODO Auto-generated method stub
       getupdates();
   }
  
   static void getupdates() {
      
       System.out.println("Welcome to Shopping Cart. Enter:");
       System.out.println("1 : Add an Item ");
       System.out.println("2 : Add multiples Quantities of Given Item ");
       System.out.println("3 : Remove an unspecified Item ");
       System.out.println("4 : CheckOut");
       System.out.println("5 : Checkbudget");
       System.out.print("Choice: ");
       int selection= s.nextInt();
      
      
       switch(selection) {
       case 1:
          add_new_item();
          getupdates();
            
          case 2:
              Add_multiples_items();
              getupdates();
                
          case 3:
              remove_unspecified_data();
              getupdates();
                
          case 4:
                  checkout();
                  getupdates();
                 
          case 5:
                
              checkbudget();
              getupdates();
                    
          case 6:
              System.out.println("Stay Safe");
              break;
                
              default:
                  System.out.println("Invalid choice");
                   System.out.println("Please enter the valid choice");
                   getupdates();
                    
       }
   }

   public static int total_price() {
      
       int total_price=0;
       for (Entry<String, Item> entry : map.entrySet()) {
                  
                   Item it=map.get(entry.getKey());
                  
                   total_price+=it.getPrice()*it.get_quantity();
                  
               }
         
       return total_price;
      
   }
  
  
     
  
   private static void checkbudget() {
      
       System.out.print("Enter your Total Budget : ");
       int budget=s.nextInt();
      
       int totalprice=0;
  


System.out.println("Total Amount = "+total_price());

while(budget<total_price()) {
   totalprice = remove_unspecified_data();
     
     
     
   if(budget>=totalprice) {
       break;
   }
}


System.out.println();

System.out.println("Now updates cart : ");

checkout();

System.out.println();
      
   }

   private static void checkout() {
       System.out.println(" Here list of Items in Your Cart");
      
       int i=1;
       int total_price=0;
       System.out.println(" S.no Name of item Quantity price ");
       System.out.println(" ");
       for (Entry<String, Item> entry : map.entrySet()) {
          
           Item it=map.get(entry.getKey());
          
           System.out.println(" "+i+" "+entry.getKey()+" "+it.get_quantity()+" $"+it.getPrice()*it.get_quantity());
           total_price+=it.getPrice()*it.get_quantity();
           i++;
       }
      
       System.out.println();
      
       System.out.println("Total Amount = "+total_price);
      
       System.out.println();
       System.out.println();
   }

   private static int remove_unspecified_data() {
      
       System.out.print("Enter the item you want to remove from your cart : ");
       String name=s.next();
      
       Item it1=map.get(name);
      
       int quant=it1.get_quantity();
      
       if(quant>1) {
          
       quant--;
       it1.set_quantity(-1);
      
       map.put(name, it1);
       }
         
       else {
           map.remove(name, it1);
       }
      
       int total_price=total_price();
         
       total_price-=it1.getPrice();
         
       System.out.println();
       System.out.println();
      
       return total_price;
      
   }

   private static void Add_multiples_items() {
       System.out.print("Enter the item you want to add in your cart : ");
       String name=s.next();
      
System.out.println("Enter price of Item : ");
      
       int price=s.nextInt();
      
       System.out.print("Enter the quantity of that item you want to add : ");
       int quan=s.nextInt();
      
       if(map.containsKey(name)) {
           Item it1=map.get(name);
           it1.set_quantity(quan);
           map.put(name, it1);
       }
       else {
           Item it= new Item(name,price,quan);
           map.put(name, it);
       }
      
       System.out.println();
       System.out.println();
      
   }

   private static void add_new_item() {
       System.out.print("Enter the item you want to add in your cart : ");
      
       String name=s.next();
      
       System.out.println("Enter price of Item : ");
      
       int price=s.nextInt();
      
      
      
       if(map.containsKey(name)) {
           Item it1=map.get(name);
           it1.set_quantity(1);
           map.put(name, it1);
       }
       else {
           Item it= new Item(name,price,1);
           map.put(name, it);
       }
      
       System.out.println();
       System.out.println();
      
   }
  
  

}

class Item
{   
private String name;
private int price;
private int quantity; //in cents
  
//Constructor
public Item(String n, int p,int quantity)
{
name = n;
price = p;
this. quantity=quantity;
}
  
public boolean equals(Item other)
{
return this.name.equals(other.name) && this.price == other.price;
}
  
//displays name of item and price in properly formatted manner
public String toString()
{
return name + ", price: $" + price/100 + "." + price%100;
}
  
//Getter methods
public int getPrice()
{
return price;
}
  
public int get_quantity()
{
return quantity;
}
  
public void set_quantity(int qa)
{
   quantity+=qa;
}
  
public String getName()
{
return name;
}
}

In: Computer Science

I created a shoppingcart program but I'm getting a few compilation failed errors: 1) Tests that...

I created a shoppingcart program but I'm getting a few compilation failed errors:

1) Tests that ItemToPurchase("Bottled Water", "Deer Park, 12 oz.", 1, 10) correctly initializes item compilation failed

2) Tests default constructor and accessors for ShoppingCart Compilation failed

3)Tests ShoppingCart("John Doe", "February 1, 2016") correctly initializes cart Compilation failed

4) Tests that getNumItemsInCart() returns 6 (ShoppingCart) compilation failed

5) Test that getCostOfCart() returns 9 (ShoppingCart) compilation failed

Complete program:

itemtopurchase.java

public class ItemToPurchase {
// instance variables
private String itemName;
private String itemDescription;
private int itemPrice;
private int itemQuantity;
// default constructor
public ItemToPurchase() {
this.itemName = "none";
this.itemDescription = "none";
this.itemPrice = 0;
this.itemQuantity = 0;
}
public ItemToPurchase(String itemName, int itemPrice, int itemQuantity,String itemDescription) {
this.itemName = itemName;
this.itemDescription = itemDescription;
this.itemPrice = itemPrice;
this.itemQuantity = itemQuantity;
}
// method to set name of the item
public void setName(String name) {
itemName = name;
}
// method to set price of the item
public void setPrice(int price) {
itemPrice = price;
}
// method to set quantity of the item
public void setQuantity(int quantity) {
itemQuantity = quantity;
}
public void setDescription(String description) {
itemDescription = description;
}
// method to get name of the item
public String getName() {
return itemName;
}
// method to get price of the item
public int getPrice() {
return itemPrice;
}
// method to get quantity of the item
public int getQuantity() {
return itemQuantity;
}
public String getDescription() {
return itemDescription;
}
public void printItemPurchase() {
System.out.println(itemName + " " + itemQuantity + " @ $" + itemPrice + " = $" + (itemPrice * itemQuantity));
}
public void printItemDescription() {

System.out.println(itemName+": "+itemDescription);
}
}

shoppingcart.java

import java.util.ArrayList;

public class ShoppingCart {

//instance variables
private String customerName;
private String currentDate;
private ArrayList<ItemToPurchase> cartItems = new ArrayList<ItemToPurchase>();

//Default constructor
public ShoppingCart() {
customerName = "";
currentDate = "";
}

//parameterized constructor
public ShoppingCart(String customerName, String currentDate) {
this.customerName = customerName;
this.currentDate = currentDate;
}

//getter methods
public String getCustomerName() {
return customerName;
}

public String getCurrentDate() {
return currentDate;
}

//add items
public void addItem(ItemToPurchase item) {
cartItems.add(item);
}

//remove item
public void removeItem(String name) {
for (ItemToPurchase i : cartItems) {
if (i.getName().equalsIgnoreCase(name)) {
cartItems.remove(i);
return;
}
}

System.out.println("Item not found in cart");
}

//modify the item
public void modifyItem(ItemToPurchase item) {
for (int i = 0; i < cartItems.size(); i++) {
if (cartItems.get(i).getName().equalsIgnoreCase(item.getName())) {
if (!item.getDescription().equals("none") && !(item.getPrice() == 0) && !(item.getQuantity() == 0)) {
cartItems.add(i, item);
return;
}
}
}

System.out.println("Item not found in cart. Nothing modified");

}

//get total number of items in the cart
public int getNumItemsIncart() {
int sum = 0;
for (ItemToPurchase i : cartItems) {
sum += i.getQuantity();
}
return sum;
}

//get total cost of items in the cart
public int getCostOfcart() {
int sum = 0;
for (ItemToPurchase i : cartItems) {
sum += i.getPrice();
}
return sum;
}

//printing total of each items
public void printTotal() {
System.out.println(customerName + "'s Shopping Cart - " + currentDate);
if (cartItems.isEmpty()) {
System.out.println("Shopping Cart is Empty");
return;
}

System.out.println("Number of Items: " + cartItems.size());
System.out.println();
for (ItemToPurchase i : cartItems) {
i.printItemPurchase();
}
System.out.println();
System.out.println("Total: $" + getCostOfcart());
}

//printing description of all items
public void printDescription() {
System.out.println(customerName + "'s Shopping Cart - " + currentDate);
System.out.println();
if (cartItems.isEmpty()) {
System.out.println("Shopping Cart is Empty");
return;
}
System.out.println("Item Descriptions: ");
for (ItemToPurchase i : cartItems) {
i.printItemDescription();
}
}
}

shoppingcartmanager.java

import java.util.Scanner;

public class ShoppingCartManager {

// method to add an item in the cart
public static void addCartItem(Scanner scan, ShoppingCart cart) {
String itemName, itemDescription;
int itemPrice, itemQuantity;
System.out.println("ADD ITEM TO CART");
System.out.print("Enter the item name : ");
itemName = scan.nextLine();
System.out.print("Enter the item description : ");
itemDescription = scan.nextLine();
System.out.print("Enter the item price : ");
itemPrice = scan.nextInt();
System.out.print("Enter the item quantity : ");
itemQuantity = scan.nextInt();
scan.nextLine();

cart.addItem(new ItemToPurchase(itemName, itemPrice, itemQuantity, itemDescription));

}

// method to remove an item from the cart
public static void removeCartItem(Scanner scan, ShoppingCart cart) {
String itemName;
System.out.println("REMOVE ITEM FROM CART");
System.out.print("Enter the name of item to remove : ");
itemName = scan.nextLine();

cart.removeItem(itemName);
}

// method to change quantity of the cart
public static void changeItemQuantity(Scanner scan, ShoppingCart cart) {
String itemName;
int itemQuantity;
System.out.println("CHANGE ITEM QUANTITY");
System.out.print("Enter the item name : ");
itemName = scan.nextLine();
System.out.print("Enter the new quantity : ");
itemQuantity = scan.nextInt();
scan.nextLine();
cart.modifyItem(new ItemToPurchase(itemName, 0, itemQuantity, "none"));
}

// method to display menu choices and perform the operations on the cart until
// the user quits
public static void printMenu(ShoppingCart cart) {
String choice;
Scanner scan = new Scanner(System.in);
do {
System.out.println("\nMENU");
System.out.println("a - Add item to cart");
System.out.println("d - Remove item from cart");
System.out.println("c - Change item quantity");
System.out.println("i - Output items' description");
System.out.println("o - Output shopping cart");
System.out.println("q - Quit");
System.out.print("\nChoose an option : ");
choice = scan.nextLine();

if (choice.equalsIgnoreCase("a")) {
addCartItem(scan, cart);
} else if (choice.equalsIgnoreCase("d")) {
removeCartItem(scan, cart);
} else if (choice.equalsIgnoreCase("c")) {
changeItemQuantity(scan, cart);
} else if (choice.equalsIgnoreCase("o")) {
System.out.println("OUTPUT SHOPPING CART");
cart.printTotal();
} else if (choice.equalsIgnoreCase("i")) {
System.out.println("OUTPUT ITEMS' DESCRIPTION");
cart.printDescription();
} else if (!choice.equalsIgnoreCase("q"))
System.out.println("Invalid choice");

} while (!choice.equalsIgnoreCase("q"));

}

public static void main(String args[]) {
Scanner sc = new Scanner(System.in);

// taking user input
System.out.println("Enter Customer's Name:");
String name = sc.nextLine();
System.out.println("Enter Today's Date:");
String date = sc.nextLine();

// printing user input
System.out.println();
System.out.println("Customer Name: " + name);
System.out.println("Today's Date: " + date);

ShoppingCart cart = new ShoppingCart(name, date);// created shopping cart object
printMenu(cart);
}
}

In: Computer Science

I am having an issue with the code. The issue I am having removing the part...

I am having an issue with the code. The issue I am having removing the part when it asks the tuter if he would like to do teach more. I want the program to stop when the tuter reaches 40 hours. I believe the issue I am having is coming from the driver.

Source Code:

Person .java File:


public abstract class Person {
private String name;

/**
* Constructor
* @param name
*/
public Person(String name) {
super();
this.name = name;
}

/**
* @return the name
*/
public String getName() {
return name;
}

/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}

@Override
public String toString() {
return "Name: " + name;
}
  
  
}

**************************************************************************************

Student .java File:


public class Student extends Person {
private int age;
private Tuter tuter;
/**
* @param name
* @param age
* @param tuter
*/
public Student(String name, int age, Tuter tuter) {
super(name);
this.age = age;
this.tuter = tuter;
}
/**
* @return the age
*/
public int getAge() {
return age;
}
/**
* @param age the age to set
*/
public void setAge(int age) {
this.age = age;
}
/**
* @return the tuter
*/
public Tuter getTuter() {
return tuter;
}
/**
* @param tuter the tuter to set
*/
public void setTuter(Tuter tuter) {
this.tuter = tuter;
}
  
private double getDiscountAmount() {
// Calculate discount rate
double discountRate = 0;
if(this.age < 10) {
discountRate = 20;
}
  
return tuter.getTotalDue() * discountRate / 100;
}
  
@Override
public String toString() {
return "Student Name: " + super.getName() + "\nAge: " + age;
}
  
public void printInvoice() {
// Print student info
System.out.println(this.toString());
  
// Print tuter information
System.out.println(tuter.toString());
  
// print the invoices details
System.out.printf("Rate per Hour: $%.2f\n", tuter.getRatePerHour());
System.out.println("Hours of Instruction: " + tuter.getHoursOfInstrction());
  
//Print the discount applied
System.out.printf("Discount applied: $%.2f\n", this.getDiscountAmount());
System.out.printf("Total Due : $%.2f\n", (tuter.getTotalDue() - this.getDiscountAmount()));
}
}

**************************************************************************************

Tuter.java File:


public class Tuter extends Person{
private int hoursOfInstrction;
private double ratePerHour;
private final static int MAX_HOURS = 30;
public Tuter(String name) {
super(name);
this.hoursOfInstrction = 0;
this.ratePerHour = 10.00;
}
/**
* @return the hoursOfInstrction
*/
public int getHoursOfInstrction() {
return hoursOfInstrction;
}

/**
* @param hours the hoursOfInstrction to set
*/
public boolean addHoursOfInstrction(int hours) {
if(this.hoursOfInstrction + hours <= MAX_HOURS) {
this.hoursOfInstrction+= hours;
return true;
}else
return false;
}

  
public double getRatePerHour() {
return ratePerHour;
}


public void setRatePerHour(double ratePerHour) {
this.ratePerHour = ratePerHour;
}
  
  
public double getTotalDue() {
return this.getRatePerHour() * this.getHoursOfInstrction();
}

@Override
public String toString() {
return "Tuter Name: " + super.getName();
}
}

**************************************************************************************

Driver .java File


public class Driver {

public static void main(String[] args) {
//Create a Tuter object
Tuter tuter = new Tuter("Sara");
// Create a Student object and assign the tuter
Student student = new Student("Mai Do", 19, tuter);
int hours;
Scanner scan = new Scanner(System.in);
String choice;
do {
System.out.println("Enter the amount of hours:");
hours = scan.nextInt();
//If tuter can teach more
if(tuter.addHoursOfInstrction(hours)) {
System.out.println("Do you want to teach more? yes/no");
choice = scan.next();
}else
break;
}while(choice.equals("yes"));
  
student.printInvoice();

System.out.println("Another tuter:");

}
}

**************************************************************************************

In: Computer Science

Question 2: Translation is another name for protein synthesis. There are three steps that take place...

Question 2:

Translation is another name for protein synthesis. There are three steps that take place repeatedly during elongation.

a) Give the name and a short description of what happens during the first step of elongation during translation?

b) Give the name and a short description of what happens during the second step of elongation during translation?

C) Give the name and a short description of what happens during the third step of elongation during translation?

Please help! Thanks

In: Biology

1. Which chemical is formed upon the addition of HCl to methyl orange? Name (not IUPAC)...

1. Which chemical is formed upon the addition of HCl to methyl orange? Name (not IUPAC) and draw it.

2. Which chemical is formed upon the addition of NaOH to methyl orange? Name (not IUPAC) and draw it. Explain how you know.

3. Which chemical is formed upon the addition of HCl to phenolphthalein? Name (not IUPAC) and draw it.

4. Which chemical is formed upon the addition of NaOH to phenolphthalein? Name (not IUPAC) and draw it. Explain how you know.

In: Chemistry

Write an application that allows a user to enter the names and birthdates of up to...

Write an application that allows a user to enter the names and birthdates of up to 10 friends. Continue to prompt the user for names and birthdates until the user enters the sentinel value ZZZ for a name or has entered 10 names, whichever comes first. When the user is finished entering names, produce a count of how many names were entered, and then display the names. In a loop, continuously ask the user to type one of the names and display the corresponding birthdate or an error message if the name has not been previously entered. The loop continues until the user enters ZZZ for a name. Save the application as BirthdayReminder.java.

My issue in this is the loop portion. I am not sure if I have done it properly. I also need help trying to comment this code so I can explain it better. Could someone help analyze my code so that I can properly do this JAVA assignment? Please include comments as well inside the code.

Here is what I have so far:

import java.util.*;

public class BirthdayReminder{

public static void main(String[] args)

{

final int NUM_NAMES = 10;

String sentinal = "ZZZ";

int count = 0;

String name = null;

String birthdate = null;

String[] names = new String[NUM_NAMES];

String[] birthdates = new String[NUM_NAMES];

Scanner input = new Scanner(System.in);

System.out.println("Enter a name or " + sentinal + " to quit > ");

name = input.nextLine();

while(name.compareTo(sentinal)!=0 && count < NUM_NAMES)

{

System.out.println("Enter birthdate (mm/dd) > ");

birthdate = input.nextLine();

names[count] = name.trim();

birthdates[count] = birthdate.trim();

System.out.println("Enter a name or " + sentinal + " to quit > ");

name = input.nextLine();

++ count;

}

System.out.println("\nCount of names is " + count);

System.out.println("\nNames are:" + count);

for(int x = 0; x < count; ++x)

System.out.println(names[x]) ;

boolean repeat = true;

boolean found;

while(repeat)

{

found=false;

System.out.println("\nEnter a name or " + sentinal + " to quit > ");

name = input.nextLine().trim();

if(name.compareTo(sentinal)==0)

repeat = false;

else

{

for(int x = 0; x < count; ++x)

{

if(names[x].compareTo(name)==0)

{

found =true;

birthdate = birthdates[x];

break;

}

}

if(found)

System.out.println("Birthdate of " + name + " is " + birthdate);

else

System.out.println("Birthdate of " + name + " is not found");

}

}

}

}

In: Computer Science

Castle Furnishings Company's perpetual inventory records indicate that $675,400 of merchandise should be on hand on...

Castle Furnishings Company's perpetual inventory records indicate that $675,400 of merchandise should be on hand on November 30, 2016. The physical inventory indicates that $663,800 of merchandise is actually on hand.
Journalize the adjusting entry for the inventory shrinkage for Castle Furnishings Company for the year ended November 30, 2016. Assume that the inventory shrinkage is a normal amount. Refer to the Chart of Accounts for exact wording of account titles.

In: Accounting