the impact of the united state of amercan's economic sanctions on the republic of cuba
Create a rectangle class having length and width as parameter. Write getter/setter for each parameter. Write default constructor that should initialize the default value to the length and width.. Write member functions to calculate area and another function to calculate perimeter in class. Write a function to print the information regarding rectangle which include length, width, area and parameter.
Formula to calculate area = 0.5 * length * width
Formula to calculate perimeter=2 * length+ 2 * width
Calculate the volume occupied by 22.12 g of sodium phosphate at 6.54 atm and 76 degrees Celsius.
a) Write an assembly program using MARIE's assembly Instruction set that prompts the user to enter a non-negative integer that is less than 10. The program should include a subroutine that keeps prompting until a valid value is obtained. When a valid number is entered, it will be displayed. (Hint: Use JNS & JUMPI instructions to implement the subroutine)
N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it. Example: Subt One /Subtract 1 from AC
b) Add a screenshot of the simulation, showing the result (A screenshot of the MARIE Simulator window after running the program). Instructions: - Use “ORG” instruction to start your program at address equivalent to 25610. - Use your last university ID number to input the value of X. For example, if your ID is1915161678234, then you will use the number 4 as the value of x. - Do not forget to change the representation of the Input and Output windows in the simulator to Decimal.
Jaya Jusco (JJ) Sdn Bhd needs you to develop an application to calculate their customer JJ point’s reward. Define a class named Customer with the following variables declarations:
String CustName;
String CustAddress;
int pointRewards;
Suppose a box contains 20 red marbles, 12 blue
marbles, 8 green marbles, and 10 yellow marbles. If
you randomly select one marble from the box.
(a) what is the probability that you will have a red
marble?
(b) what is the probability that you will have a green
marble?
(c) what is the probability that you will have a red or
green marble?
(d) what is the probability that you will have a red and
yellow marble?
(e) what is the probability that you will have a red
marble with replacement?
(f) what is the probability that you will have a blue
marble without replacement?
(g) what is the probability that you will have a yellow
marble with replacement?
(h) what is the probability that you will have a green
marble with replacement?
A proton moves through a uniform magnetic field of magnitude 2.0 μT = 2.0
x 10^-6 T at a speed of 5.00 x 10^6 m/s.
(a) What is the magnitude of maximum
magnetic force it can experience?
(b) If the proton is replaced by an electron,
will it experience the same maximum force?
Suppose a box contains 20 red marbles, 12 blue
marbles, 8 green marbles, and 10 yellow marbles. If
you randomly select one marble from the box.
(a) what is the probability that you will have a red
marble?
(b) what is the probability that you will have a green
marble?
(c) what is the probability that you will have a red or
green marble?
(d) what is the probability that you will have a red and
yellow marble?
(e) what is the probability that you will have a red
marble with replacement?
(f) what is the probability that you will have a blue
marble without replacement?
(g) what is the probability that you will have a yellow
marble with replacement?
(h) what is the probability that you will have a green
marble with replacement?
What are enzyme
Create a java program which allows the user to enter two values (Using JOptionPane) to be divided. The program catches an exception if either of the entered values is not an integer.
Declare three integers—two to be input by the user and a third to hold the result after dividing the first two. The numerator and denominator variables must be assigned starting values because their values will be entered within a try block. Also declare an input String to hold the return value of the JOptionPane showInputDialog() method.int numerator = 0, denominator = 0, result; String display;
Add a try block that prompts the user for two values, converts each entered String to an integer, and divides the values, producing result(Cast the result to a double).
Add a catch block that catches an Arithmetic Exception object if division by 0 is attempted. If this block executes, display an error message, and force result to 0.