USING JAVA, PLEASE MAKE THIS AS SIMPLE AS POSSIBLE, THIS IS AN INTRODUCTORY JAVA COURSE
1. Design and implement a class called PairOfDice.
The class should include:
a. A non-default constructor, i.e. with parameters
b. A setter method for each instance data
c. A getter method for each instance data
d. A method roll() that rolls both dice
e. A toString() method that returns a string containing the colors of both dice, eg "Colors of both dice: Red,Blue "
f. A method pairSum that returns the current sum of the two die values. (in PairOfDice.java)
2. Write an application TestPairDice that uses the PairOfDice class to create a pair of dice. The application prints to the screen the sum of their face values. The program then rolls the pair of dice and prints to the screen the new sum of their face and the colors of both dice. (TestPairOfDice.java)
SAMPLE OUTPUT: Sum of face values before roll: 7
Sum of face values after roll: 6
Color of both dice: Red,Blue
In: Computer Science
In: Computer Science
13. In your opinion, what are the three more important resources to manage in an organization? Explain in detail the logic of your answer.
14. Concepts such as ‘socio-technology,’ ‘technology-structure,’ ‘technology-system;’ what do they have in common? Provide examples
15. Provide an example of Competitive Advantage and of Comparative Advantage. Explain the difference between them.
In: Operations Management
Q1. a. Illustrate mathematically how to convert the following Binary number into Decimal Number system.
101112 = ?10
(11.10)2= ?10
(100011.011)2 = ?10
______________________________
b. Illustrate mathematically how to convert following decimal number into binary Number system.
(345)10 = ?2
(45.25)10 = ?2
______________________________
c. Illustrate mathematically how to convert the following Octal number into Decimal Number system.
278 = ?10
308 = ?10
______________________________
d. Illustrate mathematically how to convert the following Hexadecimal number into Decimal Number system.
(2F)16 = ?10
(BCC)16 = ?10
(2F. A2)16 = ?10
______________________________
e. Illustrate mathematically how to convert following Binary number into Octal Number system.
101012 = ?8
(11100.11)2= ?8
______________________________
f. Illustrate mathematically how to convert the following Binary number into Hexadecimal Number system.
101012 = ?16
(11100.11)2= ?16
(100011.011)2 = ?16
_______________________________
g. Solve and write the result of sum for given hexadecimal number
B D 5
+ A A B
--------------------
A D 5
+ F E C
--------------------
Solve and write the result of subtraction for given hexadecimal number
B D 5
- A A B
--------------------
B C 9
- E F C
--------------------
- A F 4
A B C
--------------------
In: Computer Science
Rachel purchased a car for $22,500 three years ago using a 4-year loan with an interest rate of 7.2 percent. She has decided that she would sell the car now, if she could get a price that would pay off the balance of her loan.
What is the minimum price Rachel would need to receive for her car? Calculate her monthly payments, then use those payments and the remaining time left to compute the present value (called balance) of the remaining loan. (Do not round intermediate calculations and round your final answer to 2 decimal places.)
Minimum price= _________________
In: Finance
In: Computer Science
How much heat, in kJ, is absorbed by a 77.0 g sample of aluminum at 25.0°C when it is immersed in boiling water? The specific heat capacity of aluminum is 0.900 J/g°C and the specific heat capacity of water is 4.184 J/g°C. Enter your answer with no units.
Need some help on this one. Please show work/relevant formulas. Thanks for any help!
In: Chemistry
Which of the following might suggest that a topic or point in a lecture is important. Check all that apply?
A) A fellow classmate writes it down.
B) The instructor writes it on the board.
C) It’s the funniest thing in the lecture.
D) The instructor looks down at her notes before saying it.
In: Psychology
In: Computer Science
In: Mechanical Engineering
Pringle et al (2015) experimentally examined the effects of fire and herbivory by elephants on the density of geckos that live in trees in Kenya, using 4 ha study plots. They excluded elephants from half of the plots and left the other half unfenced. Then they burned the vegetation in half of the plots and left the other half unburned (see sketch below). Each treatment was replicated once in three different areas used as blocks: Central, North and South. Four months after the treatments were applied, the researchers estimated the density of the gecko species Lygodactylus keniensis in each plot (number of individuals / m2 ).
Block | Elephant Treatment | Fire Treatment | July 2013 lizard density per ha | |
Central | Elephants present | Burned | 853.33 | |
Central | Elephants present | Unburned | 183.33 | |
Central | No elephants | Burned | 270 | |
Central | No elephants | Unburned | 256.67 | |
North | Elephants present | Burned | 784.44 | |
North | Elephants present | Unburned | 298.89 | |
North | No elephants | Burned | 417.78 | |
North | No elephants | Unburned | 212.22 | |
South | Elephants present | Burned | 661.11 | |
South | Elephants present | Unburned | 356.67 | |
South | No elephants | Burned | 380 | |
South | No elephants | Unburned | 388.89 |
Using R, calculate the standard deviations of the four treatments
In: Computer Science
In: Mechanical Engineering
Complete the program below in order to make run properly by competing validName methods and add trycatch block in the main method.
public class ExceptionWithThrow {
public static String validName(String name) throws InputMismatchException{
// check here if the name is a valid name
// through InputMismatchException if invalid //throw
// return the name if it is valid
}
public static void main(String[] args) {
// Ask the user to enter a name and their validity through validName method
// Add try and catch block around appropriate statements
}
}
In Java Please!
In Java Please!
In Java Please!
In Java Please!
In Java Please!
In: Computer Science
In: Operations Management
There are two lights that blink at regular intervals. When each one blinks, it turns on and then immediately back off; they don’t toggle. They are both off at time t=0t=0. The first one blinks at t=p,2p,3p,…t=p,2p,3p,… seconds; the second one blinks at t=q,2q,3q,…t=q,2q,3q,… seconds. Once they start, they both keep blinking forever. It is very exciting to see them blink at the same time (on the same second). But your patience is going to run out eventually, in ss seconds. Will they blink at same time between t=1t=1 and t=st=s (inclusive)? Write a program that can answer this question, quick, before they start blinking again!
In: Computer Science