Java Programming (MindTap Course List)
9th Edition
ISBN: 9781337397070
Author: Joyce Farrell
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 12, Problem 4RQ
Program Description Answer
The method System.exit()will end the current application and returns control to the
Hence, the correct answer is option “A”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Part 1
Making Your First Program, Compiling It, and Running It
Exercise 1: Log in to your system in accordance with your professor's instructions.
Bring in the firstprog.cpp program from the Lab 1 folder for Exercise 2.
Exercise 3: Put the program together.
Exercise 4: Run the application and record what appears on the screen.
The code of firstprog.cpp is as follows:
// This is the first program that just writes out a simple message// Place your name here#include <iostream> // needed to perform C++ I/Ousing namespace std;int main (){cout << "Now is the time for all good men" << endl;cout << "To come to the aid of their party" << endl;return 0;}
don't use Ai
Which of the following is not a design principle that allow the user to maintain control?
A. provide for flexible interaction
B. allow user interaction to be interrupt-able and undo-able
C. show technical internals from the casual user
D. design for direct interaction with objects that appear on the screen
If a class has this method, it is called automatically just before an instance of the class is destroyed by the Java Virtual Machine.a. finalizeb. destroyc. removed. housekeeper
Chapter 12 Solutions
Java Programming (MindTap Course List)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- API Windows. Creating processes. In the C language, in terms of the Windows API, develop a program that performs the following actions: 1. creates a new process using the CreateProcess function 2. is waiting for this process to complete 3. displays "Bye" 4. shuts down. In the process created by the program, include a wait of 5 seconds and then the output "Hello!".arrow_forwardYou can divide the code for an application into logical parts by moving some of the code from the main() method to other ____________________.arrow_forwardProblem #1: How much should I study outside of class? Issue: Your fellow students liked the previous version of study hour’s application and want to expand it again by adding the features listed below. Minimum Study Hours per Week per Class Grade15 A12 B9 C6 D0 F Project Specifications: The program asks the user their name, employee id, and department. The program also asks the user who they are creating the report for, their employee id, and the department they work in. (hint #1 & 2 are instances of a class – A class must be created and used within the program)The menu driven program has the following options:Determine Hours to StudyDetermine Grade Display Averages and TotalsQuit The user can select any menu option in any order they want. For example:The user can start the program run option A, then option C, then option B, then option D. They restart the program, run option C, then D. They restart the program, run option A, then D. They restart…arrow_forward
- __________ is used to set up repeating events at a regular time. setTime() setTimeout() setInterval() setPeriod()arrow_forwardThe program will consist of one file - the main application class Name the class appropriately and name the file Program.cs (the default when you create the application) Include documentation at the top of the file that includes Your name Date of development Assignment (e.g., CIS214 Performance Assessment - User Entry of Age) Description of the class The main application class must meet the following requirements Print a line that states "Your Name - Week 4 PA User Entry of Age" Ask the user to enter their age If the age is between 1 and 100 print a message stating the age the user entered exit the program If the age is less than 1 or greater than 100 generate an ArgumentOutOfRangeException print the exception information print an error message If the value is not an integer handle the FormatException print the exception information print an error message Continue asking the user to enter their age until a valid age is enteredarrow_forwardPlease code in JAVA and follow the instructions as it is and dont use very advanced methods.. keep it basic Create a menu driven bank account application that supports the following operations:Deposit moneyWithdrawCheck balanceCreate new accountExample of the console:1. Deposit money2. Withdraw money3. Check balance4. Create new accountYour choice, 0 to quit:1. Create BankAccount Object that will be used to hold account number, first name, last name, and initial balance. Bank account numbers will be numeric and should be assigned by your program.2. Since we don't have a database to use you will add accounts at runtime and process different transactions (deposit, withdraw, check balance) with them before ending the program (option 0 to quit). 3. If you select option 1 or 2 you need to ask for account number and amount. Then after processing display on the console the Account Number and current balance.4. If option 3 is selected you need to ask for the account number and after processing…arrow_forward
- Failures to assert Launch the DebuggerThe Issue: A failed assert often produces a message and terminates the application. This is not very helpful for locating issues. It would be more preferable if a failing assert could launch the debugger.arrow_forwardWrite this code in C# language: Scenario: A dog shelter would like a simple system to keep track of all the dogs that pass through their facility. You are required to make a command line-based dog shelter management application. Your application must allow a user to add, edit, search and view Contacts. The program must have a menu consisting of the following six (6) options: Add dog View all dogs View all available dogs View specific dog Update dog home status Exit Brief descriptions of each option in the menu Menu Item Description Add Dog 1) Asks the user for all the state value information for a dog. 2) Checks if there is space in the array to hold the new dog. 3) Check that the dogId is not already used in the system. 4) Creates a new Dog object and adds it to the array if there is space. If the array is full, print “Sorry… the Shelter is Full!”. Note: All new dogs have no home as yet (foundHome = false). View all dogs This menu option shows all…arrow_forwardBelow are some common error messages expressed in harsh computer jargon that can be quite threatening and offensive. Rewrite them in more usable, useful, and friendly language that would help users to understand the cause of the problem and how to fix it. For each message, imagine a specific context where such a problem might occur. SYNTAX ERROR INVALID FILENAME INVALID DATA APPLICATION ZETA HAS UNEXPECTEDLY QUIT DUE TO A TYPE 4 ERROR,DRIVE ERROR: ABORT, RETRY OR FAILarrow_forward
- IN JAVA PLEASE REST OF THE SAMPLE RUN: --------------------------------------------------- Main Menu 1 : Student Management 2 : Course Management 0 : Exit Enter your selection: 1 ----------------- Student Management Menu: Choose one of: A - Search add a student B - Delete a Student C – Print Fee Invoice D – Print List of Students X – Back to Main Menu Enter your selection: D PhD Students ------------ - Zydoun BenSellam - Erica Belksiri MS Students ------------ - Caleb Sidi Kacem - Erika Jones - Walid Wali Undergraduate Students ------------ - Ed Johnson - Willian Jones - Kirby Sons Student Management Menu: Choose one of: A - Search add a student B - Delete a Student C – Print Fee Invoice D – Print List of Students X – Back to Main Menu Enter your selection: A Enter Student’s ID: ew44-yye Invalid id format or ID already exists Try again later! Student Management Menu: Choose one of: A - Search add a student B - Delete a Student C – Print Fee Invoice D – Print List of Students X – Back…arrow_forwardMake a Movie Database program Project Specifications Background This application must be able to handle creating new entries in a proprietary database as well as returning searches for items in the current database. You MUST implement the following: Start the program by displaying the title of your program (you come up with a name) Have a primary prompt that allows you to enter commands (e.g. “Enter command >” ) Interpret primary commands and move to secondary states based on the commands entered. Commands you must support at the primary prompt are: a.) new entry b.) search by actor c.) search by year d.) search by runtime (in minutes) e.) search by director f.) search by title g.) quit Your secondary states must do the following: For “new entry” → Prompts to do the following: Enter title > Enter year >…arrow_forwardwhat more ideas can be added here about errand assistance service applicationarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning