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).
You can pick the song Cover me in sunshine- By pink
- <em>This</em><em> </em><em>is</em><em> </em><em>a</em><em> </em><em>very</em><em> </em><em>beautiful</em><em> </em><em>song</em><em> </em><em>that</em><em> </em><em>describes</em><em> </em><em>happiness</em><em>.</em>
- <em>I</em><em> </em><em>feel</em><em> </em><em>happy</em><em> </em><em>when</em><em> </em><em>I</em><em> </em><em>listen</em><em> </em><em>to</em><em> </em><em>this</em><em> </em><em>song</em><em> </em><em>because</em><em> </em><em>it</em><em> </em><em>shows</em><em> </em><em>the</em><em> </em><em>connection</em><em> </em><em>between</em><em> </em><em>a</em><em> </em><em>mother</em><em> </em><em>and</em><em> </em><em>daughter</em><em>.</em>
- <em>Also</em><em>,</em><em> </em><em>The</em><em> </em><em>song</em><em> </em><em>compares</em><em> </em><em>Sunshine</em><em> </em><em>with</em><em> </em><em>Happiness</em><em>.</em>
Answer: B) Clutch
Explanation:
The Clutch operate by pressings the two frictional surface press together by transferring the spinning motion between the drive shaft and the crank shaft.
The main purpose of the friction clutch is that, it is used to connect the moving member with another moving member at different speeds. It is basically used to synchronize the speed into the power.
Answer:
Angle of discharge make at the edge of tube=64.9 degrees.