Questions
what is the concept of bottleneck link?

what is the concept of bottleneck link?

In: Computer Science

Java iteration method, I need a method which iterates through a collection of books and adjusts...

Java iteration method, I need a method which iterates through a collection of books and adjusts the price of all books published between the given parameters to give a 20% discount off the price of each book published between the given years?

Book class

public class Book
{

    private String title;
    private String author;
    private int yearPublished;
    private double bookPriceInCAD;


    public Book(String inputTitle, String inputAuthor, int inputYearPublished, double inputBookPriceInCAD){
     setTitle(inputTitle);
     setAuthor(inputAuthor);
     setYearPublished(inputYearPublished);
     setBookPriceInCAD(inputBookPriceInCAD);
    }

    public String getTitle(){
        return title;
    }

    public String getAuthor(){
        return author;
    }

    public int getYearPublished(){
        return yearPublished;
    }

    public double getBookPriceInCAD(){
        return bookPriceInCAD;
    }

    public void setTitle(String title){
        if(title !=null && !title.isEmpty()){
            this.title = title;
        } else if(title == null){
            throw new IllegalArgumentException("title cannot be null");
        } else if(title.isEmpty()){
            throw new IllegalArgumentException("title cannot be an empty String");
        }
     }

     public void setAuthor(String author){
        if(author !=null && !author.isEmpty()){
            this.author = author;
        } else if(author == null){
            throw new IllegalArgumentException("author cannot be null");
        } else if(author.isEmpty()){
            throw new IllegalArgumentException("author cannot be an empty String");
        }
    }

    public void setYearPublished(int yearPublished){
        if(yearPublished > 0){
            this.yearPublished = yearPublished;
        } else {
            throw new IllegalArgumentException("year published cannot be negative");
        }
      }

    public void setBookPriceInCAD(double bookPriceInCAD){
        if(bookPriceInCAD > 0){
            this.bookPriceInCAD = bookPriceInCAD;
        } else {
            throw new IllegalArgumentException("book price in CAD cannot be negative");
        }
    }

BookStore Class

import java.util.ArrayList;
import java.util.Iterator;
public class BookStore
{
  

    private ArrayList<Book> bookList;
    private String businessName;
  

    public BookStore()
    {
        // initialise instance variables
        bookList = new ArrayList<Book>();
        businessName = "Book Store";
      
    }

    public BookStore(String inputBusinessName){
        setBusinessName(inputBusinessName);
        bookList = new ArrayList<Book>();
     }


    public void setBusinessName(String businessName){
        if(businessName !=null && !businessName.isEmpty()){
            this.businessName = businessName;
        } else if(businessName == null){
            throw new IllegalArgumentException("business Name cannot be null");
        } else if(businessName.isEmpty()){
            throw new IllegalArgumentException("business Name cannot be an empty String");
        }
     }

    public String getBusinessName(){
        return businessName;
    }

    public ArrayList<Book> getBookList(){
        return bookList;
    }

    public void addBook(Book book){
      if(book!=null){
          bookList.add(book);
    }
    }

    public void getBook(int index) {
    if((index >= 0) && (index <= bookList.size())) {
        Book oneBook = bookList.get(index);              
        oneBook.displayDetails();
    }
    else{
        System.out.println("Invalid index position");
    }
    }

    public void searchBook(String title){
        for(Book b: bookList){
         String bookTitle = b.getTitle();
        if(bookTitle.equalsIgnoreCase(title)){
            b.displayDetails();
        } else{
            System.out.println("book not found");
    }
    }
    }

    public void displayBookDetails(){
        for(Book oneBook: bookList){
            oneBook.displayDetails();
          
      }
    }
  

    public static void main(String[] args){
        BookStore list = new BookStore();
        Book b1 = new Book("hello world","steven segal",2005,20.00);
        Book b2 = new Book("goodbye world","Jeff country", 208,10.00);
        Book b3 = new Book("no world","Bill Nye",202,30.00);
        list.addBook(b1);
        list.addBook(b2);
        list.addBook(b3);
        list.getBook(4);
        list.getBook(2);

        list.displayBookDetails();
    }
  
       public int donateBook(int yearPublished){
        Iterator<Book> iter = bookList.iterator();
        int count = 0;
        while(iter.hasNext()){
            Book aBook = iter.next();
          
            if(yearPublished <= aBook.getYearPublished()){
                iter.remove();
                count++;
            }
        }
        return count;
    }
    public void applyDiscountToBook(int beginYear, int endYear){
    }
   

In: Computer Science

Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is...

Implement a priority queue using a DoublyLinkedList where the node with the highest priority (key) is the right-most node.
The remove (de-queue) operation returns the node with the highest priority (key).
If displayForward() displays List (first-->last) : 10 30 40 55
remove() would return the node with key 55.
Demonstrate by inserting keys at random, displayForward(), call remove then displayForward() again.
You will then attach a modified DoublyLinkedList.java (to contain the new priorityInsert(long key) and priorityRemove() methods), and a driver to demonstrate as shown above.

Use the provided PQDoublyLinkedTest.java to test your code.

public class PQDoublyLinkedTest
{
    public static void main(String[] args)
    {                             // make a new list
        DoublyLinkedList theList = new DoublyLinkedList();

        theList.priorityInsert(22);      // insert at front
        theList.priorityInsert(44);
        theList.priorityInsert(66);

        theList.priorityInsert(11);       // insert at rear
        theList.priorityInsert(33);
        theList.priorityInsert(55);
        
        theList.priorityInsert(10);
        theList.priorityInsert(70);
        theList.priorityInsert(30);

        theList.displayForward();     // display list forward
        Link2 removed = theList.priorityRemove();
        System.out.print("priorityRemove() returned node with key: ");
        removed.displayLink2();
        
    }  // end main()
}  // end class PQDoublyLinkedTest

_____________________________________________________________________________________________________________________________________________________

// doublyLinked.java
// demonstrates doubly-linked list
// to run this program: C>java DoublyLinkedApp

class Link
{
public long dData; // data item
public Link next; // next link in list
public Link previous; // previous link in list

public Link(long d) // constructor
{ dData = d; }

public void displayLink() // display this link
{ System.out.print(dData + " "); }

} // end class Link

class DoublyLinkedList
{
private Link first; // ref to first item
private Link last; // ref to last item

public DoublyLinkedList() // constructor
{
first = null; // no items on list yet
last = null;
}

public boolean isEmpty() // true if no links
{ return first==null; }

public void insertFirst(long dd) // insert at front of list
{
Link newLink = new Link(dd); // make new link

if( isEmpty() ) // if empty list,
last = newLink; // newLink <-- last
else
first.previous = newLink; // newLink <-- old first
newLink.next = first; // newLink --> old first
first = newLink; // first --> newLink
}

public void insertLast(long dd) // insert at end of list
{
Link newLink = new Link(dd); // make new link
if( isEmpty() ) // if empty list,
first = newLink; // first --> newLink
else
{
last.next = newLink; // old last --> newLink
newLink.previous = last; // old last <-- newLink
}
last = newLink; // newLink <-- last
}

public Link deleteFirst() // delete first link
{ // (assumes non-empty list)
Link temp = first;
if(first.next == null) // if only one item
last = null; // null <-- last
else
first.next.previous = null; // null <-- old next
first = first.next; // first --> old next
return temp;
}

public Link deleteLast() // delete last link
{ // (assumes non-empty list)
Link temp = last;
if(first.next == null) // if only one item
first = null; // first --> null
else
last.previous.next = null; // old previous --> null
last = last.previous; // old previous <-- last
return temp;
}

// insert dd just after key
public boolean insertAfter(long key, long dd)
{ // (assumes non-empty list)
Link current = first; // start at beginning
while(current.dData != key) // until match is found,
{
current = current.next; // move to next link
if(current == null)
return false; // didn't find it
}
Link newLink = new Link(dd); // make new link

if(current==last) // if last link,
{
newLink.next = null; // newLink --> null
last = newLink; // newLink <-- last
}
else // not last link,
{
newLink.next = current.next; // newLink --> old next
// newLink <-- old next
current.next.previous = newLink;
}
newLink.previous = current; // old current <-- newLink
current.next = newLink; // old current --> newLink
return true; // found it, did insertion
}

public Link deleteKey(long key) // delete item w/ given key
{ // (assumes non-empty list)
Link current = first; // start at beginning
while(current.dData != key) // until match is found,
{
current = current.next; // move to next link
if(current == null)
return null; // didn't find it
}
if(current==first) // found it; first item?
first = current.next; // first --> old next
else // not first
// old previous --> old next
current.previous.next = current.next;

if(current==last) // last item?
last = current.previous; // old previous <-- last
else // not last
// old previous <-- old next
current.next.previous = current.previous;
return current; // return value
}

public void displayForward()
{
System.out.print("List (first-->last): ");
Link current = first; // start at beginning
while(current != null) // until end of list,
{
current.displayLink(); // display data
current = current.next; // move to next link
}
System.out.println("");
}

public void displayBackward()
{
System.out.print("List (last-->first): ");
Link current = last; // start at end
while(current != null) // until start of list,
{
current.displayLink(); // display data
current = current.previous; // move to previous link
}
System.out.println("");
}

} // end class DoublyLinkedList

class DoublyLinkedApp
{
public static void main(String[] args)
{ // make a new list
DoublyLinkedList theList = new DoublyLinkedList();

theList.insertFirst(22); // insert at front
theList.insertFirst(44);
theList.insertFirst(66);

theList.insertLast(11); // insert at rear
theList.insertLast(33);
theList.insertLast(55);

theList.displayForward(); // display list forward
theList.displayBackward(); // display list backward

theList.deleteFirst(); // delete first item
theList.deleteLast(); // delete last item
theList.deleteKey(11); // delete item with key 11

theList.displayForward(); // display list forward

theList.insertAfter(22, 77); // insert 77 after 22
theList.insertAfter(33, 88); // insert 88 after 33

theList.displayForward(); // display list forward
} // end main()
} // end class DoublyLinkedApp

____________________________________________________________________________________________________________________________________________________

In: Computer Science

where should amazon have built headquaters #2 ? they chose NYC and Alexandria Va, in your...

where should amazon have built headquaters #2 ? they chose NYC and Alexandria Va, in your opinion is these good choices ? what are positive and negatives of each location ? (1-2 pages)

where shoulf amazin have built there headquaters ? besides the location i named. is the locations i named good locations to havee built there headquarers ? explain why

In: Operations Management

>> So Plant Fantasies, we're landscape contractors that are based out of Manhattan, and we do...

>> So Plant Fantasies, we're landscape contractors that are based out of Manhattan, and we do interior and exterior landscaping and maintenance, design, green roof, contract flowers, and holiday decorations.

>> Steve is like my right-hand person in selling, in handling the customers, and in execution.

>> I think we both listen differently. So a lot of times I go in meetings with her, and she'll hear some of it, and I'll hear, you know, other things. So we both take away different things from the meeting. Theresa tends to really get into the relationship, but I'm more into the specifics. You have only so much time face to face with the client. So you really need to get as much information as you can, you know. Just be really blunt --

>> We do need to communicate on what we're sending out this week --

>> Yeah --

>> Because I'm a little nervous that the flower department doesn't exactly know what the new design is.

>> I don't think they do. Yeah. Yeah.

>> So I'm not sure how that happens. How does that happen? I thought I went over it --

>> It's like you said before. They tell you they understand when they actually don't --

>> Okay --

>> Understand.

>> I'm a big communicator. I think I'm really clear. I do get the feeling that no one listens to me sometimes, but I think I'm pretty clear. I maybe communicate too much if anything. That would be a fault of mine. Two of the designers are taking an OSHA class. You know, I already e-mailed them, like ten times today because I got, we're bidding on Mount Sinai, which is a really great project that we want to do the landscaping for, and I got some updates on the blueprints, and I wanted to make sure that they got them. So, you know, that was, like three or four e-mails, and some other questions, and, you know, I'll have, I'll chirp them later when they get a break.

>> I think that for me, I'm somewhat of a control freak. That I always need to know what's going on. That I will, I constantly check in. You know, nobody's stopping to look at the clock, and see okay, it's 4:00, let's call Steve because everybody's busy. So I kind of beat them to that. I don't think you can be, I don't think you can ever be too annoying.

>> Out of anxiety, there have been times in my career, you know, maybe even last year where I wasn't handling that anxiety as well. I used to e-mail, like all night sometimes, but then I started to feel like it was invasive and not fair to my employees. So I started, so now I write the e-mails, and I save them, and then in the morning I shoot them all out. We all have BlackBerrys so we all do Direct Connect, which is really helpful for us because I've got the trucks going around and people going around, and there's a lot of Direct Connect.

>> I think e-mail is probably the best way to get the basic information across, but for me, the back and forth on e-mail for a conversation you can have on the phone that would take a minute is a waste of time. I'd rather just make the phone call, you know, and get the right information and just move forward with it. When you can do it, when there's time, I think it's a great idea to always try and do face to face. You know, it's good for the customer, too. They really, you know, you want them to see you. You want them to remember you. You want them to see that you went through the time to come there. You didn't just shoot them an e-mail, you know, in a cab going somewhere else. They want to feel important. When I first started, I used to send out brochures and then chase them down, and, you know, you get a few hits from that, but most people I don't think actually look at them, and I think, unfortunately, it's the same thing with e-mail. You know, I get some e-mails sometimes, and I don't even, I just delete them because everything happens so fast. You're, like, all right, I don't have time for this. It's an advertisement. I don't care, you know. I think it's more of a, you really need to, you need to meet these people, and, you know, put this, so I can put a face with the name.

1-When Teresa talks about communicating with her employees, she says, “Now I write the emails and I save them. And then in the morning I shoot them all out.” Teresa’s emails are an example of

Upward communication

Downward communication

Horizontal communication

Parallel communication

2-This form of communication might not be effective if Teresa

Is communicating the weekly inventory totals to all of her her project managers

Wants to share an article about “green” certification standards with all of Plant Fantasies’ landscaping customers

Needs to tell someone in the flower department that customers have complained about his or her work

Is telling Plant Fantasies’ website designer what blog posts to use to update the site

In: Operations Management

A reaction takes place in a balloon such that 425 J of heat are taken in...

A reaction takes place in a balloon such that 425 J of heat are taken in from the surroundings and 193 J of work are done by the surroundings.

What is ΔE for the system? in J


What is ΔH for the surroundings? in J


What is ΔE for the universe? in J

In: Chemistry

Where have you seen real people rise to power, only to abuse their power or fail...

Where have you seen real people rise to power, only to abuse their power or fail to maintain a focus on others? What can you do to be more mindful of the paradox of power as you enter your next team experiance or start your career?

In: Operations Management

A. There are 10 users whose traffic is being multiplexed over a single link with a...

A. There are 10 users whose traffic is being multiplexed over a single link with a capacity of 2 Mbps. Suppose each user generates 100 kbps when busy, but is only busy (i.e., has data to send) 10% of the time. Would circuit-switching or packet-switching be preferable in this scenario? Why?

B. Continuing the previous problem, assume that the link capacity is still 2 Mbps, but the amount of traffic each user has to send when busy is increased to 1 Mbps, and that each of the 10 users still only has data to send 10% of the time. Would circuit-switching or packet-switching be preferable in this scenario? Why?

In: Computer Science

Which type of t inference procedure? (A: one sample, B: matched pairs, C: two samples) 1....

Which type of t inference procedure?

(A: one sample, B: matched pairs, C: two samples)

1. ______Is blood pressure altered by use of an oral contraceptive? Comparing a sample of women not using an OC with a sample of women taking it.

2. ______Average cholesterol level in general adult population is 175 mg/dl. Take a sample of adults with ‘high cholesterol’ parents. Is the mean cholesterol level higher in this population?

3. ______Does bread lose vitamin with storage? Take a sample of bread loaves and compare vitamin content right after baking and again after 3 days later.

4. ______Does bread lose vitamin with storage? Take a sample of bread loaves just baked and a sample of bread loaves stored for 3 days and compare vitamin content.

In: Math

A client sends a TCP segment to the server with Sequence Number 1400 and the payload...

A client sends a TCP segment to the server with Sequence Number 1400 and the payload included in the segment is 1399 bytes long.

- A. What is the ACK Number in the acknowledgement that is returned from the server?

- B. Assume this packet is lost but the following packet is received. What is the ACK Number in the acknowledgement that is returned from the server for this packet?

- C. Provide a detailed explanation for part B.

In: Computer Science

Based on the label instructions, adding 4.5 mL of diluent to a vial containing 500 mg...

Based on the label instructions, adding 4.5 mL of diluent to a vial containing 500 mg of powder will result in a concentration of 100 mg/mL. Calculate the volume of diluent to use if the desired concentration is 50mg/mL.

  1. 10 mL
  2. 0.5 mL
  3. 9.5 mL
  4. 1 mL

In: Nursing

In a minimum of 350 words, briefly compare and analyze two similar scenarios. Research scenarios that...

In a minimum of 350 words, briefly compare and analyze two similar scenarios. Research scenarios that took place in the real world within the past five years that are similar to the scenario above. Select two and briefly compare how each case is similar to the scenario given and analyze how they differ. Based on the research you have found with similar scenarios, identify and describe two steps the victims of the data breach at ABC Bank can take after being alerted that their personal information was compromised.

This is the Scenario is was given and I'm having a hard time finding anything.

You work for B&SC Security, a security firm that is in charge of monitoring data breaches for ABC Bank. In the 5 years that you have worked for B&SC Security, you now manage a team of people; one of your tasks is to make sure that the data at ABC Bank is safe and the networks are secure. In the summer of 2018, ABC Bank experienced its biggest data breach. It has well over 10 million customers and from those 10 million customers, 6.5 million customers’ personal information such as names, addresses, social security numbers, bank account numbers, etc. were compromised. Hackers were able to find a weak spot in the security network and exploit it to gain access to the information which they stole. The attack went unnoticed for 90 days. Your security firm is starting to learn that some of the information that was stolen is now being used by the hackers to commit identity theft. ABC Bank has now reached out to you regarding the breach and to prevent future security breaches from occurring. Since then, you have been in constant communication with the President of ABC Bank and working closely with her to determine what can be done about the information that has been compromised, what changes need to be made in terms of security, and what future trainings and resources can be implemented to prevent another major data breach.

Your task is to prepare an analytical report to the President of ABC bank that determines the effects of the breach that occurred and investigate methods that can be used to prevent this magnitude of a breach in the future.

In: Operations Management

Describe how personality in adulthood changes and also how it remains stable. According to Erikson, what...

Describe how personality in adulthood changes and also how it remains stable. According to Erikson, what is the major goal of adulthood? What types of experiences in adulthood would lead to that? According to the Big Five Factor of Personality, where do you think you fall on traits such as openness, conscientiousness, extroversion, agreeableness, and neuroticism?

One of the major personality stereotypes in adulthood is the concept of the midlife crisis. What do researchers say about the midlife crisis?

In: Psychology

Problem 2 Incheon International Airport (ICN) is the entrance to South Korea as well as a...

Problem 2

Incheon International Airport (ICN) is the entrance to South Korea as well as a connection hub for many cities in South Korea and other Asian countries. The airport’s top management is considering several proposals to expand the capacity of the check-in process. To better evaluate these proposals, the management asks you to identify passenger composition and the main resources in order to compute the current capacity at the airport. There are four groups of passengers as described below:

• Group A (international passengers with luggage check-in): 50% of the passengers

• Group B (international passengers without luggage check-in): 5% of the passengers

• Group C (domestic passengers with luggage check-in): 30% of the passengers

• Group D (domestic passengers without luggage check‐in): 15% of the passengers

There are four resources: self-service kiosks, kiosk agents, ID/Passport check, and security check. All passengers first need to check-in at the self-service kiosks. Then all international passengers continue to the kiosk agent to have their passport scanned and to check their luggage (if any). Any domestic passenger who needs to check luggage also proceeds to the kiosk agent to get the luggage tag and complete the check-in process. All the passengers then proceed to the ID/Passport check point and finally go through the security check before proceeding to the boarding gate.

However, the time required for each of these activities varies depending on the group of the passenger. All of the following activity times are expressed in minutes per passenger (assume the information is steady throughout the day):

Resources (min/passenger)
Passenger Group Self-service kiosk Kiosk agent

ID/Passport check

Security check
A 7 4 2 5
B 7 2 2 6
C 2 1 1 3
D 2 0 1 3

• There are 10 self-service kiosks.

• There are 5 kiosk agents working to help the passengers.

• At the ID/Passport checkpoint, there are 3 airport personnel.

• In the security check area there are 6 security checkpoint agents with metal detectors and security screening.

You are asked to find the capacity of the system in passengers per day. Please assume that the selfservice kiosks and all employees work 8 hours per day. a

a. What is the average capacity for each of the four resources at the airport in total number of passengers per day assuming the stated mix of different groups of passengers given above? Which of the four resources is the bottleneck? What is the system capacity in total number of passengers per day?

b. Passengers are complaining that the check-in process takes too long. Compute the resource utilization for each of the steps assuming the stated mix of different groups of passengers given above.

c. To resolve passengers’ complaints, the management is planning to add three new security checkpoint agents. With this modification, what will be the bottleneck resource and the total system capacity? Again, compute the resource utilization for each of steps assuming the stated mix of different groups of passengers given above.   

In: Operations Management

Why might firms choose to internationalize instead of operating domestically? (a) Identify and explain three major...

Why might firms choose to internationalize instead of operating domestically? (a) Identify and explain three major motivations for expanding overseas. (b) What are the drawbacks of this strategy? Identify and explain three major drawbacks for expanding overseas

In: Operations Management