Questions
A student turned in the following protocol to determine the effect of pH on the rate...

A student turned in the following protocol to determine the effect of pH on the rate of emergence of ocean dwelling water bears from their capsules. The directions that were given were to provide a procedure detailed enough that could be used by any student in the class. Students were told that the pH of seawater ranges from 7.5-8.4. There are several problems with this protocol. List each problem then explain how you would change the protocol to solve the problem.

Protocol: One diapausing marine animal was placed in a cup of tap water and the water was stirred until the animal fully emerged from the capsule. The time it took for the animal to emerge was recorded. The experiment was repeated with tap water at different pH’s.

In: Biology

Does anyone know how to find if a certain String is available in an ArrayList? I...

Does anyone know how to find if a certain String is available in an ArrayList?

I was asked by my instructor to make a certain program about Student Record

In the area where I need to add some student in the ArrayList it won't add if there is the same name in the ArrayList

at first I used the equals method and contains method but later I found it was prohibited to use such method.

Is there a way to find if a String is Available in the ArrayList without using the method

Please check on else if(response==2)

import java.util.*;
public class performanceTask {

   public static void main(String[] args) {
       int response;
       ArrayList<String> listOfStudent = new ArrayList<String>();

       Scanner aScanner = new Scanner(System.in);
       do {
           System.out.println("[Selection Bar]");
           System.out.println("[1] List of Students.");
           System.out.println("[2] Add Student.");
           System.out.println("[3] Edit Student.");
           System.out.println("[4] Delete Student.");
           System.out.println("[5] Clear list of Students.");
           System.out.println("[6] Exit Program.");
           System.out.println("--------------------------");
           System.out.println("Select an option: ");
           response = aScanner.nextInt();
          
           if(response == 1) {
               int size = listOfStudent.size();
               if(size == 0) {
                   System.out.println("No Records Found!\n");
               } else {
                   Collections.sort(listOfStudent);
                   for(int i = 0; i<listOfStudent.size(); i++) {
                       System.out.println(i + ". " + "[" + listOfStudent.get(i) + "]");
                      
                   }
                   System.out.println("\n");
              
               }
           }else if (response == 2) {
               System.out.println("Enter Name of a Student: ");
               String addStudent = aScanner.next();
              
               if (listOfStudent.contains(addStudent)) {
                   System.out.println(addStudent +" already existed! \n");
                  
               } else {
                   System.out.println("Do you want to save " + addStudent + "? [y/n]: ");
                   String saveIt = aScanner.next();
                       if(saveIt.equals("y") || saveIt.equals("Y") ) {
                           listOfStudent.add(addStudent);
                           System.out.println(addStudent +" has been successfully added! \n ");
                       }else if (saveIt.equals("n") || saveIt.equals("n")) {
                           System.out.println("\n");
                           continue;
                       }else {
                           System.out.println("It must be y or n only!");
                       }
                   }
              

In: Computer Science

PYTHON LANGUAGE PLEASE DO NUMBER 5 ONLY """ # 1. Based on Textbook R6.28 # Create...

PYTHON LANGUAGE

PLEASE DO NUMBER 5 ONLY

"""
# 1. Based on Textbook R6.28
# Create a table of m rows and n cols and initialize with 0
m = 3
n = 4

# The long way:
table = []
for row in range(m) :
table.append([0]*n)   

# The short way:

# 2. write a function to print the table in row, column format,
# then call the function
'''
# using index
def printTable(t):
for i in range(len(t)) : # each i is an index, i = 0,1,2
for j in range(len(t[i])) : # j = 0,1,2,3
print(t[i][j], end=' ')
print()
'''
# without index:
def printTable(t):
for row in t :
for col in row :
print(col, end=' ')
print()
print()

printTable(table)


# what does the following print?

for i in range(m):
for j in range(n):
table[i][j] = i + j

printTable(table)
'''
Answer:
print: from these index values:
0 1 2 3 [0,0] [0,1] [0,2] [0,3]
1 2 3 4 [1,0] [1,1] [1,2] [1,3]
2 3 4 5 [2,0] [2,1] [2,2] [2,3]
'''
  
# 3. copy table to table2
table2 = copy.deepcopy(table)

'''
table2 = table => table2 is another reference to the same mem location
table2 = table.copy() => shallow copy
only copy the 1D list (outer list) of references,
which has row1 - row4 references
table => [ row1 => [ , , , ]
row2 => [ , , , ]
row3 => [ , , , ]
row4 => [ , , , ]
]
'''
  
table[0][0] = -1 # will table2 be changed? No
printTable(table2)


# 4. fill elements of bottom row of table2 with -1's
# and all elements of left col of table2 with 0's

for i in range(len(table2[-1])) :
table2[-1][i] = -1
  
for i in range(len(table2)) :
table2[i][0] = 0
  
printTable(table2)
"""
"""
# 5. We start with a dictionary of student ids and associated gpa's
d = {123:3.7, 456:3.8, 789:2.7, 120:2.8}
print(d)

# create a list of sid list and a tuple of gpa from d

# create a list of tuples (k,v) from d

# How do you construct a dictionary from a list of tuples?


# How do you construct a dictionary from the list of id and gpa?


"""

In: Computer Science

Consider that oil can have 10 levels of quality v. Assume that there are the 10...

Consider that oil can have 10 levels of quality v. Assume that there are the 10 oil producers that produce at each level and can produce the same amount of oil. The cost of producing oil at level v is 2 3 v. Also assume that oils are sold at the international markets and buyers cannot examine the oil quality directly. Assume that there are a lot of consumers, and that their willingness to pay for oil of quality v is v. i.e., if the consumers knew which type of oil they buy, they were willing to pay $v for it. As consumers cannot tell the difference, when buying, between the different quality of oil, they are willing to pay for the average quality oil. For example, if there were only producers of oil at quality 4 and 6 in the market, then the price the consumers were willing to pay is 0.5 × 4 + 0.5 × 6 = 5.

Which producers would be willing to sell in that price?

In: Economics

Select one of the following cases or find one on your own and provide a summary...

Select one of the following cases or find one on your own and provide a summary of the situation that caused the lawsuit related to arbitration to end up in court. How did the court rule and why? Do you agree?

  • Carey v. 24 Hour Fitness, USA, Inc., 669 F.3d 202, 205 (5th Cir. 2012).
  • Circuit City Stores, Inc.5 v. Adams 532 U.S. 105 (2001)
  • Cruise v. Kroger Co., 233 Cal.App 4th 390, 183 Cal. Rptr. 3d 17 (2015).
  • Delfingen US–Texas, L.P. v. Valenzuela, 407 S.W.3d 791, 800 (Tex.App.-El Paso
    2013, no pet.).
  • Mohamed v. Uber Technologies, Inc. 2015 WL 3749716 (N.D. Cal. 2015).
  • Nitro-Lift Technologies, L.L.C. v. Howard, 133 S.Ct. 500 (2012).

  

In: Operations Management

1.) the magnitude of the magnetic field outside of a solenoid is: -almost zero -depends on...

1.) the magnitude of the magnetic field outside of a solenoid is:
-almost zero
-depends on the type of wire used
-depends on the radius
2.) two wires emerge from a clock face at 90° from the face. One wire is at 3 o’clock and has a current of 2.5 A coming out of the clock face. The other is at 9 o’clock and has a current of 5.0A coming out of the clock face. What can we say about the magnetic field at the center of the clock?
- The B field will be pointed towards 6 o’clock
- The B field will be pointed towards 12 o’clock
- The field will point in a number of different directions
3.) a power transformer with primary coil has 450 loops and the secondary coil has 32 loops what is true about this transformer
-V in> V out
-V in= V out
-v in < V out

In: Physics

Let V be the set of all ordered triples of real numbers. For u = (u1,...

Let V be the set of all ordered triples of real numbers. For u = (u1, u2, u3) and v = (v1, v2, v3), we define the following operations of addition and scalar multiplication on V :

u + v = (u1 + v1, u2 + v2 − 1, u3 + v3 − 2) and ku = (ku1, ku2, ku3).

For example, if u = (1, 0, 3), v = (2, 1, 1), and k = 2 then

u + v = (1 + 2, 0 + 1 − 1, 3 + 1 − 2) = (3, 0, 2) and 2u = (2 · 1, 2 · 0, 2 · 3) = (2, 0, 6).

Complete the following:

(a) Calculate (1, 1, 1) + (2, 2, 2).

(b) Show that (0, 0, 0) 6= 0.

(c) What is 0?

(d) State a vector space axiom that fails to hold. Give an example to justify your claim.

In: Math

A local university found it could classify its students into one of three general categories: morning...

A local university found it could classify its students into one of three general categories: morning students (42%), afternoon students (33%), and evening students. 37% of the morning students, 23% of the afternoon students, and 16% of the evening students live on campus. What is the probability a non-evening student does not live on campus?

In: Math

Q1. In a class of 50 students, the number of students who offer Accounting is twice...

Q1. In a class of 50 students, the number of students who offer Accounting is twice as the number who offer Economics. 10 students offer neither of the two students and 5 student offer both subjects.
i.) Illustrate the information on a Venn diagram.
ii.) How many students offer Accounting?
iii.) How many students offer only one subjects?


Q2. In a class of 60 students, the number of students who passed Biology is 6 more than the number who passed chemistry. Every student passed at least one of the two subjects and 8 students passed both subjects.
i.) How many students passed Biology?
ii.) How many students passed Chemistry?
iii.) How many students passed only one subjects?

In: Advanced Math

Need this program Using Classes , Objects, Save to file, and Printbill Simple python assignment Write...

Need this program Using Classes , Objects, Save to file, and Printbill Simple python assignment

Write a menu-driven program for Food Court. (You need to use functions!) Display the food menu to a user (Just show the 5 options' names and prices - No need to show the Combos or the details!) Ask the user what he/she wants and how many of it. (Check the user inputs) AND Use strip() function to strip your inputs. Keep asking the user until he/she chooses the end order option. (You can pass quantity1, quantity2, quantity3, quantity4 & quantity5 to save the quantities of the orders) Calculate the price. Ask the user whether he/she is a student or a staff. There is no tax for students and 9% tax for staffs. Add the tax price to the total price. Tax Cupertino 9.000% Santa Clara Display the bill to the user. The bill includes: The food items The quantities The cost of them The total before tax Tax amount Total price after tax You can have your own design but you need to have a main function and get started from the main function. For example: def main(): displayMenu() . . displayBill(..) main() or if __name__ == "__main__": main() The name of functions also up to your design but they should show what the functions do. Only display 2 decimal points when displaying all the numbers. Put at least two outputs (results after you run your code) at the end of your code as a multi-line comment. Don't forget to put your name and a short description of your code on the top on your code. Don't forget to test your code with Positive and Negative Testing! (For more information see this page Testing)

In: Computer Science