Concept explainers
Your swim school has two swimming instructors, Jeff and Anna. Their current schedules are shown below. An “X” denotes a 1-hour time slot that is occupied with a lesson.
Write a program with array(s) capable of storing the schedules. Create a main menu that allows the user to mark a time slot as busy or free for either instructor. Also, add an option to output the schedules to the screen. Next, add an option to output all time slots available for individual lessons (slots when at least one instructor is free). Finally, add an option to output all time slots available for group lessons (when both instructors are free).
18. Modify
Want to see the full answer?
Check out a sample textbook solutionChapter 7 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Software Engineering (10th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Starting Out with Programming Logic and Design (4th Edition)
Starting Out with Java: Early Objects (6th Edition)
Starting Out with Python (4th Edition)
- Design a roulette wheel which allows the user to enter bets on multiple numbers. Allow the user to stop betting when they enter 0 on a bet. The program will then choose a random number between 0 and 36. If the user wins, they will get back 30 times the amount they bet on that number. The program will print out the winning number as well as how much they won or lost. Create an array to store the numbers the user bet on. Create a corresponding array to store the amount they bet on each number.o int[] bets=new int[36];//To store the person's betso int[] amount =new int[36];//To store the amount of the bet Ask them what numbers they want to bet on and how they want to bet. Store these in the arrays. The program chooses a winning random number. Check to see if any of their bets match the correct number. If they have the correct number tell them this and inform them as to how much they won or lost. If they did not get the correct number tell them this and tell them how much they…arrow_forwardYou can copy all elements of one array into one another with an assignment statement. True or Falsearrow_forwardProgramming Language is C#: Create two integer arrays with the 3 items. Assign random values to each item and find the sum of all items of arrays . Finally, show the result by MessageBox.arrow_forward
- Create an application containing an array that stores eight integers. The application should call five methods that in turn (1) display all the integers, (2) display all the integers in reverse order , (3) display the sum of the integers, (4) display all values less than a limiting argument, and (5) display all values that are higher than the calculated average value.arrow_forwardAny loop statement can be used to traverse an array. True or Falsearrow_forwardThe intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal variable contains the number 0 before the loop is processed. a. For Each intX As Integer In intNums intTotal += intX Next intX dblAvg = intTotal / intNums.Length b. For Each intX As Integer In intNums intTotal += intNums(intX) Next intX dblAvg = intTotal / intX c. For Each intX As Integer In intNums intTotal += intNums(intX) intX += 1 Next intX dblAvg = intTotal / intX d. None of the above.arrow_forward
- Using Java in the photo attached program should be able to sort by clicking In this assignment, you are asked to implement a graphical application that displays a list of courses. Briefly, this GUI will take the inputs (i.e., course information), store them in an array list, and display course information in the output area. Figure 1 shows the layout of the CourseDisplay GUI. Figure 1: A screenshot of the CourseDisplay GUI. 2 Details of the program You should have three Java files: 1. CourseDisplayFrame class that extends JFrame class (The main part of your program). 2. CourseDisplayViewer class, which contains the main method where a CourseDisplay object will be created, and the GUI will pop up (Suggested frame width of 450, and frame height of 400). 3. Course class, which is the class that models the Course objects (This file will be given to you). 1 In your CourseDisplayFrame class file, you should have the followings: • Input area: – A text label and a text field (suggested width…arrow_forwardFor each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program named CheckZips that is used by a package delivery service to check delivery areas. The program contains an array that holds the 10 zip codes of areas to which the company makes deliveries. Prompt a user to enter a zip code, and display a message indicating whether the zip code is in the companys delivery area.arrow_forwardExercise Three: In this exercise, we are storing the user's test score. You need to know, how many test score you want to enter. · Ask the user to enter the size of the array. Input Validation: Don't make the array size zero, less than zero, and more than 5 (to keep the calculation simple). If the user enters wrong number, make him/her to enter again until he/she enters the acceptable number. . Then ask the user to enter his/her test score. Input Validation: User can't enter any score number less than O or greater than 100. If s/he enters, do not terminate the program. Ask the user to enter the number again until s/he gets it right. Hint: Feel free to combine one loop inside another loop. • Print them out they he/she has entered. Do not include those numbers in the test score array that is less than 0 or greater than 100. • Print them in reverse order (Note: you are not reversing the array, you are just printing them in reverse order) • Create an array and store all his even number…arrow_forward
- Create a flowchart that will ask the user for 10 numbers and store the numbers in the array in the sequence thatit will be entered by the user. Reverse the order of numbers in the array then output the new order starting from index 0 to array size -1 Example: User Input: 23 45 12 34 78 65 23 56 Reverse Order 7 56 23 65 78 34 12 45 23arrow_forwardQuestion 3 Used cars showrooms are places where used cars are displayed and sold. Write a method generateReport0 that takes as a parameter a two-dimensional array named prices of size 7 x 5 that contains used car prices in which each row represents a day and each column represents a showroom. The method displays the average used car price for each showroom. In addition, it should display the showroom with the highest average car price. For example, if the main method for this program has prices array values as given below: public static void main(String[] args) { double [] [] prices = { (3.0, 1.0, 1.0,7.0,5.0}, {1.5, 1.0,3.0, 1.0, 4.7}, (2.5,2.2, 1.0,1.9,1.7}, (1.0, 1.0, 8.0,2.2, 4.1}, {4.5,9.0, 8.0, 4.2,2.7}, {1.5,1.0, 4.0, 4.2,2.3}, {6.5,4.5,9.7,2.9,3.7} } }; generateReport (prices); Your generateReport() method should display the following output: Showroom 0 average used car price is 2.9285714285714284 Showroom 1 average used car price is 2.814285714285714 Showroom 2 average used…arrow_forwardPlease submit a flowchart of your program for your project below. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final average or grade. I would like the system to display the…arrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning