theater seating chart is implemented as a two-dimensional array of ticket prices, Like this 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30 40 40 30 30 20 20 20 30 30 40 50 50 40 30 30 20 30 40 50 50 50 50 50 50 40 30 Write a program that prompts users to pick either a seat or price. Mark sold seats by changing the price to 0. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price.
Q: Question 17 (23 points) Write a method that takes an array of type double and returns a boolean…
A:
Q: Project 1: Upsampling an Image using Interpolation Techniques There are a number of techniques that…
A: Solution:
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: Algorithm - Design a method with one argument as a array. Now use the below logic to solve the…
Q: One statistical operation that is sometimes performed on a set of data values is to remove values…
A: The java program with given description can be designed as follows: Open the file that has the…
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: In this problem, we need to design a javascript program. Input - one array output - integer
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: In this problem, we need to design a javascript program. Input - one array output - integer
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: Step-1: Start Step-2: fucntion countLayers(rug) Step-2.1: Declare variables layer and initialize…
Q: magic square is a square array of non-negative integers where the sums of the numbers on each row,…
A: def isMagicSquare(array): """ Python function that tests whether given array is a magic…
Q: | 34 21 32 41 25 | 14 42 43 14 31 | 54 45 52 42 23 | 33 15 51 31 35 : | 21 52 33 13 23 Do you like…
A: Algorithm :- step-1 : First read the array of m*m matrix, which stores integers from 11 to 55.…
Q: b. 2 balloons 2 balloons Hence, r is only the balloon which is odd in number. Example 2: Input: ● y:…
A: Answer: Algorithms Step1:we have taken user input as the size of the string Step2: Then we have ask…
Q: Provide a code segment that creates an arraylist of three integers and prints these values on the…
A: ArrayList: ArrayList is a java API class of java.util package. Elements can be added to the array…
Q: ick the code that will add a new property z to the first array element. let points = [ { x: 10, y:…
A: The above code is an example of a JavaScript array which is automatically initialized as an object.…
Q: Write a Java program to display three monthly sales of different vehicle types. The rows and columns…
A: code snippet:
Q: Tetris is a famous puzzle video game. The objective of the game is to complete lines by moving…
A: The program for the problem is given below: def tetris(grid): width = 0 total_full_lines = 0 for i…
Q: P1 P2 P3 P4 A pentagonal number is one that corresponds to dots arranged into a pentagon. Above are…
A: Solution :: The solution for finding pentagon number is to find using recursion, as to calculate…
Q: C++ 2. A theater seating chart is implemented as a two-dimensional array of ticket prices, Like…
A: Given: A two-dimensional array showing seat chart (row=9, column=10) with prices 10, 20, 30, 40, 50.…
Q: 1. Fibonacci The Fibonacci numbers are a sequence of numbers where each number after the first two…
A: here in this question we have asked to print Fibonacci series by taking input from user for no of…
Q: Part-A: Consider first ten letters of your name and for each letter encode with an integer number.…
A: The complete answer is given below.
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: In this problem, we need to design a javascript program. Input - one array output - integer
Q: Java Given a 2 dimensional array, write a method to return the average of each row. The result…
A: public class CST1201Test3 { public static void main(String[] args) // main…
Q: ArrayList a01 = new ArrayList(); a01.add(8); a01.add(7); a01.add(4); a01.add(6); a01.add(7);…
A: Lets Dry run the code ArrayList<Integer> a01 = new ArrayList<Integer>();a01.add(8);…
Q: A theater seating chart is implemented as a two-dimensional array of ticket prices, like this: 10…
A: The ask is to write a java program for theater seating chart using a two-dimensional array of ticker…
Q: A prime integer is any integer greater than 1 that can be divided evenly only by itself and 1. The…
A: Program: #include <iostream> #include<iomanip> using namespace std; int main() { const…
Q: Write Javascript code to do the following: - Create an array of the following temperature readings:…
A: logic:- declare an array with elements 36,5,10,24,40,31 iterate from i=0 to i<arr.length…
Q: Write a program that defines symbolic constants for all seven days of the week. Create an…
A: Take 7 constants for the day's number or the day's name and assign the values. Take an array of same…
Q: X42: frontPiece Given an int array of any length, return a new array of its first 2 elements. If the…
A: Given an int array of any length, return a new array of its first 2 elements. If the array is…
Q: Create an ArrayList, Named it Husnain that can hold Integers, and fill each slot with a different…
A: By specifying the number n, we can generate the random number from 0 to n-1 So, add 1 to this, and…
Q: Create a partially-full array that can hold up to 1000 (x,y) coordinate pairs. In order to do this,…
A: Actually, array is a collection of elements.
Q: age/plot an gif to this code. This is a brownian motion python code here it is code import numpy…
A: It is defined as a powerful general-purpose programming language. It is used in web development,…
Q: use c++ to Write a class ReservationSystem to develop a seat reservation system for your airline.…
A: Required: use c++ to Write a class ReservationSystem to develop a seat reservation system for your…
Q: A teacher has five students who have taken four tests. The teacher uses the following grading scale…
A: #include <iostream> using namespace std; int main(){ string names[5];char…
Q: Question 1 (Marks: 30) Write a Java program to display three monthly sales of different vehicle…
A: Here have to determine about java code for given 2d type problem.
Q: Write a Java program to display three monthly sales of different vehicle types. The rows and columns…
A: According to the Question below the solution: Output:
Q: • Create a vector of M values ranging from (pi) to (6 pi), (cach step equal pi • Compute N cos (M+3)…
A: Note: Answering in python as no language is specified. Input : Create vector: M Calculate N and P…
Q: JAVA LANGUAGE Create an ArrayList, Name it YourRegNoandName that can hold Integers, and fill each…
A: import java.util.*;import java.lang.*;import java.util.Scanner;public class main{ public static…
Q: The Chat-A-While phone company provides service to six area codes and charges the per-minute rates…
A: Below is the required code in C# language. Program Approach: Make use of namespace to get a…
Q: Question: Write a program to Simulate a game of tic tac toe. A game of tic tac toe has two players.…
A: Program.cs: using System; using System.Collections.Generic; using System.Linq; using System.Text;…
Q: Create a 2D array of size 14x14 having same values ranging from 0 to 255 in each row. You are free…
A:
Q: You have to use comment function to describe what each line does import java.io.BufferedReader;…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Write a program that do the following: Ask the user to input his/her first name and store it in a…
A: import java.util.*; class TestClass { public static void main(String args[] ) throws Exception {…
Q: Write a program that do the following: Ask the user to input his/her first name and store it in a…
A: PROGRAM STRUCTURE: Import the required packages. Start the definition of the main public class.…
Q: (4) $$ C:=\left\{(x, y, z) \in \mathbb(R)^(3): 1<x*(2)+y*{2)+z*(2} <9\right\}. $$ Solve Let the…
A: ANSWER: We have R={(x, y):x, y∈Z, x2 + y2≤4}. Let x=0 then, x2+y2≤4⇒y2≤4⇒y=0, ±1, ±2 Let x=±1 then,…
Q: Write a function that counts how many concentric layers a rug has. Examples countLayers([ "AAAA",…
A: Algorithm - Design a method with one argument as a array. Now use the below logic to solve the…
Q: Increasing the value of the length property adds more items to an array, but the items have null…
A: Array Length: The length of the array is automatically expands as more items are added in…
Q: Suppose A is a one dimension array with (20) elements. Write a code program which calculate the…
A: Answer :-- option f) 1) Elseif A(i) <0 then 2) End if 3) Next 4) text = c1: text2.text= c2.
Q: A popular word game involves finding words from a grid of randomly generated letters. Words must be…
A: Code is given below #include <bits/stdc++.h> using namespace std; // Converts key…
Q: Main difference between an array and an ArrayList is that an ArrayList can store more data types an…
A: Main difference between an array and an ArrayList is that an ArrayList can store more data types…
Q: Results are not the same at the end and I do not get the right result after choosing number 3. The…
A: While entering the record for the student, the buffer for the input requires to be cleared. It can…
Q: A class with 10 students will take 3 exams. Use 3 arrays to hold the scores for each student and…
A: Since you are not mentioning the programming language, here we are using Java to complete the…
Q: The Grades.java class file has a studentScores array with 6 elements. Add a loop that will Check…
A: Please find the answer below :
A theater seating chart is implemented as a two-dimensional array of ticket prices,
Like this
10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10
10 10 20 20 20 20 20 20 10 10
10 10 20 20 20 20 20 20 10 10
10 10 20 20 20 20 20 20 10 10
20 20 30 30 40 40 30 30 20 20
20 30 30 40 50 50 40 30 30 20
30 40 50 50 50 50 50 50 40 30
Write a program that prompts users to pick either a seat or price. Mark sold seats by changing the
price to 0. When a user specifies a seat, make sure it is available. When a user specifies a price,
find any seat with that price.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 10 images
- A theater seating chart is implemented as a two-dimensional array of ticket prices, like this: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30 40 40 30 30 20 20 20 30 30 40 50 50 40 30 30 2030 40 50 50 50 50 50 50 40 30Write a program that prompts users to pick either a seat or a price. Mark sold seats by changing the price to 0. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price. P7.8 should loop using a menu until the user selects quit. It should display the current state of the seats in the theater before prompting the user for 1) Select a seat or 2) Select by Price or 3) QuitMake certain to document your code using the JavaDoc format.An 8-puzzle game consists of 8 sliding tiles, numbered by digits from 1 to 8 and arranged in a 3x3 array of nine cells. A configuration in the puzzle refers to some specific arrangement of the tiles in the array, where each digit is arranged into a different cell. One of the cell is empty (represented by a "*") and any adjacent tile can be moved into the empty cell. An example below c | 1 | 2 | 3 b | 4 | * | 5 a | 6 | 7 | 8------------------ Y/X a b c We use a 3-tuple (number, X, Y) to represent the position of a digit, where number is the actual digit, and (X,Y) is the coordinate value of the digit in the current configuration (e.g., in the configuration above, we have (5,c,b), meaning the digit 5 is at the position of (c,b)).Hence the configuration in the example can be represented as:[(1,a,c), (2,b,c), (3,c,c), (4,a,b), (5,c,b), (6,a,a), (7,b,a), (8,c,a)].Any move of an adjacent tile into the empty cell moves the current configuration into the one adjacent to it.…You have been hired at an open-air mine. You are to write a program to control a digger. For your task, you have been given a 'map' of all the underground resources in the mine. This map comes as a two-dimensional integer array. The array has n rows and k columns. Each integer is between zero and one hundred (inclusive). This array represents a grid map of the mine – with each row representing a different height level. Each square in the grid can contain valuable resources. The value of these resources can go from zero (no resources) to 100 (max resources). The grid maps the resources just below the surface, and down to the lowest diggable depths. The digger starts at the surface (so, just on top of the topmost row in the grid)—at any horizontal position between 1 and k. The digger cannot dig directly downwards, but it can dig diagonally in either direction, left-down, or right-down. In its first time-step, it will dig onto the first row of the grid. In its second time-step, it'll hit…
- You have been hired at an open-air mine. You are to write a program to control a digger. For your task, you have been given a 'map' of all the underground resources in the mine. This map comes as atwo-dimensional integer array. The array has n rows and k columns. Each integer is between zero and one hundred (inclusive). This array represents a grid map of the mine – with each row representing a different height level. Each square in the grid can contain valuable resources. The value of these resources can go from zero (no resources) to 100 (max resources). The grid maps the resources just below the surface, and down to the lowest diggable depths. The digger starts at the surface (so, just on top of the topmost row in the grid)—at any horizontal position between 1 and k. The digger cannot dig directly downwards, but it can dig diagonally in either direction, left-down, or right-down. In its first time-step, it will dig onto the first row of the grid. In its second time-step, it'll hit…MUST BE WRITTEN IN C PROGRAMMING LANGUAGE CANNOT EDIT TEMPLATE IMAGE IN ANY WAY: Write a program to find and display the largest value in an integer array that is divisible by 3. For example, if the array is: 1 15 2 16 3 17 4 18 5 19 The largest number divisible by 3 is 18 On the other hand, if the array does not contain any values that are divisible by 3, the program writesNo value in the array is divisible by 3As you may see in the examples, the input consists of, firstly the size of the array, followed by the array elements. The answer is preloaded with the code to read in the array. Do not change this code. The Moodle checker expects *exactly* the output as shown. For example: Input Result 6 1 2 3 4 5 6 The largest value divisible by 3 is 6 6 1 -2 4 5 -7 8 No value in the array is divisible by 3The Chat-A-While phone company provides service to six area codes and charges the per-minute rates for phone calls shown in Figure 6-25 (below). Write a program named ChatAWhile that stores the area codes and rates in parallel arrays and allows a user to enter an area code and the length of time for a call in minutes, and then display the total cost of the call. For example if the area code is in the array, such as 715, and the call length is 22 minutes, the output should be: Your phone call to area 715 costs $0.16 per minute For 22 minutes the total is $3.52 If the area code is not in the array, such as 111, the program should not accept a call length, and instead output Sorry - no calls allowed to area 111. Area Code Per-Minute Rate ($) 262 0.07 414 0.10 608 0.05 715 0.16 815 0.24 920 0.14 Figure 6-25 Per-minute phone call rates In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this,…
- Write a Java program to display a three_month delivery report for three different years. The following rows and columns represents the deliveries made for each year Jan Feb Mar DELIVERIES 2018 128 135 139 DELIVERIES 2019 155 129 175 DELIVERIES 2020 129 130 185 Use a Two-Dimensional array, produce the deliveries report, including the deliveries made statistics. The deliveries made statistic must display the total, maximum and minimum deliveries made in the two-dimensional array.in C#, Visual Basic Write an app for Boston Airlines that allows a customer to reserve a seat on the airline’s only plane (capacity: 10 seats). Radio buttons should allow the choice between First Class and Economy. The app should then assign a seat in the first-class section (seats 1–5) or the economy section (seats 6–10). Use a one-dimensional array of type bool to represent the seating chart of the plane. Initialize all the elements of the array to false to indicate that all the seats are empty. As each seat is assigned, set the corresponding element of the array to true to indicate that the seat is no longer available. Your app should never assign a seat that has already been assigned. When the economy section is full, your app should ask the person if it is acceptable to be placed in the first-class section (and vice versa). If yes, make the appropriate seat assignment. If no, display the message “Next flight leaves in 3 hours."A minimax or saddle point in a two-dimensional array is an element that is the minimum of its row and the maximum of its column, or vice verse. For example, in the following array11 22 33 33 99 55 66 77 77 44 99 22the element 33 is a minimax because it is the maximum of row 0 and the minimum of column 2. The element 55 is another minimax because it is the minimum of row 1 and the maximum of column 1.Write a program that reads a 4-by-3 matrix, and then prints the location and value of each minimax in the matrix. For example, it would printa[0][2] = 33 is a minimax a[1][1] = 55 is a minimaxfor the matrix shown above.
- Java program You have been hired at an open-air mine. You are to write a program to control a digger. For your task, you have been given a `map' of all the underground resources in the mine. This map comes as a file. The file has n rows. Each row has n space-separated integers. Each integer is between zero and one hundred (inclusive). The file should be understood to represent a grid, n wide by n deep. Each square in the grid can contain valuable resources. The value of these resources can go from zero (no resources) to 100 (max resources). The grid maps the resources just below the surface, and down to the lowest diggable depths. The digger starts at the surface (so, just on top of the topmost row in the grid)—at any horizontal position between 1 and n. The digger cannot dig directly downwards, but it can dig diagonally in either direction, left-down, or right-down. In its first time-step, it will dig onto the first row of the grid. In its second time-step, it'll hit the second row,…JAVA Your teacher has created two arrays, each holding the results of tests, say Test 1 and Test 2. You need to create a new array which holds the averages of these two tests. You may assume that the first element of the first test array refers to the student who also has the grade in the first element of the second test, and the last element in each array are the grades the last student earned for each test. All students received grades for both tests, meaning both test arrays are of the same length. Complete the method, named makeAverage, in the class named Grades.java. There are two parameters to this method: the first is the integer array representing the grades of the first test, and the second is the array containing the grades of the second test. The new average array should be returned by the method. The grades should be treated as double variables. For example, consider the test grades for the five students in the following arrays: [ 87 ] [ 91 ] [ 76 ] [ 76 ] [ 94 ]…Write a Java program to display the three highest monthly speeding fines recorded for fourdifferent cities. The following rows and columns represent the monthly speeding fines of eachcity. JAN FEB MARJHB 128km 135km 139kmDBN 155km 129km 175kmCTN 129km 130km 185kmPE 195km 155km 221km Using a Two Dimensional array, produce the speeding fines report including the speeding finesstatistics. The speeding fines statistics must display the highest and lowest speeding fines in thetwo dimensional array.