Questions
1.List three important things that kidneys do to REGULATE your blood chemistry 2.List two types of...

1.List three important things that kidneys do to REGULATE your blood chemistry

2.List two types of molecules or cells that are retained by the glomerulus. Explain why these items are NOT filtered out of the blood.

3.Describe how urea is used in the loop of the nephron to create the countercurrent multiplier system. What other benefit does this have for the body

In: Anatomy and Physiology

Hello, I am having trouble getting started on my project and building these functions. How do...

Hello, I am having trouble getting started on my project and building these functions. How do I build a function that continuously adds new "slices" to the list if they are below/above the size limit? I didn't copy the entire problem, but just for reference, when the code is run it will take user input for size limit (L), time cost for a random slice(R), and time cost for an accurate slice(A).

Question:

In real life, a steak is a 3-dimensional object, but for this project, let’s simplify the situation so that we are only chopping along a single dimension. In other words, imagine we just want really thin slices of beef (but the slices can be as tall and long as the steak itself). We can represent the length of steak using a numeric interval, let’s say 0 to 100 (where 0 is the left-most edge of beef and 100 is the right-most edge, and 50 is right in the middle, etc.). Then we can represent the location of a “slice” numerically so that, for instance, if we wanted to slice the beef into exact quarters we would have to cut at lengths 25, 50, and 75. Indeed, let’s agree to store all of the slices we make as an ordered list of numbers, where [0,100] represents an uncut steak, [0,25,50,75,100] represents a steak cut into even quarters, and [0, 13, 46, 77, 100] represents a steak cut into random, uneven quarters.

First, write two functions called fast slices and slow slices. Each function should take two inputs, slice list and size limit. The slice list input represents the current list of slices (see previous paragraph), and size limit represents the size we’re trying to get all pieces to be smaller than or equal to. The fast slices function should take the slice list and continually add random slices until all pieces are within the size limit. The slow slices function should take the slice list and continually look for pieces larger than the size limit and (from left to right) slicing them into smaller pieces with size exactly equal to the size limit. Both fast slices and slow slices must return the new slice list. Second, write another function called ave chop time which takes six inputs: slice list, fast limit, slow limit, fast cost, slow cost, and n. The slice list once again represents a list of slices (probably just an uncut steak [0,100]), the fast limit is the size limit for the fast slices, slow limit is the size limit for the slow slices, fast cost is the time it costs to do a fast slice, and slow cost is the time it costs to do a slow slice.

The function should take the slice list, run it through the fast slices function using fast limit as the size limit, then run it through the slow slices function using slow limit as the size limit. After each function, you can calculate the number of slices performed by comparing the length of the slice list before and after the function. Once you know the number of fast slices and slow slices, multiply them by fast cost and slow cost, respectively, and add together to calculate the total time it took to chop the beef. Finally, this whole process should be repeated n times and the average total time should be returned.

In: Computer Science

I am implementing a generic List class and not getting the expected output. My current output...

I am implementing a generic List class and not getting the expected output.

My current output is: [0, 1, null]

Expected Output in a separate test class:

List list = new SparseList<>(); 
list.add("0");
list.add("1");
list.add(4, "4");

will result in the following list of size 5: [0, 1, null, null, 4].

list.add(3, "Three");

will result in the following list of size 6: [0, 1, null, Three, null, 4].

list.set(3, "Three");

is going to produce a list of size 5 (unchanged): [0, 1, null, Three, 4].

When removing an element from the list above, via list.remove(1); the result should be the following list of size 4: [0, null, Three, 4]

import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

public class SparseList<E> implements List<E>{
    private int endIndex = 0;
    
    private HashMap<Integer,E> list;
    
    public SparseList() {
        list = new HashMap<>();
    }
    
    public SparseList(E[] arr) {
        list = new HashMap<>();
        for(int i = 0; i <arr.length; i++) {
            list.put(i, arr[i]);
        }
        endIndex = arr.length - 1;
    }
    
    @Override
    public boolean add(E e) {
        list.put(endIndex, e);
        endIndex++;
        return true;
    }
    
    @Override
    public void add(int index, E element) {
        list.put(index, element);
    }
    
    @Override
    public E remove(int index) {
        return list.remove(index);
    }
    
    @Override
    public E get(int index) {
        return list.get(index);
    }
    
    @Override
    public E set(int index, E element) {
        E previous = list.get(index);
        list.put(index, element);
        return previous;
    }
    
    @Override
    public int size() {
        return endIndex + 1;
    }

    @Override
    public void clear() {
        list.clear();
        
    }
    
    @Override
    public boolean isEmpty() {
        return list.isEmpty();
    }

    @Override
    public String toString() {
        String s = "";
        for(int i = 0; i < list.size(); i++) {
            if(list.get(i) == null) {
                s += "null, ";
            }else {
            s += list.get(i).toString() + ", ";
        }
        }
        return "[" + s + "]";
    }

    @Override
    public boolean contains(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Iterator<E> iterator() {
        throw new UnsupportedOperationException();
    }

    @Override
    public Object[] toArray() {
        throw new UnsupportedOperationException();
    }

    @Override
    public <T> T[] toArray(T[] a) {
        throw new UnsupportedOperationException();
    }


    @Override
    public boolean containsAll(Collection<?> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean addAll(Collection<? extends E> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean addAll(int index, Collection<? extends E> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean removeAll(Collection<?> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean retainAll(Collection<?> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean remove(Object o) {
        throw new UnsupportedOperationException();
    }
    
    @Override
    public int indexOf(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public int lastIndexOf(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public ListIterator<E> listIterator() {
        throw new UnsupportedOperationException();
    }

    @Override
    public ListIterator<E> listIterator(int index) {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<E> subList(int fromIndex, int toIndex) {
        throw new UnsupportedOperationException();
    }

}

In: Computer Science

I am implementing a generic List class and not getting the expected output. My current output...

I am implementing a generic List class and not getting the expected output.

My current output is: [0, 1, null]

Expected Output in a separate test class:

List list = new SparseList<>(); 
list.add("0");
list.add("1");
list.add(4, "4");

will result in the following list of size 5: [0, 1, null, null, 4].

list.add(3, "Three");

will result in the following list of size 6: [0, 1, null, Three, null, 4].

list.set(3, "Three");

is going to produce a list of size 5 (unchanged): [0, 1, null, Three, 4].

When removing an element from the list above, via list.remove(1); the result should be the following list of size 4: [0, null, Three, 4]

import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

public class SparseList<E> implements List<E>{
    private int endIndex = 0;
    
    private HashMap<Integer,E> list;
    
    public SparseList() {
        list = new HashMap<>();
    }
    
    public SparseList(E[] arr) {
        list = new HashMap<>();
        for(int i = 0; i <arr.length; i++) {
            list.put(i, arr[i]);
        }
        endIndex = arr.length - 1;
    }
    
    @Override
    public boolean add(E e) {
        list.put(endIndex, e);
        endIndex++;
        return true;
    }
    
    @Override
    public void add(int index, E element) {
        list.put(index, element);
    }
    
    @Override
    public E remove(int index) {
        return list.remove(index);
    }
    
    @Override
    public E get(int index) {
        return list.get(index);
    }
    
    @Override
    public E set(int index, E element) {
        E previous = list.get(index);
        list.put(index, element);
        return previous;
    }
    
    @Override
    public int size() {
        return endIndex + 1;
    }

    @Override
    public void clear() {
        list.clear();
        
    }
    
    @Override
    public boolean isEmpty() {
        return list.isEmpty();
    }

    @Override
    public String toString() {
        String s = "";
        for(int i = 0; i < list.size(); i++) {
            if(list.get(i) == null) {
                s += "null, ";
            }else {
            s += list.get(i).toString() + ", ";
        }
        }
        return "[" + s + "]";
    }

    @Override
    public boolean contains(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Iterator<E> iterator() {
        throw new UnsupportedOperationException();
    }

    @Override
    public Object[] toArray() {
        throw new UnsupportedOperationException();
    }

    @Override
    public <T> T[] toArray(T[] a) {
        throw new UnsupportedOperationException();
    }


    @Override
    public boolean containsAll(Collection<?> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean addAll(Collection<? extends E> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean addAll(int index, Collection<? extends E> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean removeAll(Collection<?> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean retainAll(Collection<?> c) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean remove(Object o) {
        throw new UnsupportedOperationException();
    }
    
    @Override
    public int indexOf(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public int lastIndexOf(Object o) {
        throw new UnsupportedOperationException();
    }

    @Override
    public ListIterator<E> listIterator() {
        throw new UnsupportedOperationException();
    }

    @Override
    public ListIterator<E> listIterator(int index) {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<E> subList(int fromIndex, int toIndex) {
        throw new UnsupportedOperationException();
    }

}
8.4.3

In: Computer Science

What is pneumonia? What nursing interventions would you initiate for a patient with pneumonia? How would...

  1. What is pneumonia?
  2. What nursing interventions would you initiate for a patient with pneumonia?
  3. How would this impact their daily living?
  4. List some focus points for patient teaching.
  5. List 5 things for this patient that you would want to know in morning report.

In: Nursing

Sort the list A[ ]={ 20, 13,4, 34, 5, 15, 90, 100, 75, 102, 112, 1}...

  1. Sort the list A[ ]={ 20, 13,4, 34, 5, 15, 90, 100, 75, 102, 112, 1} using Insertion Sort and determine the total number of comparisons made (do not count swaps)

b.Sort the list stated in 5a) but using Merge Sort

In: Computer Science

What is a bowel perforation? What is a hemicolectomy? What would be your priority assessment? What...

  1. What is a bowel perforation? What is a hemicolectomy?
  2. What would be your priority assessment?
  3. What are signs/symptoms of a pulmonary embolism?
  4. List 5 things for this patient that you would like to know in morning report.
  5. List some focus points for patient teaching.

In: Nursing

A rectangle has one side on the x-axis and two vertices on the curve y=2/(1+x^2) Find...

A rectangle has one side on the x-axis and two vertices on the curve y=2/(1+x^2) Find the vertices of the rectangle with maximum area. Enter your answer as a list of points (a, b) separated by semicolons. The order of the list does not matter.

In: Math

What money is money? Why it is necessary to have money? Among the two types of...

  1. What money is money?
  2. Why it is necessary to have money?
  3. Among the two types of money, which money is more important? Why?
  4. List two functions of Central Bank?
  5. List two ways the Central Bank of Kuwait can control money supply?

In: Economics

Choose four items from the following list. For the four items you choose, describe their roles...

Choose four items from the following list. For the four items you choose, describe their roles in skeletal muscle contraction.

List to choose from:

  • acetylcholine
  • actin
  • ATP
  • Ca2+
  • myosin
  • sarcomere
  • SR (sarcoplasmic reticulum)
  • T-tubules
  • troponin
  • tropomyosin

In: Biology