Questions
Two broad perspectives have been outlined; the consensus perspective and the conflict perspective. The contemporary The...

Two broad perspectives have been outlined; the consensus perspective and the conflict perspective. The contemporary The feminist theory, the exchange theory, the symbolic interactionism theory, and modernity theory are the contemporary theories covered. Which one of the broad perspectives or contemporary theories are most closely aligned with family and societal dynamics?

In: Psychology

Create a matlab function that converts Miles per hour to feet per second. Please show code...

Create a matlab function that converts Miles per hour to feet per second. Please show code in matlab

In: Computer Science

For this portion of the lab you will design the solution so that you perform some...

For this portion of the lab you will design the solution so that you perform some conditional tests. For this lab: 1. You will validate input to ensure that the user enters inputs within a certain range or larger than a certain minimum value. You will validate the inputs as follows: (LO 1, 2, 3) a. The user cannot enter a negative number for: i. Miles to kilometers ii. Gallons to liters iii. Pounds to kilograms iv. Inches to centimeters b. The user cannot enter a value above 1000 degrees for Fahrenheit to Celsius (LO1) c. You MUST design a logical program exit. You may NOT use exit, break, quit, or system exit, or ANY OTHER forced exit. Do not use a menu. Use LOGIC to exit the program. 2. If the user enters an invalid value, then the program will issue an error message and terminate immediately. (Do NOT accept further data). 3. Save the program as firstname_lastname_Lab3a.py where you will replace firstname and lastname with your actual first and last name. 4. Test all conditions prior to submitting.

In: Computer Science

In both a command economy and in a monopoly, prices are not set according to the...

In both a command economy and in a monopoly, prices are not set according to the rules of supply and demand.  

True

False

Technology is generally considered inflationary because while no wealth is created or destroyed, the cost of a good or service increases while the quality of the good or service remains the same.

True

False

With an economy based on the Market (a Market economy), prices are set based on the effects of supply and demand.

True

False

Corporations are in business to make money in the short term for their stockholders.

True

False

In: Computer Science

Ex1) Download the code from the theory section, you will find zipped file contains the code...

Ex1) Download the code from the theory section, you will find zipped file contains the code of Singly linked list and Doubly linked list, in addition to a class Student.

In Class SignlyLinkedList,

1. There is a method display, what does this method do?

2. In class Test, and in main method, create a singly linked list objet, test the methods of the list.

3. To class Singly linked list, add the following methods:

a- Method get(int n), it returns the elements in the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null.

What is the complexity of your method? Test the method in main.

b- Method insertAfter(int n, E e), its return type is void, it inserts element e in a new node after the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise through an exception.

What is the complexity of your method?

Test the method in main.

c- Method remove(int n): it removes the node number n, and returns the element in that node, assuming the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null.

What is the complexity of your method?

Test the method in main.

d- Method reverse( ): it has void return type. It reverse the order of the elements in the singlylinked list.

What is the complexity of your method?

Test the method in main.

Ex2) In Class DoublyLinkedList

1. There are two methods printForward, printBackward, what do they do?

2. In class Test, and in main method, create a doubly linked list objet, test the methods of the list.

4. To class Doubly linked list, add the following methods:

e- Method get(int n), it returns the elements in the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null.

To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.

What is the complexity of your method?

Test the method in main.

f- Method insertAfter(int n, E e), its return type is void, it inserts element e in a new node after the node number n, assume the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise through an exception. . To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.

What is the complexity of your method?

Test the method in main.

g- Method remove(int n): it removes the node number n, and returns the element in that node, assuming the first node number is 1. You need to check that n is within the range of nodes in the list, otherwise method get returns null. To make your code more efficient, you should start from the end (header or trailer) that is closer to the target node.

What is the complexity of your method?

Test the method in main.

Assignment:

To class DoublyLinedList, add method remove(E e) which removes all nodes that has data e. This method has void return type.

doublylinkedlist class:

package doubly;

public class DoublyLinkedList <E>{
   private Node<E> header;
   private Node<E> trailer;
   private int size=0;
   public DoublyLinkedList() {
       header=new Node<>(null,null,null);
       trailer=new Node<>(null,header,null);
       header.setNext(trailer);
   }
   public int size() { return size;}
   public boolean isEmpty() {return size==0;}
   public E first()
   {
   if (isEmpty()) return null;
       return header.getNext().getData();
   }
   public E last()
   {
       if (isEmpty()) return null;
           return trailer.getPrev().getData();
   }
  
   private void addBetween(E e, Node<E> predecessor, Node<E> successor)
   {
       Node<E> newest=new Node<>(e,predecessor,successor);
       predecessor.setNext(newest);
       successor.setPrev(newest);
       size++;
      
   }
   private E remove(Node<E> node)
   {
       Node<E> predecessor=node.getPrev();
       Node<E> successor=node.getNext();
       predecessor.setNext(successor);
       successor.setPrev(predecessor);
       size--;
       return node.getData();
   }
   public void addFirst(E e){
       addBetween(e,header,header.getNext());
   }
   public void addLast(E e){
       addBetween(e,trailer.getPrev(),trailer);
   }
  
   public E removeFirst(){
       if(isEmpty()) return null;
       return remove(header.getNext());
   }
  
   public E removeLast()
   {
   if(isEmpty()) return null;
   return remove(trailer.getPrev());
   }
   public void printForward()
   {
       for (Node<E> tmp=header.getNext();tmp!=trailer;tmp=tmp.getNext())
           System.out.println(tmp.getData());
   }
  
   public void printBackward()
   {
       for (Node<E> tmp=trailer.getPrev();tmp!=header;tmp=tmp.getPrev())
           System.out.println(tmp.getData());
   }
  
  
}

node class:

package doubly;

public class Node <E>{
   private E data;
   private Node<E> prev;
   private Node<E> next;
  
   public Node(E d, Node<E> p,Node<E> n)
   {
   data=d;
   prev=p;
   next=n;
   }
   public E getData() { return data; }
   public Node<E> getNext(){ return next; }
   public Node<E> getPrev(){ return prev; }
   public void setNext(Node<E> n) { next=n;}
   public void setPrev(Node<E> p) { prev=p;}

}

student class:

package doubly;

public class Student {
private int id;
private String name;
public Student(int id, String name) {
   super();
   this.id = id;
   this.name = name;
}
public int getId() {
   return id;
}
public void setId(int id) {
   this.id = id;
}
public String getName() {
   return name;
}
public void setName(String name) {
   this.name = name;
}
@Override
public String toString() {
   return "[id=" + id + ", name=" + name + "]";
}

}

test class:

package doubly;

public class Test {
public static void main(String arg[])
{
   DoublyLinkedList<Student> myList=new DoublyLinkedList<>();
   myList.addFirst(new Student(1,"Ahmed"));
   myList.addFirst(new Student(2,"Khaled"));
   myList.addLast(new Student(3,"Ali"));
   myList.removeLast();
   myList.printForward();
  
  
  
  
}
}

In: Computer Science

The production department of Zan Corporation has submitted the following forecast of units to be produced...

The production department of Zan Corporation has submitted the following forecast of units to be produced by quarter for the upcoming fiscal year:

Units to be produced:

1st Quarter = 5,400
2nd Quarter = 8,400
3rd Quarter = 7,400
4th Quarter = 6,400

In addition, 6400 grams of raw materials inventory is on hand at the start of the 1st Quarter and the beginning accounts payable for the 1st Quarter is 3280. Each unit requires 8.40 grams of raw material that costs $1.40 per gram. Management desires to end each quarter with an inventory of raw materials equal to 30% of the following quarter's production needs. The desired ending inventory for the 4th Quarter is 8400 grams. Management plans to pay for 50% of raw material purchases in the quarter acquired and 50% in the following quarter. Each unit requires 0.30 direct labor-hours and direct laborers are paid $10.70 per hour.

1.Prepare the company's direct materials budget for the upcoming fiscal year (Round "Unit cost of raw materials" answers to 2 decimal places).
2.Prepare a schedule of expected cash disbursements for purchases of materials for the upcoming fiscal year.
3.Prepare the company's direct labor budget for the upcoming fiscal year, assuming that the direct labor workforce is adjusted each quarter to match the number of hours required to produce the forecasted number of units produced. (Round "Direct labor-hours per unit" and "Direct labor cost per hour" answers to 2 decimal places.)

In: Accounting

Purpose: Connect and critique Fredrickson’s theory in personal experience. 1.List the four ways that positive emotions...

Purpose: Connect and critique Fredrickson’s theory in personal experience.

1.List the four ways that positive emotions may help build personal resources and give an example of each from your own experience. That is, can you verify each of the four “building resources” effects of positive emotions in your experience?  

2. Can you think of a counter-example to her theory? That is, a negative effect of a positive emotion?

In: Psychology

1. Write a for loop that will display all of the multiples of 3, one per...

1. Write a for loop that will display all of the multiples of 3, one per line.

The starting point is a variable called lower, and the ending point is an integer called upper, inclusive.

The "lower" and "upper" variables have been properly declared and assigned values where the value of lower is less than or equal to the value of upper. Declare any other variables that are needed.

2. Write a "while" loop that does the same thing as the following "for" loop.

for (i=6;i<1000;i+=5)

   cout<<i<<endl;

3. Write an if statement to print the message "The size is valid" if the variable named size is in the range 5 to 18, including 5 and 18. Otherwise print "The size is not valid".

In: Computer Science

Using JAVA Resource: "Analyze and Document JDBC API Calls" text file ** PASTED BELOW** For this...

Using JAVA

Resource:

"Analyze and Document JDBC API Calls" text file ** PASTED BELOW**

For this assignment, you will analyze code that uses the JDBC API to access a database, retrieve data, and compose output based on that data. You will then comment the code to reflect the purpose and expected results of the code.

Download the linked TXT file, and read through the Java™ code carefully.

Add your name, instructor's name, and today's date to the header comment.

Replace the five comment placeholders with succinct comments that explain and predict the results of the Java™ statement(s) that directly follow the comment placeholders.

Submit the updated TXT file containing your comments.

Bottom of Form

***************************** CODE **************************************************

/**********************************************************************

*            Program:            SQLcode            

*            Purpose:             To analyze and document JDBC API calls.

*            Programmer:     TYPE YOUR NAME HERE                            

*            Class:                  PRG/421r13, Java Programming II                                       

*            Instructor:                                                    

*            Creation Date:   TYPE TODAY'S DATE HERE          

*

* Comments: The purpose of the JDBC API calls in this program

*           is to retrieve data from a relational database.

*           To complete this assignment, analyze the code and replace

*           the numbered comments as instructed below.

***********************************************************************/

package sqlcodeexample;

// 1. THE REASON FOR IMPORTING THE FOLLOWING LIBRARIES IS...

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.SQLException;

public class SQLCodeExample {

   public static void main (String[ ] args) {

      try {                                                                                                     

         String host = "jdbc:mysql://localhost/STUDENT";                           

         String uName = "bsmith";

         String uPass = "roxie";

         // 2. THE PURPOSE (RESULT) OF THE FOLLOWING API CALL IS...

         Connection conn = DriverManager.getConnection(host, uName, uPass);   

        

         // 3. THE PURPOSE (RESULT) OF THE FOLLOWING API CALLS IS...

         Statement stmt = conn.createStatement();                        

         String sql = "select Stu_id, Stu_Name from Stu_Class_1";                                      

         ResultSet rs = stmt.executeQuery (sql);                                  

                                         

         System.out.println("Displaying student information: ");    

   

        

         // 4. THE RESULT OF THE FOLLOWING API CALLS IS...

         while (rs.next()) {

             System.out.println ("Student id " + rs.getString("Stu_id");

             System.out.println (" is associated with student name " + rs.getString("Stu_Name");

         }                                                                   

  

      }

      // 5. THE PURPOSE OF THE FOLLOWING CATCH BLOCK IS...

      catch ( SQLException err ) {

         System.out.println(err.getMessage());

      }

   }

}

In: Computer Science

Consider requirements gathering. Tell us 3 challenges of requirements engineering and project management. Why were they...

Consider requirements gathering. Tell us 3 challenges of requirements engineering and project management. Why were they challenging?

In: Computer Science

You have been hired as a consultant for Pristine Urban-Tech Zither, Inc. (PUTZ), manufacturers of fine...

You have been hired as a consultant for Pristine Urban-Tech Zither, Inc. (PUTZ), manufacturers of fine zithers. The market for zithers is growing quickly. The company bought some land three years ago for $1.38 million in anticipation of using it as a toxic waste dump site but has recently hired another company to handle all toxic materials. Based on a recent appraisal, the company believes it could sell the land for $1,480,000 on an aftertax basis. In four years, the land could be sold for $1,580,000 after taxes. The company also hired a marketing firm to analyze the zither market, at a cost of $123,000. An excerpt of the marketing report is as follows: The zither industry will have a rapid expansion in the next four years. With the brand name recognition that PUTZ brings to bear, we feel that the company will be able to sell 3,600, 4,500, 5,100, and 4,000 units each year for the next four years, respectively. Again, capitalizing on the name recognition of PUTZ, we feel that a premium price of $630 can be charged for each zither. Because zithers appear to be a fad, we feel at the end of the four-year period, sales should be discontinued. PUTZ feels that fixed costs for the project will be $415,000 per year, and variable costs are 15 percent of sales. The equipment necessary for production will cost $3.30 million and will be depreciated according to a three-year MACRS schedule. At the end of the project, the equipment can be scrapped for $390,000. Net working capital of $123,000 will be required immediately. PUTZ has a 40 percent tax rate, and the required return on the project is 13 percent. Assume the company has other profitable projects. MACRS schedule. What is the NPV of the project? (Do not round intermediate calculations and round your answer to 2 decimal places, e.g., 32.16.)

In: Finance

C++: (I need this program to output in a certain format I will post the "needed...

C++: (I need this program to output in a certain format I will post the "needed results" below)

To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to make a telephone number meaningful, companies might use more than seven letters. For example, 225-5466 can be displayed as CALL HOME, which uses eight letter. Write a program that prompts the user to enter a telephone number expressed in letters and outputs the corresponding telephone number in digits. If the user enters more than seven letters, than process only the first seven letters. Also output the - (hyphen after the third digit. Allow the user to use both upper case and lowercase letters as well as spaces between words. moreover, your program should process as many telephone numbers as the user wants.

Desired Outputs:

Enter Y/y to convert a telephone number from letters to digits. Enter any other letter to terminate the program.

y

Enter a telephone number using 7 or more letters for prefix and number, onnly the first 7 letters are used and spaces are not counted.

-->: To Be or not

The corresponding telephone number is:

862-3676

To process another telephone number, enter Y/y Enter any other letter to terminate the program.

y

Enter a telephone number using 7 or more letters for Prefix and number, only the first 7 letters are used and spaces are not counted

--> YRU Here?

The corresponding telephone number is:

978-4373

To process another telephone number, enter Y/y Enter any other letter to terminate the program.

In: Computer Science

Define Strategic CSR in your own words. What are the signs you would look for to...

Define Strategic CSR in your own words. What are the signs you would look for to indicate that a firm has implemented a Strategic CSR perspective?

The book is Strategic Corporate Social Responsibility CSR chapter#10

In: Operations Management

Define the difference between current and long term liabilities. Creditors use several measures to assess a...

Define the difference between current and long term liabilities. Creditors use several measures to assess a company's creditworthiness, such as working capital, current ratio, payables turnover, and days' payable. Discuss what these measures are and why it's important to carefully measure cash flows related to current liabilities.

In: Accounting

Discuss the tradeoffs between the following concepts: coordination and control centralization and decentralization Hierarchal vs. network...

Discuss the tradeoffs between the following concepts:

  • coordination and control
  • centralization and decentralization
  • Hierarchal vs. network and virtual organizational forms

In: Operations Management