Two dice are thrown. Let A be the event that an odd number is obtained on...

Two dice are thrown.

Let A be the event that an odd number is obtained on the first dice, B be the event that the number obtained is greater than 5 on the first dice, C be the event that the number obtained on the second dice is smaller than 5, and D be the event that the sum of the two numbers obtained is 8.

State whether each of the following is a pair of independent events or dependent events.

(a) A and B

(b) A and C

(c) B and D

(d) C and D

In: Math

a) Calculate the pH during the titration of 30.00 mL of 0.1000 M trimethylamine, (CH3)3N(aq), with...

a) Calculate the pH during the titration of 30.00 mL of 0.1000 M trimethylamine, (CH3)3N(aq), with 0.1000 M HCl(aq) after 24 mL of the acid have been added. Kb of trimethylamine = 6.5 x 10-5.

b)Calculate the pH during the titration of 20.00 mL of 0.1000 M methylamine, CH3NH2(aq), with 0.1000 M HNO3(aq) after 19.9 mL of the acid have been added. Kb of methylamine = 3.6 x 10-4.

In: Chemistry

Question 1: Answer, True or False The index of refraction has units of distance. True False...

Question 1: Answer, True or False

The index of refraction has units of distance.

True

False

When we make multiple measurements, we can have more confidence in the index of refraction determination.

True

False

Glass is more dense than water.

True

False

It is possible to exceed the speed of light in a vacuum

True

False

A tangent line is parallel to a normal line

True

False

The index of refraction is unitless.

True

False

There is a special case when the index of refraction is less than 1.

True

False

In: Physics

Ringing Bell Telephone Company has implemented an affirmative action plan in compliance with the Equal Employment...


Ringing Bell Telephone Company has implemented an affirmative action plan in compliance with the Equal Employment Opportunity Commission. Under the current plan, to eliminate discrimination based on sex, women must be placed in jobs traditionally held by men. Therefore, the human resource department has emphasized recruiting and hiring women for such positions. Women who apply for craft positions are encouraged to try for outdoor craft jobs, such as those titled installer-repairer and line worker.
All employees hired as outside technicians must first pass basic installation school, which includes a week of training for pole climbing. During this week, employees are taught to climb 30-foot telephone poles. At the end of the week, they must demonstrate the strength and skills necessary to climb the pole and perform exercises while on it, such as lifting heavy tools and using a pulley to lift a bucket. Only those who pass this first week of training are allowed to advance to the segment dealing with installation.


Records have been maintained on the rates of success or failure for employees who attend the training school. For men, the failure rate has remained fairly constant at 30 percent. However, it has averaged 70 percent for women.
The human resource department has become concerned because hiring and training employees who must resign at the end of one week is a tremendous expense. In addition, the goal of placing women in outdoor craft positions is not being reached.
As a first step in solving the problem, the human resource department has started interview- ing the women who have failed the first week of training. Each employee is asked her reasons for seeking the position and encouraged to discuss probable causes for failure. Interviews over the last two months disclosed that employees were motivated to accept the job because of their wishes to work outdoors, work without close supervision, obtain challenging work, meet the public, have variety in their jobs, and obtain a type of job unusual for women. Reasons for failure were physical inability to climb the pole, fear of height while on it, an accident dur- ing training such as a fall from the pole, and change of mind about the job after learning that strenuous work was involved.
In many instances, the women who mentioned physical reasons also stated they were not physically ready to undertake the training; many had no idea it would be so difficult. Even though they still wanted the job, they could not pass the physical strength test at the end of one week.
Some stated that they felt “influenced” by their interviewer from the human resource depart- ment to take the job; others said they had accepted it because it was the only job available with the company at the time.
Questions
1. What factors would you keep in mind in designing an effective selection process for the position of outdoor craft technician?
2. What would you recommend to help Ringing Bell reduce the failure rate among women trainees?

In: Accounting

Java 1. Program Specification This will focus on strengthening your skills with manipulating Strings. The String...

Java

1. Program Specification

This will focus on strengthening your skills with manipulating Strings. The String class provides many useful methods, in which this assignment will give you further practice with. You will read in dates in a variety of different formats, parse the dates, and then print them out in a converted format. The dates will be entered in one line by the user, and they will be separated by the word “and”.

2. Date formats

Your program will parse a line of dates written in three styles: day first, month first, and all-numbers.

Day first: The day of the month is first, followed by the month, followed by the year. The month string must be at least 3 letters long, and can be a mix of upper and lowercase letters. Spaces should separate the three parts. Spaces are not allowed between numbers or month names.

ex: 8 Aug 2015
24 February 1988

Month first: The month is first, followed by the day, a comma, then the year. The month may be fully spelled out or an abbreviation at least 3 letters long and be upper or lower case. A space must separate the month and day, but there may be multiple spaces between the two.

ex: March 15, 1967

Jan 17, 1990

All numbers: Month, day, and year are entered as numbers with dashes between them. There may be many spaces around the dashes or none. Spaces are not allowed between the numbers.

ex: 12-4-2008

1-8-2003

3. Requirements

  •  Your program must read a single line that may contain many dates in many formats separated by the word “and”. It will parse out the dates, and print them all in the correct format. The correct format is day first, a space, followed by the full name of the month with the first letter capitalized, a space, and then the year.

  •  Your program must give an error message if a date is invalid. It should give a specific error message for the following cases:

o A month name or abbreviation is misspelled or too short (less than three characters)
o A day or month number is incorrect. Months must be between 1 and 12. Days must be

valid for the month (ignore leap years)
o A year number is too low or high (1900 to 2019). o There are too many dashes in All Numbers format.

 It is ok if your program crashes when calling Integer.parseInt and the argument is not valid.

4. Implementation

There are some specific requirements for how you write the program.

 Use the below build-in methods
o String class: substring, trim, split, toLowerCase, indexOf, or lasIndexOf o Integer class: parseInt

  •  In the main() method, you must prompt the user to enter the dates, read the line of dates, break the line into separate Strings based on the delimiter (“and”), and for each date print “Date : ”. You must also call the appropriate parser here.

  •  One method for parsing each kind of date. These methods either output an error message or the corresponding standard date string.

o public static void parseDayFirst(String dateStr)
o public static void parseMonthFirst(String dateStr) o public static void parseAllNumbers(String dateStr)

 public static boolean isValidMonthDay(int day, int month)
o returns true if the month and day numbers form a valid day of the year (leap years

excluded)

 public static int monthToNumber(String monthStr)
o Takes a string that should be the name or abbreviation of the month name and returns

the number of the month. It returns zero if the name doesn’t match any month or is too short. This method is provided for you.

 public static boolean isValidMonthAbbr(String month)
Takes a month as a String and returns boolean value. True means the passed in month string represents a valid month string (the length of the trimmed month string is greater than or equals 3, and the month string abbreviation is correctly spelled!!!).

Hint: indexOf along with the provided static String array fullNameMonths declared at

the top of the class may be useful here for.  public static boolean isValidYear(int year)

o returns true if the year is valid (1900 to 2018)

 public static String standardDateString(int day, int month, int year)
o takes a day, month, and year as numbers and returns a String containing the date in the

correct format, Day Month Year. (ex. 13 March 2006)

5. Sample Output

Welcome to the Date Converter!

Enter line of dates:8 Aug 2015 and March 15, 1967 and 12-4-2008 Date 1: 8 August 2015
Date 2: 15 March 1967
Date 3: 4 December 2008

Goodbye!

Welcome to the Date Converter!
Enter line of dates:15 xyz 2000 and
Date 1: ERROR: Invalid month string
Date 2: ERROR: Too many dashes
Date 3: ERROR: Invalid month string
Date 4: ERROR: Invalid month or day number

Goodbye!

Welcome to the Date Converter!
Enter line of dates:
ERROR: Empty input line

Goodbye!

Welcome to the Date Converter!

Enter line of dates:and 2-0-2222 and Jan 13, 1190 and March 12,2222 and 9 Date 1: ERROR: No date entered
Date 2: ERROR: Invalid month or day number
Date 3: ERROR: Invalid Year-too low or hi

Date 4: ERROR: Invalid Year-too low or hi Date 5: 9 September 2018

Goodbye!

2-2-22222-and J 10, 2004 andFeb 45 , 2012

- 9-2018

------------------------------------------

Code Provided

package cs251_HW2;

import java.util.Scanner;

public class DateConversion {

//Static variable you can use throughout this class

//contains the months in shorter form

private static String[] abbrMonths = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep",

"oct", "nov", "dec" };

//Another static variable you can use, except these contain the months fully spelled out

private static String[] fullNameMonths = { "january", "february", "march", "april", "may", "june", "july", "august", "september",

"october", "november", "december" };

public static void main(String[] args) {

Scanner stdIn = new Scanner(System.in);

System.out.println("Welcome to the CS251 Date Converter!\n");

System.out.print("Enter line of dates:");

String dateEntries = stdIn.nextLine();

//TODO

System.out.println("\nGoodbye!");

stdIn.close();

}

public static void parseDayFirst(String dateStr) {

//TODO

}

public static void parseMonthFirst(String dateStr) {

//TODO

}

public static void parseAllNumbers(String dateStr) {

//TODO

}

public static boolean isValidMonthDay(int day, int month) {

//TODO

}

public static int monthToNumber(String monthStr) {

String lowerCaseMonthStr = monthStr.toLowerCase().substring(0, 3);

int mNumber = 0;

for(int i = 0; i < abbrMonths.length; i++){

if(abbrMonths[i].equals(lowerCaseMonthStr)){

mNumber = i + 1;

break;

}

}

return mNumber;

}

public static boolean isValidMonthAbbr(String str) {

//TODO

}

public static boolean isValidYear(int year) {

//TODO

}

public static String standardDateString(int d, int m, int y) {

//TODO

}

}

In: Computer Science

Unit 09 Drop Box Assignment ONLY ONE FILE may be turned in for the assignment. If...

Unit 09 Drop Box Assignment
ONLY ONE FILE may be turned in for the assignment. If you make a mistake and need to turn
in your work again, you may do so. I will only grade the latest file you turn in. The older ones
will be ignored. For instruction on How To do assignments and create the file see the "How To
Do Homework" document under the "Start Here" button.
The Assignment
Create a Visual Logic flow chart with four methods. Main method will create an array of 5
elements, then it will call a read method, a sort method and a print method passing the array
to each. The read method will prompt the user to enter 5 numbers that will be stored in the
array. The sort method will sort the array in ascending order (smallest to largest). The print
method will print out the array.
A sample run might look like this:
Please enter a number: 2
Please enter a number: 7
Please enter a number: 1
Please enter a number: 10
Please enter a number: 3
Your numbers are: 1, 2, 3, 7, 10

In: Computer Science

A canister contains butane at a pressure of 760 torr and a temprature of 25C. All...

A canister contains butane at a pressure of 760 torr and a temprature of 25C. All of contents of the canister are allowed to react with excess oxygen to produce carbon dioxide and water.

2 (C4H10) + 13O2 -------> 8CO2+ 10(H2O)

Equation is balanced and butane is completely consumed in the reaction, and 46.5g grams of CO2 are produced. What is the volume, in liters, of the canister that contained the butane??

Answer is 6.46L but can anyone please show work for this question?? I just can't get the right answer or near even near it. Please teach me how to approach this problem. Thank You!

In: Chemistry

How would have the Great Depression Devotion encouraged Americans struggling through the Great Depression?

How would have the Great Depression Devotion encouraged Americans struggling through the Great Depression?

In: Economics

I need to know the following values in the table below. All the info you need...

I need to know the following values in the table below. All the info you need should be listed.

1. Write the balanced equation for the reaction between solid zinc and aqueous hydrochloric acid. Be sure to include physical states.

Zn(s) + 2HCl (aq)

In: Chemistry

create database shop; use shop; create table users(    id int null auto_increment,    firstname varchar(255),...

create database shop;
use shop;

create table users(
   id int null auto_increment,
   firstname varchar(255),
   lastname varchar(255) not null,
   primary key (id)
);

create table products(
id int null auto_increment,
name varchar(255),
price float,
primary key (id)
);

create table orders(
   id_users int not null,
   id_items int not null,
   primary key (id_users,id_items),
   foreign key (id_users) references users(id),
   foreign key (id_items) references items(id)
);

write three SQL queries to answer the following questions

1.- Products in the shop catalog; product name.

2.- List of products in stock (not sold); product name, code, price.

3.- Products sold in the shop; product name, code, price and full name of buyer.


Concepts in practice: Relational Databases, SQL.

In: Computer Science

java declare at least five different types of arrays, one, two and three-dimension.

java

declare at least five different types of arrays, one, two and three-dimension.

In: Computer Science

For this assignment, you will apply what you learned in analyzing a simple Java™ program by...

For this assignment, you will apply what you learned in analyzing a simple Java™ program by writing your own Java™ program. The Java™ program you write should do the following:

  • Organize the code capable of throwing an exception of type ParseException as a tryblock.
  • Include a catch block to handle a ParseException error thown by the try block.
  • Include a hard-coded error that results in a ParseException to prove that the code can catch and handle this type of exception.

Complete this assignment by doing the following:

  1. Download and unzip the linked Week 5 Coding Assignment Zip File.
  2. Add comments to the code by typing your name and the date in the multi-line comment header.
  3. Replace the following lines with Java™ code as directed in the file:
  • LINE 1
  • LINE 2
  1. Replace the value assigned with one of the variables so that the program throws an exception.
  2. Comment each line of code you add to explain what you intend the code to do. Be sure to include a comment for the replacement value you added in Step 4 that causes the program to throw an exception.
  3. Test and modify your Java™ program until it runs without errors and produces the results described above.

/************************************************************************************
* Program: PRG/420 Week 5
* Purpose: Week 5 Coding Assignment
* Programmer: TYPE YOUR NAME HERE
* Class: PRG/420   
* Creation Date: TYPE TODAY'S DATE HERE
*************************************************************************************
* Program Summary:   
*   This program converts a given date to a string.
*    The code includes exception handling for a ParseException.
************************************************************************************/

package prg420week5_codingassignment;

import java.util.*; // wildcard to import all the util. classes
import java.text.*; // wildcard to import all the text classes   

public class PRG420Week5_CodingAssignment {

public static void main(String[] args){

// The getInstance() method returns a Calendar object whose calendar fields have been initialized with the current date and time.
Calendar calendar = Calendar.getInstance(); {

LINE 1. BEGIN THE TRY BLOCK.
  
String str_date="01-Nov-17"; // Declare a string that we will use later to format a date like this: ##-XXX-##
DateFormat formatter; // Declare an object of type DateFormat so that we can call its parse() method later
Date myFormattedDate; // Declare a variable of type Date to hold the formatted date
  
formatter = new SimpleDateFormat("dd-MMM-yy"); // Assign a specific date format to the formatter variable

// The given date is taken as a string that is converted into a date type by using
// the parse() method

myFormattedDate = (Date)formatter.parse(str_date);     // setting up the format
  
System.out.println("The formatted date is " + myFormattedDate);
System.out.println("Today is " +calendar.getTime() );
  


LINE 2. WRITE THE CATCH BLOCK TO CATCH EXCEPTIONS OF TYPE ParseException (TO HANDLE EXCEPTION, SIMPLY PRINT THE EXCEPTION)


  
}
}
}

In: Computer Science

Cane Company manufactures two products called Alpha and Beta that sell for $190 and $155, respectively....

Cane Company manufactures two products called Alpha and Beta that sell for $190 and $155, respectively. Each product uses only one type of raw material that costs $8 per pound. The company has the capacity to annually produce 122,000 units of each product. Its average cost per unit for each product at this level of activity are given below:

Alpha Beta
Direct materials $ 40 $ 24
Direct labor 34 28
Variable manufacturing overhead 21 19
Traceable fixed manufacturing overhead 29 32
Variable selling expenses 26 22
Common fixed expenses 29 24
Total cost per unit $ 179 $ 149

The company considers its traceable fixed manufacturing overhead to be avoidable, whereas its common fixed expenses are unavoidable and have been allocated to products based on sales dollars.

a. Assume that Cane normally produces and sells 74,000 Betas and 94,000 Alphas per year. If Cane discontinues the Beta product line, its sales representatives could increase sales of Alpha by 14,000 units. What is the financial advantage (disadvantage) of discontinuing the Beta product line?

b. Assume that Cane expects to produce and sell 94,000 Alphas during the current year. A supplier has offered to manufacture and deliver 94,000 Alphas to Cane for a price of $136 per unit. What is the financial advantage (disadvantage) of buying 94,000 units from the supplier instead of making those units?

c. Assume that Cane expects to produce and sell 69,000 Alphas during the current year. A supplier has offered to manufacture and deliver 69,000 Alphas to Cane for a price of $136 per unit. What is the financial advantage (disadvantage) of buying 69,000 units from the supplier instead of making those units?

d. How many pounds of raw material are needed to make one unit of each of the two products?

In: Accounting

1. Explain why a transaction may have many cursors. Also, how is it possible that a...

1. Explain why a transaction may have many cursors. Also, how is it possible that a transaction may have more than one cursor on a given table? Support your answer with example.

2. After a DBMS has been selected, what is the DBA’s role in DBMS maintenance?

3. Do you think, splitting a table might improve performance? Why/why not.

In: Computer Science

Python Script: Question: Please edit my script for it to get to the right directory and/or...

Python Script:

Question: Please edit my script for it to get to the right directory and/or folder. How to get the right files in the folder to display under files. I don't want anymore errors. Thanks-

#Program to combine multiple excel file into one master file/spreadsheet

#import library

import os
import pandas as pd
cwd = os.path.abspath(")
files = os.listdir(cwd)

#Combine multiple excel files
#This blocks of code will loop through files in directory/folder and append/merge .xlsx files

df = pd.DataFrame()
for file in files:
   if file.endswith('.xlsx'):
       df = df.append(pd.read_excel(file),ignore_index=True

#Display first 5 rows of data/records
df.head()

#Display total columns and rows
df.shape()

df.to_excel('Output.xlsx')

In: Computer Science