Answer:
A. S0 = 1, S1 = 0, S2 = 0
lines need to send data for the fifth bit in an 8 bit system
Answer:
Fuel efficiency for highway = 114.08 miles/gallon
Fuel efficiency for city = 98.79 miles/gallon
Explanation:
1 gallon = 3.7854 litres
1 mile = 1.6093 km
Let's first convert the efficiency to km/gallon:
48.5 km/litre = (48.5 * 3.7854) km/gallon
48.5 km/litre = 183.5919 km/gallon (highway)
42.0 km/litre = (42.0 * 3.7854) km/gallon
42.0 km/litre = 158.9868 km/gallon (city)
Next, we convert these to miles/gallon:
183.5919 km/gallon = (183.5919 / 1.6093) miles/gallon
183.5919 km/gallon = 114.08 miles/gallon (highway)
158.9868 km/gallon = (158.9868 /1.6093) miles/gallon
158.9868 km/gallon = 98.79 miles/gallon (city)
Answer:
The solution code is written in Java.
- public class Movie {
- private double [][] seats = new double[5][5];
- private double totalSales;
-
- public Movie(){
-
- for(int i= 0; i < this.seats.length; i++){
- for(int j = 0; j < this.seats[i].length; j++){
- this.seats[i][j] = 12;
- }
- }
-
- this.totalSales = 0;
- }
-
- public boolean bookSeat(int i, int j)
- {
- if(this.seats[i][j] != 0){
- this.totalSales += this.seats[i][j];
- this.seats[i][j] = 0;
- return true;
- }else{
- return false;
- }
-
- }
- }
Explanation:
The method, bookSeat(), as required by the question is presented from Line 16 - 26 as part of the public method in a class <em>Movie</em>. This method take row,<em> i</em>, and column,<em> j</em>, as input.
By presuming the seats is an two-dimensional array with all its elements are initialized 12 (Line 7 - 10). This means we presume the movie ticket price for all the seats are $12, for simplicity.
When the<em> bookSeat() </em>method is invoked, it will check if the current price of seats at row-i and column-i is 0. If not, the current price, will be added to the <em>totalSales </em>(Line 19)<em> </em>and then set the price to 0 (Line 20) and return <em>true</em> since the ticket is successfully sold (Line 21). If it has already been sold, return <em>false</em> (Line 23).
Answer:
I'm going to make a list of everything you need to consider for the supervision and design of the bridge.
1. the materials with which you are going to build it.
2. the length of the bridge.
3. The dynamic and static load to which the bridge will be subjected.
4. How corrosive is the environment where it will be built.
5.wind forces
6. The force due to possible earthquakes.
7. If it is going to be built in an environment where snow falls.
8. The bridge is unique,so the shape has a geometry that resists loads?.
9. bridge costs.
10. Personal and necessary machines.
11. how much the river grows