In the Java programming language, write a program that opens a 400x200 window with two 200x200 buttons. One button says "Close" - which closes the program, and on the other the number "16". Each time you press this button, the number is halved until 1. When 1 is reached the button does not change anymore
Q: Which operating system, interrupt-driven or not, is quicker in real-world scenarios
A: When there is input, such as when someone types a key on the keyboard, then the CPU is interrupted…
Q: I Want Code C++ and screenshot outputs Write 14 C++ statements that… 1. Declare a string variable…
A: Algorithm 1: START Declare string variable color Set color = "Red" Declare two pointer variables…
Q: Q2) Brief out the differences between Spiral Model and Agile Model with its model diagrams.
A: Introduction: The process of software development is abstracted into a software process model. The…
Q: Create a queue class using Python lists under the hood. Make sure built-in list methods are not…
A: Approach Start Queue using the list Dequeue method to compose of 5 pairs Enqueue method End
Q: Object-oriented design should be employed whenever it makes sense to do so. Structured design may be…
A: Introduction: Object-oriented design (OOD): Objects are used in programming, as the name implies.…
Q: using java: Given an array of n buckets, each containing a red, white, or blue pebble, sort them by…
A: The algorithm of the code:- 1. Create a function sort() that takes an array of buckets as a…
Q: bd, 1sure.
A: Here There are two types of INSERT INTO statement forms. The first form doesn't specify the column…
Q: Determine whether the following term is strongly/weakly normalising, or both, and explain why: (λx.…
A: The term "(λx. x(λz. z y)y)(λx. x x)" is strongly normalizing.
Q: Create a complete program that contains the following: a) Create a looping menu with the following…
A: Step-1: StartStep-2: Declare variable optionStep-3: Start while loop (option not equal to 3)…
Q: SELECT X.A FROM X,Y,Z WHERE X.A-Y.A OR X.A=Z.A Answer the next two questions (Questions 8 and 9)…
A: Given SQL query is, Select X.A From X,Y,Z Where X.A=Y.A Or X.A=Z.A Here X, Y, Z are the names of the…
Q: ● ● ● Create an Arraylist for songs Create a menu that allows the user to print the playlist, add…
A: Algorithm: START Create an ArrayList of Strings called "playlist" Print the menu Read the…
Q: SO/IEC 9126 standard is to address some of the well-known human biases that can adversely affect the…
A: The ISO/IEC 9126 standard is an international standard for the evaluation of software quality. It…
Q: Translate the following statements into logical expressions using predicates, quantifiers, and…
A: //logical expressions
Q: implement a randomized queue where the item removed is chosen uniformly at random among items in the…
A: The algorithm of the code is given below:- 1. Create a Main class with a private Item array, int N,…
Q: Case Study – IoT System Architecture – Business Layer
A: The case study provided by Microsoft discusses how the Celli Group, a manufacturer of irrigation…
Q: Write the program that will accepts a string and output the word per line. For example, an input of…
A: This program uses the input() function to get a string from the user, and the split() method to…
Q: Software reliability models have appeared as people try to understand the features of how and why…
A: Dear Student, The required differences between software reliability prediction models and software…
Q: The flexibility with which object-oriented analysis and design may be employed, for example in the…
A: Object-oriented analysis and design (OOAD) is a methodology for designing software systems using…
Q: When we calculate the Fibonacci numbers with the long integer data type, sooner or later we will get…
A: Introduction : The Fibonacci sequence is a mathematical sequence of numbers that follows a specific…
Q: Please answer in c++. with showing the code.
A: Algorithm: Step - 1) Firstly, defining the function char toLowerCase(char c) to convert the…
Q: which of the following statements relating to information hiding in object-oriented programming is…
A: 1) Information hiding is an object-oriented programming technique specifically used to hide internal…
Q: To prove that you understand the difference between physical and schematic representations, please…
A: Introduction A model is a representation of a real thing or circumstance or an abstract of reality.…
Q: Prepare for the next semester by enrolling in a course that will teach you a programming language.…
A: The programming language that you should learn will depend on your objectives and what you intend to…
Q: 7. Simplify each of the following to p, q, T or F using logical equivalences. State the equivalence…
A: Given logical equivalences are, q→(p∨q) (p→q)∧(p→¬q)
Q: It's a good idea to think about using structured language when discussing processes that aren't part…
A: Structured language is a method of communication that uses a specific vocabulary, grammar, and…
Q: Maintainability is one of the most important software quality characteristics. Give the definition…
A: Software quality: Software quality is a set of measurable attributes or characteristics that…
Q: Fill in the blanks for closed-form expression, and the Big Theta. T(n) = {1,…
A: A recurrence relation is a mathematical equation that describes the value of a sequence in terms of…
Q: What are the upsides and downsides of developing software at a "good enough" standard?
A: Developing software at a "good enough" standard refers to the practice of creating software that…
Q: You might try to describe the steps you're trying to convey using structured English even if they…
A: Introduction: Structured English will be supplied in the first phase to describe processes unrelated…
Q: implement a double ended queue using java with the following API: deque() isempty() size()…
A: Here, we're using Java's built-in LinkedList class to implement the deque. The LinkedList class…
Q: QUESTION 4 The string 'abbba' will be accepted by the Turing Machine shown. O True O False 911 a;x,R…
A: We must determine whether or not the given string abba is accepted by the Turing machine, as we will…
Q: 1. A Grave is a dictionary with two keys: 'name': A string value with the grave's occupant's name…
A: Answer (1) Algorithm : 1. Define a function count_shouters that takes in a list of graves as a…
Q: Write a report: that describes the material concerning above 8 points. (You can look at IEEE…
A: The IEEE Standard ISO/IEC/IEEE 29148:2011 is also known as the IEEE Standards for Software and…
Q: For the following graph below, Generate the DFS tree using Stack method startin at node A. Nodes are…
A: In this question, it is asked to generate the DFS using a stack. The parent node is node A. It is…
Q: Part II: Graph Modelling Question 1: Construct a call graph for a set of seven telephone numbers…
A: Graph modeling is a method of representing relationships between entities using a graphical…
Q: You should make an attempt to clarify procedures that are not part of the systems analysis…
A: Structured English is the combination of the English language with structured programming syntax for…
Q: Create 2 simple python code that uses inorder traversal. Please dont copy on google create your own…
A: The Python codes are given below with output screenshots
Q: With the advent of Internet and Network technologies the distributed Software System has become…
A: Distributed systems are systems that consist of multiple interconnected components that work…
Q: Q.1 Answer to the given underneath question a.why do we experience cyber attack in the modern day…
A: Part(a) No matter how big or small a company is, it might be the target of a cyberattack. That is…
Q: Briefly explain what Machine Language is and how it works. And why does technology still struggle to…
A: Machine language, also known as assembly language or assembly code, is a low-level programming…
Q: QUESTION 4 The string 'abbba' will be accepted by the Turing Machine shown. O True False q11 aix, R…
A: We must determine whether or not the given string abba is accepted by the Turing machine, as we will…
Q: 1 result = 0 234567 3 while True: 8 9 10 11 12 13 print (result) user_input input ("Type in a quit…
A: Python: Python is a high level, general purpose programming language. It has simple syntax and…
Q: In the context of other server OSes, how does Ubuntu Server OS stack
A: Ubuntu Server is a popular Linux-based operating system that is widely used as a server platform.
Q: This program will store roster and rating information for a soccer team. Coaches rate players during…
A: Algorithm for the program: Create two empty lists, jersey_numbers and ratings, to store the…
Q: When given a network topology, it is important to be able to determine the number of subnets…
A: Subnetting of the network which refers to the one it is subnet, or subnetwork, is a segmented piece…
Q: 10. In binary search, in the part of the code where the Key is compared with Array/mid (e. statement…
A: As per Bartleby rules, we can answer only first 3 MCQ Question 10,11 and 12 are answered below with…
Q: You've decided to make a road trip across the country in a straight line. You have chosen the…
A: The source code of the program import java.util.Scanner;public class Main { public static void…
Q: How do I know that it is a rectangle?
A: According to the information given:- We have to define that Cartesian product will be a rectangle
Q: Research one web hosting company. Find the phone numbers for their tech support, billing, and sales…
A: Introduction: Web hosting is a service that allows individuals and organizations to make their…
Q: 1- When you use the Undo feature of Microsoft Word, what happens? Your answer: Document is…
A: As per the Bartleby policy, I can only answer 3 MCQ questions at a time. So please post the…
In the Java
Step by step
Solved in 4 steps with 2 images
- Write a program in Java that opens a 300x200 window with a grid of 3x4 buttons. The buttons have values from 1 to 12(random every time you run it). Clicking on any of the buttons changes the value of all other buttons to the value "1".Write a program that opens a window that contains a button. The button is labled with "0" (zero). With every click on the button, the number in its label increments by 1. In JavaWrite a program that opens a window that contains a button. The button is labled with "0" (zero). With every click on the button, the number in its label increments by 1.
- Write a Java or C++ program that will display the given menu:A Simple Library System1. Add a Student2. Add a Book3. Display All Students4. Display All Books5. Search a Student6. Search a Book7. Borrow a Book8. Display Borrowed Books9. Exit➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number, surname, first name, age, and sex)➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number, Title, Author’s name(Surname, first name), date of purchase, and status (available/not available))➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name, age, and sex)➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’s name(Surname, first name), date of purchase, and status (available/not available)➢ When 5 is chosen, ask the user if he wants to search the list by Surname or ID number. If record is found, display the corresponding record, else display an appropriate prompt.➢ When 6 is…Write a Java or C++ program that will display the given menu: A Simple Library System1. Add a Student2. Add a Book3. Display All Students4. Display All Books5. Search a Student6. Search a Book7. Borrow a Book8. Display Borrowed Books9. Return a Book (optional)10. Exit➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number,surname, first name, age, and sex)➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number,Title, Author’s name(Surname, first name), date of purchase, and status (available/notavailable))➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name,age, and sex)➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’sname(Surname, first name), date of purchase, and status (available/not available)➢ When 5 is chosen, ask the user if he wants to search the list by Surname or IDnumber. If record is found, display the corresponding record, else display…Write a Java or C++ program that will display the given menu: A Simple Library System1. Add a Student2. Add a Book3. Display All Students4. Display All Books5. Search a Student6. Search a Book7. Borrow a Book8. Display Borrowed Books9. Return a Book (optional)10. Exit➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number,surname, first name, age, and sex)➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number,Title, Author’s name(Surname, first name), date of purchase, and status (available/notavailable))➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name,age, and sex)➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’sname(Surname, first name), date of purchase, and status (available/not available)➢ When 5 is chosen, ask the user if he wants to search the list by Surname or IDnumber. If record is found, display the corresponding record, else display…
- Write a java program that displays a Café menu from which a user can place an order. The program begins by showing the menu and promoting the user to enter a choice. If the user enters 1, 2, 3, 4, or 5, the program responds by asking the quantity of order. If the user enters a number outside the range 1 -5, the program prints an error message, then ask the user to enter a new choice. The program “loops” until the user select 0 to exit the menu. Finally, the program displays a summary of the user’s order. Your program output should resemble the sample runs as following. Welcome to our Cafe! Please select Enter 1 for Americano - 4 $ Enter 2 for Cappuccino - 4.5 $ Enter 3 for Latte -4.75 $ Enter 4 for Mocha - 4.35$ Enter 5 for Tea - 3.50$ Enter 0 when you are done New Choice: 1 How many would you like ? Quantity: 2 New Choice: 2 How many would you like ? Quantity: 1 New Choice: 0 Proceeding to check-out. Your total is: 12.5 Thank you. Have a nice day. Welcome to our Cafe! Please…Write an application to pre-sell a limited number of cinema tickets. Each buyer can buy as many as 4 tickets. No more than 100 tickets can be sold. Implement a program called Ticket Seller that prompts the user for the desired number of tickets and then displays the number of remaining tickets. Repeat until all tickets have been sold, and then display the total number of buyers.Write a console application in visual basic programming that prints the next 20 leap years. A leap year is a year in which an extra day is added to the Gregorian calendar, which is used by most of the world. While an ordinary year has 365 days, a leap year has 366 days. ... A leap year comes once every four years. Because of this, a leap year can always be evenly divided by four.
- Using Java Task 1) Write a class, named Counter, that prints numbers 0 to 9 on a single line and skips to the next line. Task 2) Repeat that an indefinite number of times until the user sets a flag done as 'false'. Task 3) Run the Counter repeatedly until the user wants to set the flag as 'false'. Task 4) Develop a simple GUI with a STOP button that will stop the Counter class from printing the numbers indefinitely. In other words, you will automatically start the Counter class, and the STOP button will stop its execution. Task 5) Add a START button to your GUI that will start the Counter. STOP button will still pause the counter. You should be able to start the Counter again by pressing the START button. Task 6) Write a similar class Counter2 that will print numbers in the reverse order, 9 to 0, and skip to the next line. Run both counters on different threads, START and STOP buttons should control both of the counters together. Run your application, and observe how responsive are the…Create an application in Java that uses card layout with three cards. The first card - a login card - should have two text fields, one for username and other for password. There are two users - Bob and Fred - whose passwords are "mubby and "goolag" respectively. If Bob logs in, switch to a card - the bob card - that has a text field, a text area and two buttons. If the first button is pressed, get the text from the text field and append it to the text area. If the second button is pressed, return to the login card. If Fred logs in, switch to a card - the fred card - that has three buttons. If the first button is pressed, change the background color to green. If the second button is pressed, change the background color to red. If the third button is pressed, return to login card.In Java, create a user interface that has a top bar that includes a menu. The menu should have four items. When the user selects the first menu option, then the date and time should be printed in a text box. When the user selects the second menu option, then the text box contents should be written to a text file named "log.txt." When the user selects the third menu item then the frame background color changes to random color hue of the color green. The menu option should display the initial random hue each time selected for a single execution of the program. See https://www.w3schools.com/colors/colors_picker.asp When the user selects the fourth menu option then the program exits. Thank you