Write a Java program for a Play-House Manager, who would like to calculate the total profit from selling tickets of the Drama. There are 3 types of tickets: Balcony (120 AED), VIP (70 AED) and Basic (40 AED). The manager has bills and salaries to pay. Therefore, the profit is equal to (incomes – expenses)..
Q: Consider a simple congestion-control algorithm that uses linear increase and multiplicative decrease…
A: Sketch of the Congestion-control algorithm A basic congestion-control algorithm that utilizes…
Q: What does "infrastructure mode" mean in the context of a wireless network? If the network is not in…
A: The answer of the question is given below
Q: Consider a simple congestion-control algorithm that uses linear increase and multiplicative decrease…
A: Initially, cwnd = 1 On ACK : cwnd + 1/cwnd On timeout : cwnd = min(1, cwnd/2)
Q: Suppose A, B, and C all make their first carrier sense, as part of an attempt to transmit, while a…
A: I have mentioned answer in below While C is transmitting, A and B make their first carrier senses…
Q: Define a function generate_new_string that takes an integer times and a string string and returns a…
A: The following are steps need to be taken for the given program: Using for loop to iterate "times-1"…
Q: Which of the following is true about functions with a return value? OYou must use the return value…
A: A return value is a value that a function returns to the calling function when it completes its…
Q: A character array representing a string can be input with scanf and the below conversion specifier.
A: Introduction: There are different format specifier for different types of integers such as %d for…
Q: Suppose a router has three input flows and one output. It receives the packets listed in Table 6.1…
A: (a) In Fair Queuing, packets are separated based on the flow and different queues are maintained for…
Q: Complete the following direct proof of the statement: If x and y are positive real numbers and x <…
A: We need to find the missing statements to complete the proof.
Q: Download a petrol dataset in kaggle datasets, and perform the following codes. a. Create a external…
A: The above question is solved in step 2 :-
Q: Distinguish between Internet access and a telephone network.
A: It is believed that the telephone network, which connects telephones to enable voice communications…
Q: In counter-controlled iteration, a(n)___________ is used to count the number of times a group of…
A: A block of code is repeatedly run a predetermined number of times using count-controlled iteration.…
Q: Create a program that reads in a word from the user and counts the number of occurrences of that…
A: The code snippet in C++://header…
Q: Suppose you are downloading a large file over a 3-KBps phone link. Your software displays an…
A: The answer is as follows.
Q: 8. MOLAP. Suppose the size of different dimensions are A: 100, B: 500, C: 2000 Chunk size is 50* 100…
A:
Q: A binary symmetric channel has a chance p = 0.002 of incorrectly transmitting a single bit. Let w…
A: The answer is
Q: Q5) Using RSA algorithm, Assume: p= 7 , q = 13, e = 5, d = 29. c) What is the ciphered text if the…
A: The RSA algorithm:- Two Primes are chosen, p and q. Now, compute the value of n = p *q and z =…
Q: 23. Write a C program that reads three floating values and check if it is possible to make a…
A: Here is the c program of above problem. See below steps.
Q: Protocols for transporting data. The difficulties associated with the use of TCP and UPD in…
A: Computer Networks is the set of the computers which are connected with the transmission medium it…
Q: Is it possible for TCP Reno to reach a state with the congestion window size much larger than (e.g.,…
A:
Q: PYTHON Create a proof-of-concept Morse Code translation application. For 'proof-of-concept', a…
A: Three files were subsequently produced when the code was implemented in Python. The files' contents…
Q: c) Perform the operations (112-123) and (79-014) using the two's complement of the numbers. Use…
A: Dear student, These are two different questions. As per guidelines , I can do only first question…
Q: Define a function Function1 that takes no parameter and performs the following: • Define and declare…
A: Introduction: In this question, we are asked to write a program to create and funtion and inside…
Q: LWC Assignment: Create a LWC component to display the Hello World on the UI.
A: What is LWC: Lightning Web Components uses core Web Components standards and provides only what’s…
Q: for the below array, the fourth element is: char str1[] = "string"; a. n b. \0 c. i d. I
A: Let's write a code with the similar condition and find the 4th element in the given array. So,…
Q: Laplace Operator laplace Laplace transform. L = laplace(F) is the Laplace transform of the sym F…
A:
Q: Let f, g : A → B and h : B → C. Prove that if h is one-to-one and h ◦ f = h ◦ g then f = g. *please…
A: The answer is given below.
Q: Comment on the current status of IPv4 and identify the major emerging problems for IPv4 and discuss…
A: IPv4 and its Current Status Internet Protocol Version 4 (IPv4) is a popular protocol for data…
Q: Write a scenario that could be used to help design tests for the wilderness weather station system.
A:
Q: Explain why TIME_WAIT is a somewhat more serious problem if the server initiates the close than if…
A: Introduction: The server often participates in many more connections than clients, so the server's…
Q: te a JAVA PROGRAM as a Currency Converter program. The program performs Currency Exchange operation…
A: I have the code below:
Q: Remember to include the docstring, and explain it step by step. Write a function named square_list…
A: The "list" object of Python is a mutable data type and when passed to a function will be passed to…
Q: Provide the compressed format for each of the following IPv6 addresses. Show both rule I and rule 2…
A:
Q: This program will ask the user to input a number (suppose num). And that outputs the first num'th…
A: Here is c++ code of above program.
Q: --Problem -3 -Create a flowchart design that depicts the solving of the following problem: Asks user…
A: To draw flowchart to display the maximum number among three numbers.
Q: Suppose a host wants to establish the reliability of a link by sending packets and measuring the…
A:
Q: Output For each graph, produce a line listing the weak vertices ordered from least to greatest.…
A: #include<iostream> using namespace std; //max no of nodes const int n_max=20; int main(){…
Q: Label the Recursion Requirements. int fact (int n) { int result; } if(n==1) return 1; result fact…
A: ANSWER:
Q: 5.What is the worst-case efficiency class of the following algorithm? * line no. 1 ALGORITHM Q5…
A: The answer for the above mentioned question is given in the following steps for your reference.
Q: As a software project manager in a company that specializes in the development of software for the…
A: The project manager for the software must visit at least one offshore industry where the company…
Q: A cybersecurity expert discovers several users with administrative rights during a security review.…
A: Access control withdrawals and restrictions are one of the most important examples of prevention and…
Q: --Problem -3 -Create a flowchart desig that depicts the solving o the following problem: Asks user…
A: write a program flowchart that user enter three number find out maximum number to display
Q: How crucial is software development? Four more characteristics, in your opinion, should be…
A: Introduction: Software development's ability to create and provide value to its users cannot be…
Q: Counter-controlled iteration is also known as _____________iteration because it’s known in advance…
A: A block of code is repeatedly run a predetermined number of times using count-controlled iteration.…
Q: Which of the following is true about Graphical User Interfaces? OThe only input device is the…
A: about graphical user interface
Q: What is the output produced by the following code? int a=2, b=4; for (int i=0; i<9; i++) a+=2; b+=4;…
A: Given Code public class Question{ public static void main(String []args){…
Q: Assume that TCP implements an extension that allows window sizes much larger than 64 KB. Suppose…
A: The full form of the TCP is Transmission Control Protocol which communicates the standard that…
Q: Design a class named Cake. Data fields include two string fields for cake flavor and icing flavor…
A: Diagram Cake - cake flavor: string - icing flavor: string - diameter: num - price: num + set cake…
Q: The program should then print positive integer as follows: The number of integers entered (not…
A: Since no language is asked in the problem. I am using c language. Here is c program implementation…
Q: (a) What is the probability that T(w) = 10100011 ? (b) What is the probability that T(w) = 10101011?…
A: Given : Probability of error = 0.002 Probability of no error = 0.002 w = 10100011
Write a Java program for a Play-House Manager, who would like to calculate the total profit from selling tickets of the Drama. There are 3 types of tickets: Balcony (120 AED), VIP (70 AED) and Basic (40 AED). The manager has bills and salaries to pay. Therefore, the profit is equal to (incomes – expenses)..
Step by step
Solved in 4 steps with 2 images
- Write a Java program for a Play-House Manager, who would like to calculate the total profit from selling tickets of the Drama. There are 3 types of tickets: Balcony (120 AED), VIP (70 AED) and Basic (40 AED). The manager has bills and salaries to pay. Therefore, the profit is equal to (incomes – expenses). last time it was wrong codeWRITE A JAVA PROGRAM. Telco is a cellular telephone company that offers two types of service: standard and premium. Its rates vary, depending on the type of service. The rates are computed as follows: Calculate the amount due if given a service code (s or S means standard service; a service code of p or P means premium service), and the number of minutes the service was used. For the premium service, the customer may be using the service during the day and the night. Therefore, to calculate the bill, you must ask the user to input the number of minutes the service was used during the day and the number of minutes the service was used during the night. Input Description: There are service code (s, S, p or P) and usage amount u (u≥0). If the service code is p or P, then the usage has two types; day usage du(du≥0) and night usage nu(nu≥0). Output Description: The format is RMt where t is the amount due in Malaysia currency format as shown in the sample output. Hint: Use the…Hi, how do we go about solving this problem in Java programming language? Input The input begins with an integer 1 ≤ ? ≤ 10000, the number of frosh. For each frosh, a line follows containing the course numbers of five distinct courses selected by the frosh. Each course number is an integer between 100 and 499. Output The popularity of a combination is the number of frosh selecting exactly the same combination of courses. A combination of courses is considered most popular if no other combination has higher popularity. Output a single line giving the total number of students taking some combination of courses that is most popular.
- This is a JAVA programming assignment. Program a GeneticAlgorithm to find an integer number between 0 and 31 that maximizes the function f (x) = x2.The initial procedure is given as below.• Population size: 6• Crossover probability: 100%• Mutation probability: 5%• Terminating criteria:o When your program produces an average of candidates is equal to or greater than29, then you can accept it as a terminating condition.• Fitness function:o You can use the function itself (f (x) = x2)as your fitness function.1. For the 1st generation, you need to print the process and result of selection, crossover, andmutation operation.you need to print the corresponding integer values and bits (binary values)of selection, crossover, and mutation operation. You also need to decide andprint the crossover point and the mutation point.2. From the 2nd generation, you do not have to print all results of selection, crossover,mutation operations. You can just print the result of each generation. Please provide…Program in C++ or Java Simple simulation to estimate your likelihood of winning in a game of poker. Assume the game has 6 players.• Repeatedly (500-1000 times):◦ Shuffle the 52-card deck, and deal yourself a 5-card hand.◦ Repeatedly (500-1000 times): ▪ Using the remaining 47 cards, deal the other 5 players their hands ▪ Determine if you would win or lose that hand; that is, if your hand would rank highest.2 Update some counters accordingly. ▪ Reshuffle the deck of 47 cards ◦ Record the proportion of the above hands which you won.• For each rank of hand, report the percentage of hands having that rank, and the average winning percentage (average of the averages) for each rank. Produce 2 output files• A session log output as a CSV (comma-separated value) file, with each hand on a separate line. For each hand: the cards in the hand; what the hand was evaluated as; and its winning percentage.• A summary showing the percentage of hands falling into each rank, and the overall win…This is for Java Programming language. How can I answer this question, please? I am yet to find the correct answer online. Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift, $17 per hour; second shift, $18.50 per hour; third shift, $22 per hour. Each factory worker might work any number of hours per week; any hours greater than 40 are paid at one and one-half times the usual rate. In addition, second- and third-shift workers can elect to participate in the retirement plan for which 3% of the worker’s gross pay is deducted from the paychecks. Write a program that prompts the user for hours worked, shift, and, if the shift is 2 or 3, whether the worker elects the retirement (1 for yes, 2 for no). Display: Hours worked Shift Hourly pay rate Regular pay Overtime pay Total of regular and overtime pay Retirement deduction, if any Net pay. Please and thanks!
- In java Problem: An online grocery store sells items on a web page. A user adds items to a basket and he clicks on the submit button when he completes. The store sells food and electronic items. The electronic items require VAT payment of 15 percentage of their prices. There are packed and lose food. The lose food is measured in weights. User specifies the weight amount or the quantity in his selection of items depending on its type. The price is computed as the product of the price per item or the price per weight and the weight or quantity are given by the user. Write an application that reads a user basket list and produces the bill receipt. Check the given samples of input/output in the figures below. The bill receipt contains the list of item details in decreasing order according to the price computed for each item. Use the selection sort1 to sort the items in the list and do not use java given sort method. Selection sort is an algorithm used to arrange elements in a list. It…Write a program in Java language to manage a hotel with 25 rooms, 10 rooms are executive, with price 2500 Gh cedis, 7 rooms are charlet, with amount 1500 Gh cedis, 7 rooms are normal, with amount 500 Gh cedis, The program should allow customers to book rooms for a number of nights and update the number of empty rooms available for each category when a customer has fully paid and has checked- in, also update the number of empty rooms when the customer has checks-out Customers should make bookings with their first name and telephone number A customer should be prompted to know if a room has been booked ( meaning another customer has booked it but not fully paid or not checked-in ) A customer should be prompted to know if a room has been occupied ( meaning another customer has fully paid or checked-in) A customer should be prompted to know if a room is available ( meaning the room is neither been booked nor checked in) A customer should be able to know if an available room from…Starting Out with Java From Control Structures through Objects 6th Edition 4. Paint Job Estimator A painting company has determined that for every 115 square feet of wall space, one gallonof paint and eight hours of labor will be required. The company charges $18.00 per hourfor labor. Write a program that allows the user to enter the number of rooms to be paintedand the price of the paint per gallon. It should also ask for the square feet of wall space ineach room. The program should have methods that return the following data: • The number of gallons of paint required• The hours of labor required• The cost of the paint• The labor charges• The total cost of the paint jobThen it should display the data on the screen.
- Solve by Java Problem: An online grocery store sells items on a web page. A user adds items to a basket and he clicks on the submit button when he completes. The store sells food and electronic items. The electronic items require VAT payment of 15 percentage of their prices. There are packed and lose food. The lose food is measured in weights. User specifies the weight amount or the quantity in his selection of items depending on its type. The price is computed as the product of the price per item or the price per weight and the weight or quantity are given by the user. Write an application that reads a user basket list and produces the bill receipt. Check the given samples of input/output in the figures below. The bill receipt contains the list of item details in decreasing order according to the price computed for each item. Use the selection sort' to sort the items in the list and do not use java given sort method. Selection sort is an algorithm used to arrange elements in a list.…Write a java program to simulate a car insurance We have a problem, which is calculating the insurance price at a unified price for all categories.to solve this problem I want to calculate the insurance price in addition to the factors in the uml. For example, if the individual's age is from 18-25, the insurance rate will increase by 1% over the basic price, as well as the type of car and the gender of the person who wants insurance, for example, if a man also increases 1 % and so are all the factors. If you cannot write the entire program, it is not a problem. Write at least the equations for calculating the insurance or half of the program also You can put random numbers and random prices.Write a JAVA program to generate two cards randomly and display the bigger card between them. The cards contain of two characteristic, color (Red, Blue, Green and Yellow) and value (1-10). The rules to identify the bigger card as below: a. The bigger the value, the bigger the card is, except 1 is bigger than 10. b. If the card is the same value, the color will be used to get the bigger card. Red > Blue > Green > Yellow Sample Input Card 1 : Blue 6 Card 2 : Yellow 8 Output :Card 2 is bigger Sample input Card 1 : Red 4 Card 2 : Green 4 Output:Card 1 is bigger (You are not allowed to use array)