EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
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
Using C# and Windows Presentation Foundation (WPF), design and implement a standalone desktop time management application that fulfils the following requirements:
1. The user must be able to add multiple modules for the semester. The following data must be stored for each module:a. Code, for example, PROG6212b. Name, for example, Programming 2Bc. Number of credits, for example, 15d. Class hours per week, for example, 52. The user must be able to enter the number of weeks in the semester.3. The user must be able to enter a start date for the first week of the semester.4. The software shall display a list of the modules with the number of hours of self-study that is required for each module per week.
The number shall be calculated as follows:
self-study hours per week=number of credits × 10/number of weeks − class hours per week
5. The user must be able to record the number of hours that they spend working on a specific module on a certain date.6. The software shall display how many…
The following problem is based on a problem in a number of Java texts, including Gaddiss':
Write a Temperature class that will hold a temperature in Fahrenheit and provides
methods to get and display the temperature in Fahrenheit, Celsius, and Kelvin.
The Temperature class should have the following instance variable:
ftemp - A double that holds a Fahrenheit temperature.
The Temperature class should have the following methods:
ReadInput - Uses a Scanner method to populate ftemp with double value.
getFahrenheit - Returns the value of the ftemp field, as a Fahrenheit temperature.
getCelsius - Returns the value of the ftemp field converted to Celsius.
getKelvin - Returns the value of the ftemp field converted to Kelvin.
DisplayOutput - The Fahrenheit temperature and the equivalent values in Celsius and
Kelvin are gotten and displayed, one per line, and each along with an
appropriate message.
Use the following formula to convert the Fahrenheit temperature to Celsius:
Celsius = 5.0/9.0 *…
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
- 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 screenarrow_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_forwardUsing C# and Windows Presentation Foundation (WPF), design and implement a standalonedesktop time management application that fulfils the following requirements:1. The user must be able to add multiple modules for the semester. The following data mustbe stored for each module:a. Code, for example, PROG6212b. Name, for example, Programming 2Bc. Number of credits, for example, 15d. Class hours per week, for example, 52. The user must be able to enter the number of weeks in the semester.3. The user must be able to enter a start date for the first week of the semester The software shall display a list of the modules with the number of hours of self‐study thatis required for each module per week. The number shall be calculated as follows:self-study hours per week?number of credits ? 10number of weeks? class hours per week5. The user must be able to record the number of hours they spend working on a specificmodule on a certain date.6. The software shall display how many hours of self‐study…arrow_forward
- 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. housekeeperarrow_forwardYou can divide the code for an application into logical parts by moving some of the code from the main() method to other ____________________.arrow_forwardUsing C# and Windows Presentation Foundation (WPF), design and implement a standalonedesktop time management application that fulfils the following requirements:1. The user must be able to add multiple modules for the semester. The following data mustbe stored for each module:a. Code, for example, PROG6212b. Name, for example, Programming 2Bc. Number of credits, for example, 15d. Class hours per week, for example, 52. The user must be able to enter the number of weeks in the semester.3. The user must be able to enter a start date for the first week of the semester 4. The software shall display a list of the modules with the number of hours of self‐study thatis required for each module per week. The number shall be calculated as follows:self-study hours per weekൌ number of credits ൈ 10number of weeks െ class hours per week5. The user must be able to record the number of hours they spend working on a specificmodule on a certain date.6. The software shall display how many hours of…arrow_forward
- Problem #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_forwardCreate an application that lets you enter a new customer or a new employee. ConsoleWelcome to the Person ManagerCreate customer or employee? (c/e):Error! This entry is required. Try again.Create customer or employee? (c/e): pError! Entry must be 'c' or 'e'. Try again.Create customer or employee? (c/e): cFirst name: SteveLast name: TrevorCustomer number: M10293You entered a new Customer:Name: Steve TrevorCustomer Number: M10293Continue? (y/n): yCreate customer or employee? (c/e): eFirst name: DianaLast name: PrinceSSN: 111-22-3333You entered a new Employee:Name: Diana PrinceSSN: xxx-xx-3333Continue? (y/n): OKError! Entry must be 'y' or 'n'. Try again.Continue? (y/n): n SpecificationsCreate a class named Person with these constructors and methods: public Person(String first, String last)public String getFirstName()public void setFirstName(String first)public String getLastName()public void setLastName()The Person class should override the toString() method so it returns the first name…arrow_forwardMake a simple application in c# windows forms Using the system calls, you must display on the screen: *Operating system name*OS version*host name*Operating system date *** Remember, you must get the information from the Windows OS using C# code, NO put manually the informationarrow_forward
- The 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_forward__________ is used to set up repeating events at a regular time. setTime() setTimeout() setInterval() setPeriod()arrow_forwardJAVA PROGRAMMING Write a Java program that allows the user to open, edit, and save a text file. For this design a GUI having a text area and a menu on top with name File. The File menu should have three options including, Open, Save, and Exit. On choosing the Open option, the program allows to the user to browse through his computer to select a text file. The selected text file shall be opened in the text area. Then user can make required changes in the file and then on selecting Save option from File menu, the program shall write the contents back to the original file.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT