In RU (R is the reals, U is the usual topology), prove that any open interval (a, b) is homeomorphic to the interval (0, 1). (Hint: construct a function f : (a, b) → (0, 1) for which f(a) = 0 and f(b) = 1. Show that your map is a homeomorphism by showing that it is a continuous bijection with a continuous inverse.)
In: Advanced Math
In: Computer Science
In: Operations Management
Determine the Output:
Package questions;
import java.util.*;
public class Quiz1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("*** 1 ***");
ArrayList<Integer>list1=new ArrayList<Integer>();
for(int i=0;i<30;i++)
{
list1.add(new Integer(i));
}
System.out.print("[");
for(int i=0;i<list1.size();i++)
{
System.out.print(list1.get(i)+" ");
}
System.out.println("]");
System.out.println("*** 2 ***");
ArrayList<Integer>list2=new ArrayList<Integer>();
for(int i=30;i<60;i++)
{
list2.add(i); //Auto Boxing an Integer not need to use new Integer
}
System.out.println(list2); //toString for an ArrayList --created by the Java Programmers
System.out.println("*** 3 ***");
ArrayList<Integer>list3=new ArrayList<Integer>();
list3.add(list1.remove(22)); //when an ArrayList removes an object it returns the object
list3.add(list1.remove(0));
list3.add(list1.remove(13));
list3.add(list1.remove(7));
list3.add(list1.remove(7));
list3.add(list1.remove(13)); //remember as an ArrayList removes the size is reduced
list3.add(list1.remove(11));
list3.add(list1.remove(list1.size()-1));
System.out.println(list3);
System.out.println("*** 4 ***");
System.out.println(list1);
System.out.println("*** 5 ***");
Collections.sort(list3);
System.out.println(list3);
System.out.println("*** 6 ***");
System.out.print("{ ");
for(int item:list3) //This is called unwrapping an Integer into an int
{
if(item<10)
System.out.print("0");
System.out.print(item+" ");
}
System.out.println("}");
}//end main
}//end class
/*
OUTPUT
*** 1 ***
*** 2 ***
*** 3 ***
*** 4 ***
*** 5 ***
*** 6 ***
*/
In: Computer Science
I NEED IT PRINT IN THIS FORM JAVA
How is a Java source file executed?
1. It is compiled and runs natively
2. It is interpreted but not compiled
3. It is compiled into byte code and executed by the Java Virtual Machine
4. It is magic
Please enter your answer
1
Sorry that answer is not correct. The correct answer is 3
Correct output:
How is a Java source file executed?
1. It is compiled and runs natively
2. It is interpreted but not compiled
3. It is compiled into byte code and executed by the Java Virtual Machine
4. It is magic
Please enter your answer
3
Congratulations!!!! That is the right answer
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Scanner;
public class HWData
{
private ArrayList<String> question;
private ArrayList<String> answer1;
private ArrayList<String> answer2;
private ArrayList<String> answer3;
private ArrayList<String> answer4;
private File inFile;
private ArrayList<Integer> correct;
/** Method: HWData
* No argument constructor
*/
public HWData()
{
try
{
inFile = new File("data.txt");
Scanner input = new Scanner(inFile);
question = new ArrayList<String>();
answer1 = new ArrayList<String>();
answer2 = new ArrayList<String>();
answer3 = new ArrayList<String>();
answer4 = new ArrayList<String>();
correct = new ArrayList<Integer>();
while (input.hasNextLine())
{
question.add(input.nextLine());
answer1.add(input.nextLine());
answer2.add(input.nextLine());
answer3.add(input.nextLine());
answer4.add(input.nextLine());
String number = input.nextLine();
try
{
correct.add(Integer.parseInt(number));
}
catch (NumberFormatException nfe)
{
System.out.println("An invalid number for
an answer was encountered.");
}
}
}
catch(FileNotFoundException fnf)
{
System.out.println("Sorry the file was not
found.");
}
}
/** Method: getQuestion
*
* @param int number of question
* @return String containing the question
*/
public String getQuestion(int number)
{
return question.get(number);
}
/** Method: getAnswer1
*
* @param int number of answer1
* @return String containing answer1
*/
public String getAnswer1(int number)
{
return answer1.get(number);
}
/** Method: getAnswer2
*
* @param int number of answer2
* @return String containing answer2
*/
public String getAnswer2(int number)
{
return answer2.get(number);
}
/** Method: getAnswer3
*
* @param int number of answer3
* @return String containing answer3
*/
public String getAnswer3(int number)
{
return answer3.get(number);
}
/** Method: getAnswer4
*
* @param int number of answer4
* @return String containing answer4
*/
public String getAnswer4(int number)
{
return answer4.get(number);
}
/** Method: getCorrect
*
* @param int number of question
* @return int containing the correct response
*/
public int getCorrect(int number)
{
return correct.get(number);
}
/** Method: getNumberOfQuestions
*
* @param none
* @return int number of questions in the file
*/
public int getNumberOfQuestions()
{
return question.size();
}
}
In: Computer Science
Three LEDs (one red, one green, one blue) turn on when a number 0–7 is passed through. Red turns on with even numbers, green turns on with odd numbers, blue turns on with multiples of 3. Zero means they are all off, seven means they are all on. Set–up the appropriate truth table, simplify using K–maps. Implement, using LogiSim, the simplified logic circuit with optimal number of logic gates.
can someone please explain how to do the logisim?? i am having trouble taking the simplified kmaps answer into logisim
i got everything but the last part
In: Computer Science
Consider a 19-year bond with 13 percent annual coupon payments. The market rate (YTM) is 6.6 percent for this bond. The current yield of the bond is _______ percent. Answer it in percentage without the % sign, and round it to two decimal place, e.g., 5.69.
In: Finance
PYTHON:
Our glass installation business needs a program that will assist our agents in calculating the installed cost of shower enclosure. This is in particular for 90 degree glass shower enclosures.
The program will get the depth (B), width (A) and height (C) of the shower base as shown on the diagram on the right. Program also needs to get the thickness of the glass as that affects the price. All input are in inches.
For a 90-degree shower enclosure, we need 2 panels of glass. Area of panel 1 is depth times height. Area of panel 2 is width times height. If area of both panels is larger than (and equal to) 6000 inches square, unit price per square inch is $0.99. If it is less than 6000 square inch, then the per unit square price of glass is $1.29. For any enclosure that requires less than 3000 square inch, the unit price is $1.49.
(60 points) Based on the unit price and the area of glass needed to complete the job we can compute the installed price of the enclosure. There is, however, 50% surcharge if the thickness of the glass is larger than (or equal to) 0.5 inches. Otherwise, if the thickness of the glass is larger than (or equal to) 0.375, the surcharge is 20%.
(60 points) Finally we need to ask user for a discount code. Discount code is a numeric code -- we support two codes. If user enters discount code 112233, we apply 20% discount to the total price. If user enters discount code 111222, we apply 10% discount to total price. If no code, user should enter 0. Any other code should result in invalid discount code message and the calculation happen without any discount.
(60 points) At the end of the calculation, your program should give user the ability to compute another shower enclosure or exit out of the program.
On the left hand side, you can see the program running. Make sure that you have minimum 3 comments in the code and that your code is properly indented (-40 points penalty).
In: Computer Science
Critically discuss the following statement and reflect on the consequences for the future of work: ‘In twenty years’ time robots will have become integrated in many workplaces, replacing human labour with automated, highly productive machines’.
In: Psychology
Quik Results, Inc.(QRI), a Michigan corporation, makes and sells Power Up!, a super energy boosting, carbonated beverage. Power Up! is made in Michigan, but shipped to stores all across the Midwest and East Coast. Power Up! is made by QRI, and delivered on QRI. trucks, by QRI employees. QRI has in-house accounting and marketing staff.
QRI’s in-house marketing department decides to use in print ads for Power Up! direct quotes from a study that shows the ingredients in Power Up! are safe and effective. The study was done by Deep Topics, Inc. a private, for profit research/think tank organization. QRI does not obtain the permission of Deep Topics to use the study in its advertisements. Deep Topics files a suit against QRI, alleging infringement of the plaintiffs' intellectual property rights. Which type of intellectual property is involved in this situation? What is QRI's likely defense? How is a court most likely to rule? Explain.
In: Operations Management
Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect of the computer. Consider a computer running a program that requires 250 s, with 70 s spent executing FP instructions, 85 s executed L/S instructions, and 40 s spent executing branch instructions.
By how much is the total time reduced if the time for FP
operations is reduced by 20%?
By how much is the time for INT operations reduced if the
total time is reduced by 20%?
Can the total time can be reduced by 20% by reducing only
the time for branch instructions?
In: Computer Science
Snell's Law and the Law of Reflection explain how light is redirected when it encounters a surface between two media. In the extreme, light may only reflect at a boundary, and go back into the medium it was in. More often, some of it reflects and some goes through. If the boundary is plane and flat, then these laws are easy to interpret. When the boundary is curved, they describe happens at every point on the surface.
One of the classic types of glass is called "crown" glass, which has an index of refraction for visible light of 1.52 and is usually free of significant impurities. It was one of the first glasses discovered, and windows are made from it. Another glass is called "flint" glass, and it has lead oxide added, which makes it heavier, more "dispersive", and increases its index of refraction to 1.62.
1. A ray of light enters a flat surface of crown glass at a 25 degree angle to the surface. At what angles do the reflected and refracted rays leave the surface?
2. As in the first part, but for flint glass, what are the angles?
3. For the flint glass, the refracted ray goes through the glass to the other side. If the glass is a parallel slab, what happens when the ray reaches the opposite side from the inside? At what angle to the surface does it exit the glass back into air?
4. What is the smallest angle to the surface that light can have and still be transmitted from the inside to the outside in the case of flint glass? What angle is the light going at as it leaves in that case?
Hint: The laws of reflection and refraction are usually stated in terms of the angles to the perpendicular or "normal" to the surface. These questions are rephrased in terms of the angles to the surface so take care in interpreting the laws and your answers.
In: Physics
In a short paragraph, can you describe the primary attributes of a limited liability company? Why would you choose an LLC over a corporation? Why not?
In: Finance
A car with a mass of 1160 kg is traveling in a mountainous area with a constant speed of 73.6 km/h. The road is horizontal and flat at point A, horizontal and curved at points B and C. The radii of curvatures at B and C are: rB = 150 m and rC = 105 m. Calculate the normal force exerted by the road on the car at point Now calculate the normal force exerted by the road on the car at point B. And finally calculate the normal force exerted by the road on the car at point C.
In: Physics
public class Node<T>
{
Public T Item { get; set; }
Public Node<T> Next; { get; set; }
public Node (T item, Node<T> next)
{ … }
}
public class Polynomial
{
// A reference to the first node of a singly linked list
private Node<Term> front;
// Creates the polynomial 0
public Polynomial ( )
{ }
// Inserts term t into the current polynomial in its proper
order
// If a term with the same exponent already exists then the two
terms are added together
public void AddTerm (Term t)
{ … }
// Adds polynomials p and q to yield a new polynomial
public static Polynomial operator + (Polynomial p, Polynomial
q)
{ … }
// Multiplies polynomials p and q to yield a new polynomial
public static Polynomial operator * (Polynomial p, Polynomial
q)
{ … }
// Evaluates the current polynomial at x
public double Evaluate (double x)
{ … }
// Prints the current polynomial
public void Print ( )
{ … }
}
DON'T SOLVE THE FIRST TASK JUST THE ONE AFTER THIS LINE. The first
task is their for reference
C# Please :)
In a separate namespace, the class Polynomial (Version
2) re-implements a polynomial as a linear array
of terms ordered by exponent. Each polynomial is also reduced to
simplest terms, that is, only one term
for a given exponent.
public class Polynomial
{
// P is a linear array of Terms
private Term[ ] P;
…
// Re-implement the six methods of Polynomial (including the
constructor)
…
}
In: Computer Science