Questions
Problem: A university administrator is interested in whether a new building can be planned and built...

Problem:

A university administrator is interested in whether a new building can be planned and built on campus within a four-year time frame. He considers the process in two phases. Phase I: Phase I involves lobbying the state legislature and governor for permission and funds, issuing bonds to obtain funds, and obtaining all the appropriate legal documents. Past experience indicates that the time required to complete phase I is approximately normally distributed with a mean of 16 months and standard deviation of 4 months. If X = phase I time, then X ~ N(μ = 16 months, σ = 4 months). Phase II: Phase II involves creation of blue prints, obtaining building permits, hiring contractors, and, finally, the actual construction of the building. Past data indicates that the time required to complete these tasks is approximately normally distributed with a mean of 18 months and a standard deviation of 12 months. If Y = phase II time, then Y ~ N(μ = 18 months, σ = 12 months). a) A new random variable, T = total time for completing the entire project, is defined as T = X + Y. What is the probability distribution of T? (Give both the name of the distribution and its parameters.) b) Find the probability that the total time for the project is less than four years. (In symbols, calculate P(T < 48 months).) c) Find the 95th percentile of the distribution of T.

In: Math

Conduct research on one of the first built tombs in the world. The selected tomb should...

Conduct research on one of the first built tombs in the world. The selected tomb should have a superstructure. Specifically, focus on the, Evidential, Historical, Aesthetic and Communal Values of the tombs. In other words, determine the specific futures of a tomb in relation to their evidential, historical, aesthetic, and communal values

Architect, architectural features, construction year and duration, construction materials, construction type, structural features, construction purpose and the features that make it different and significant and the importance of the construction for the society should be included and explained under the headings of Evidential, Historical, Aesthetic and Communal Values in the report. You should illustrate your explanations with photographs which should be referred in your report.

Prepare a maximum 350-words long document

In: Civil Engineering

The majority of new railways are being built for use with electric traction, with many existing...

The majority of new railways are being built for use with electric traction, with many existing railways also being electrified. Summarise:

(i) The benefits of an electrified railway when compared with conventional (diesel) motive power

(ii) The advantages and disadvantages of the two different types of electrification system

(iii) The practical applications of each type of system. Give reasons for your answer.

(b) Describe some common ways of stabilising failed soil slopes. Explain your answer using sketch drawings where appropriate.

(c) Detail and discuss three aspects of water management and control within railway geotechnics and the implications of mismanagement.

In: Civil Engineering

Hamad International Airport was built on artificial land that was reclaimed from the gulf waters. This...

Hamad International Airport was built on artificial land that was reclaimed from the gulf waters. This project reclaimed more than 60 million m3 sand in less than 2 years. This project is one of the most innovative land reclamation projects in Middle East.

Based on your knowledge; answer the following questions:                                                                                   

1. What type of dredger(s) can be used in the presence of sand material?   

2. What type(s) of dredging methods can be used? why?                                                                       

3. Identify five different type of risk categories with its examples that might be involved in this project using the table below;

In: Civil Engineering

A rectangular footing 2.0 m by 3.0 m is built in a homogeneous bed of sand...

A rectangular footing 2.0 m by 3.0 m is built in a homogeneous bed of sand of having bulk unit weight 20 kN/m3 and saturated unit weight 21 kN/m3 with an angle of shearing resistance of (30+Y)o. The depth of the base of footing is 1.8 m below the ground surface and water table is located at a depth of 1.0m below the base of the foundation. Consider the factor of safety of 3. Use Terzaghi’s Analysis

  1. Justify the adequacy of the footing if the proposed design load on the foundation is 1500 kN.                                                                                                                             
  1. Calculate the safe load can be carried by the footing if the water table is located at a depth 1.0 m below the ground Level.                                                                               

     y=2

In: Civil Engineering

Serial.flush() and Delay() are the two built-in functions. Place them in the following code to remove...

Serial.flush() and Delay() are the two built-in functions. Place them in the following code to remove the garbage data printing as discussed in class.

Code:

char data;

void setup() {

// put your setup code here, to run once:

Serial.begin(9600);

}

void loop() {

// put your main code here, to run repeatedly:

while(Serial.available()==NULL){

data = Serial.read();

Serial.print("given character is: ");

Serial.println(data);

}

Serial.end();

}

In: Computer Science

Programming Activity 7 - Guidance ================================= This assignment uses a built-in Python dictionary. It does not...

Programming Activity 7 - Guidance =================================

This assignment uses a built-in Python dictionary. It does not use a dictionary implementation from the textbook collections framework. It does not require any imports/files from the textbook collections framework. This week's "examplePythonDictionary.py" example uses a built-in Python dictionary. Note that the mode() function begins by creating an empty Python dictionary. You must use this dictionary in the following parts.

Part 1 ------ In this part you will add entries to the dictionary. Use a "for" loop to iterate through the values in the data list. For each value, use it as a dictionary key to see if it is already in the dictionary. If it is already in the dictionary, add one to that dictionary entries value. Each dictionary value contains the number of times that value occurs in the data. You reference the current value for a key via dictionary[key]. If it is not in the dictionary, add it by assigning an entry for it with a value of 1.

Part 2 ------ Python has a built-in max() function that finds the maximum in any iterable object. Use max() on the list of dictionary values to obtain the maximum number of times a value occurs. Assign this to a variable called maxTimes. You will make use of maxTimes in part 3.

Part 3 ------ Note that this part begins by creating an empty modes list. Use a "for" loop to loop through the dictionary keys. The default "for" iterator for a Python dictionary iterates through its keys. For each key, see if its associated dictionary value is equal to maxTimes. If it is equal, append that key to the modes list.

Part 4 ------ If no item in the data set is repeated, then your modes list at this point will be the same as your starting data list. However, this case actually should mean there is no mode. Actually, every item is a mode with a frequency of 1. But, we want to return an empty modes list for this case. If the modes list and the data list have the same length, reset modes to an empty list. Note that modes is already being returned at the end of the function.

=============================================================================================================================

useDictionary.py

# This program uses a Python dictionary to find the mode(s) of a data set.

# The mode of a data set is its most frequently occurring value.
# A data set may have more than one mode.
# Examples:
# mode of [1,2,3,4,5,6,7] is none
# mode of [1,2,3,4,5,6,7,7] is 7
# modes of [1,2,2,2,3,3,4,5,6,7,7,7] are 2 and 7

# Replace any "<your code>" comments with your own code statement(s)
# to accomplish the specified task.
# Do not change any other code.

# This function returns a list containing the mode or modes of the data set.
# Input:
# data - a list of data values.
# Output:
# returns a list with the value or values that are the mode of data.
# If there is no mode, the returned list is empty.
def mode(data):
dictionary = {}

# Part 1:
# Update dictionary so that each dictionary key is a value in data and
# each dictionary value is the correspinding number of times that value occurs:
# <your code>

# Part 2:
# Find the maximum of the dictionary values:
# <your code>

# Part 3:
# Create a list of the keys that have the maximum value:
modes = []
# <your code>

# Part 4:
# If no item occurs more than the others, then there is no mode:
# <your code>

return modes

data1 = [1,2,3,4,5,6,7]
print(data1)
print("mode:", mode(data1))
print()

data2 = [1,2,3,4,5,6,7,7]
print(data2)
print("mode:", mode(data2))
print()

data3 = [1,2,2,2,3,3,4,5,6,7,7,7]
print(data3)
print("mode:", mode(data3))
print()

data4 = ["blue", "red", "green", "blue", "orange", "yellow", "green"]
print(data4)
print("mode:", mode(data4))
print()

In: Computer Science

Please assist with writing a program that does conversion but cannot use the built-in conversion in...

Please assist with writing a program that does conversion but cannot use the built-in conversion in java.
• Please use switch case
• Please include comments to understand
• Write in Java
• Please use JOptionPane

a) Binary to decimal
b) Decimal to Binary
c) Hex to Decimal
d) Decimal to Hex
e) Binary to Hex
f) Hex to Binary

In: Computer Science

The purpose of this assignment is to build the business calculator using supporting files built inTopics...

The purpose of this assignment is to build the business calculator using supporting files built inTopics 4 and 5.Create a Java application file named RPN.java containing a main method by using the ForthStack.java and associated files from Topic 5.The application should have one text box for numeric data entry, one text box for numeric display, one text box for error display, and buttons labeled "+", "-", "*", "/","dup", "2dup", "clr", "pop" and "push." The actions of the controls should be as follows.oThe text box for numeric display should display the top element of the stack, or blank if the stack is empty.oThe text box for numeric data entry should allow the user to type in a valid numeric value.oThe text box for error display should display an error message from the previous operation (if any), or be blank if the last operation was successful.oThe buttons labeled "+", "-", "*", "/", "dup", "2dup", "clr", and pop should invoke the corresponding methods in ForthStack; "pop" should remove and discard the top item on the stack, and "push" should push the numeric value in the numeric data entry box onto the stack and clear the numeric data entry box.oAll button operations should update the display of the top of the stack.The size of the stack used should be four, no more or less, in order to standardize testing.After thoroughly testing the program, submit the AbstractStack.java, ArrayStack.java,Forth.java, ForthStack.java, TestForthStack.java, and RPN.java

STACK CODE:

ArrayStack.java

import java.util.Arrays;

public class ArrayStack extends AbstractStack {
//Attributes
private double[] array;
private int size;
private int num;
  
//Default constructor
public ArrayStack() {
array = new double[3];
size = 3;
num = 0;
}
  
//Parametrized Constructor
public ArrayStack(int a){
array = new double[a];
size = a;
num = 0;
}
  
//Insert a new element
public void push(double a){
if (num < size) {
array[num] = a;
num++;
System.out.println("Success");
}
else {
throw new ArrayIndexOutOfBoundsException("Failure! Stack is full");
}
}
  
//Take out last inserted value
public double pop(){
if (num > 0){
num--;
return array[num];
}
else {
throw new ArrayIndexOutOfBoundsException("Stack is empty");
}
}
//Check stack empty or not
public boolean isEmpty(){
return (num == 0);
}
//Get top element from stack
public double peek() {
return peek(num-1);
}
//Get specified index element
public double peek(int n){
try
{
if (num > 0){
if (n < 0 || n >= num)
return -1;
else
return array[n];
}
else{
System.out.println("Stack is empty");
return -1;
}
}catch(Exception e ){
e.printStackTrace();
}
return 0;
}
//Number of elements in stack
public int count(){
return num;
}
public void clear() {
size=0;;
num=0;
}
  
}

public class FourthStack extends ArrayStack implements Fourth{
//Parameterized constructor
public FourthStack(int sz) {
super(sz);
}

@Override
//Pop 2 elements from stack and add values
//Push into stack
public void add() {
if(super.count()<2) {
throw new ArrayIndexOutOfBoundsException("Not enough elements to pop");
}
else {
super.push(super.pop()+super.pop());
}
}

@Override
//Pop 2 elements from stack and subtract second from first
//Push into stack
public void sub() {
if(super.count()<2) {
throw new ArrayIndexOutOfBoundsException("Not enough elements to pop");
}
else {
super.push(super.pop()-super.pop());
}
}

@Override
//Pop 2 elements from stack and multiply values
//Push into stack
public void mul() {
if(super.count()<2) {
throw new ArrayIndexOutOfBoundsException("Not enough elements to pop");
}
else {
super.push(super.pop()*super.pop());
}
}

@Override
//Pop 2 elements from stack and divide second from first values
//Push into stack
public void div() {
if(super.count()<2) {
throw new ArrayIndexOutOfBoundsException("Not enough elements to pop");
}
else {
super.push(super.pop()/super.pop());
}
}

@Override
//peek an element and make duplicate
//Push into stack
public void dup() {
if(super.count()<1) {
throw new ArrayIndexOutOfBoundsException("Not enough elements to pop");
}
else {
super.push(super.peek());
}
  
}

//Peek 2 elements from stack and make their duplicate
//Push into stack in same order
@Override
public void twoDup() {
if(super.count()<2) {
throw new ArrayIndexOutOfBoundsException("Not enough elements to pop");
}
else {
double first=super.peek();
double second=super.peek(super.count()-2);
super.push(second);
super.push(first);
}
}

}

import java.util.Scanner;
/**
* Test implemented functions
* @author deept
*
*/
public class TestFourthStack {
public static void main(String [] args){
//Variables for input
int choice;
int pek;
double val,poped;
boolean empty;
//Keyboard read
Scanner sc =new Scanner(System.in);
FourthStack as = new FourthStack(20);
//Loop until exit
while(true){
//User choices
System.out.println("1. Enter a Value in stack");
System.out.println("2. Pop a Value");
System.out.println("3. Check If array is Empty");
System.out.println("4. Peek Function");
System.out.println("5. Clear Stack");
System.out.println("6. Add Function");
System.out.println("7. Sub Function");
System.out.println("8. Mul Function");
System.out.println("9. Div Function");
System.out.println("10. Dup Function");
System.out.println("11. TwoDup Function");
System.out.println("0. Exit\n");
choice = sc.nextInt();
//Execute each choice
switch(choice){
case 1:
System.out.print("Enter a value To push : ");
val = sc.nextDouble();
as.push(val);
break;
case 2:
poped = as.pop();
System.out.println("Popped : "+poped);
break;
case 3:
empty = as.isEmpty();
System.out.println("Empty ? "+empty);
break;
case 4:
poped = as.peek();
if(poped != -1)
System.out.println("Peeked Value : "+poped);
else
System.out.println("Oops it was not a valid index this place is empty");
break;
case 5:
as.clear();
break;
case 6:
as.add();
break;
case 7:
as.sub();
break;
case 8:
as.mul();
break;
case 9:
as.div();
break;
case 10:
as.dup();
break;
case 11:
as.twoDup();
break;
case 0:
System.exit(0);
}
}
}
}

/*
* Pure abstract class without implementation
*/
public abstract class AbstractStack {
public abstract void push(double item);
public abstract double pop();
public abstract boolean isEmpty();
public abstract double peek();
public abstract void clear();
}


/*
* Interface to generate sum additional functions using stack
*/
public interface Fourth {
public void add();
public void sub();
public void mul();
public void div();
public void dup();
public void twoDup();
}

I PROVIDED THE FIVE PREVIOUS STACKS THAT I USED ON MY PREVIOUS WORK... LET ME KNOW IF THERE'S ANYTHING ELSE


Everything should be attached as requested, and i emailed you all the attachments

In: Computer Science

I need a flow chart built in raptor and the Java source code in the source...

I need a flow chart built in raptor and the Java source code in the source folder (src)

Please fully document the program: add comments to describe all major parts of the solution. SO that I can understand how and why the code was built that way.

Problem specifications:

-The TSA want you to design and code a program that will be used to screen travelers through AirportX. When a traveler arrives at the airport, he/she is required to go through a checkpoint for COVID-19. The traveler temperature is checked and a recommendation is made for the traveler to be quarantined or not.

A traveler will be quarantined if all of the following conditions are met:

-the temperature read for the traveler is 100.4 or more degrees Fahrenheit.

-the traveler is coughing.

-the traveler is experiencing a shortness of breath.

What need to be collected about a traveler?

Beside collecting all of the above information about a traveler, the first name and last name and passport number of the traveler are collected only if the traveler is to be quarantined.

What to do?

-develop a full solution made up of a short analysis of the problem, a flowchart using Raptor, another flowcharting program, or even by hands, and a full Java program.

In: Computer Science