New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
Chapter 9, Problem 9CP1
Program Plan Intro
To Create a variable named thisMonthusing the getMonth() method to extract the month number from the thisTime variable.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Q3:Create a series called 'directors' that contains each director's name and his or her average rating. Print out the type of your variable.
In the langauage R:
Which of the following statements is NOT correct about themes in R?
Select one:
Once set, a theme applies to all subsequent plots and remains active until it is replaced by a different theme
The theme_set() function takes the name of a theme as an argument
If we want to change the overall look of the figure all at once, we can use ggplot’s theme engine
The theme_minimal() function can make ggplot output look like it has been featured in the Wall Street Journal
This is the question I am stuck on -
Add a prompt to the ShadyRestRoom application to ask the user to specify a (1) lake view or a (2) park view, but ask only if the bed size entry is valid. Add $15 to the price of any room with a lake view. If the view value is invalid, display a you selected an invalid option and assume that the price is for a room with a lake view.
This is the code I have from the previous probelm but I am unsure how to add all that onto it -
import java.util.Scanner;
public class ShadyRestRoom2
{
// Modify the code below
public static void main (String args[])
{
int selection;
int price;
String result;
final int QUEEN = 1, KING = 2, SUITE = 3;
final int QPRICE = 125, KPRICE = 139,
SPRICE = 165;
final String QSTRING = "Queen bed", KSTRING = "King bed",
SSTRING = "Suite with a king bed and pull-out couch",
INVALIDSTRING = "an invalid option";
Scanner in = new Scanner(System.in);…
Chapter 9 Solutions
New Perspectives on HTML5, CSS3, and JavaScript
Ch. 9.1 - Prob. 2QCCh. 9.1 - What is the difference between asynchronously...Ch. 9.1 - Provide the command to display an alert dialog box...Ch. 9.1 - Prob. 8QCCh. 9.2 - Prob. 6QCCh. 9 - Prob. 2RACh. 9 - Prob. 4RACh. 9 - Prob. 5RACh. 9 - Prob. 6RACh. 9 - Prob. 7RA
Ch. 9 - Prob. 8RACh. 9 - Prob. 9RACh. 9 - Prob. 10RACh. 9 - Prob. 11RACh. 9 - Prob. 1CP1Ch. 9 - Prob. 2CP1Ch. 9 - Prob. 3CP1Ch. 9 - Prob. 4CP1Ch. 9 - Prob. 5CP1Ch. 9 - Prob. 6CP1Ch. 9 - Prob. 7CP1Ch. 9 - Prob. 8CP1Ch. 9 - Prob. 9CP1Ch. 9 - Prob. 10CP1Ch. 9 - Prob. 11CP1Ch. 9 - Prob. 12CP1Ch. 9 - Prob. 13CP1Ch. 9 - Prob. 14CP1Ch. 9 - Prob. 15CP1Ch. 9 - Prob. 16CP1Ch. 9 - Prob. 1CP2Ch. 9 - Prob. 2CP2Ch. 9 - Prob. 3CP2Ch. 9 - Prob. 4CP2Ch. 9 - Prob. 5CP2Ch. 9 - Prob. 6CP2Ch. 9 - Prob. 7CP2Ch. 9 - Prob. 8CP2Ch. 9 - Prob. 9CP2Ch. 9 - Prob. 10CP2Ch. 9 - Prob. 11CP2Ch. 9 - Prob. 12CP2Ch. 9 - Prob. 13CP2Ch. 9 - Return to the bc_today.js file and change the...Ch. 9 - Prob. 15CP2Ch. 9 - Prob. 1CP3Ch. 9 - Prob. 2CP3Ch. 9 - Prob. 3CP3Ch. 9 - Prob. 4CP3Ch. 9 - Prob. 5CP3Ch. 9 - Above the randomlnt() function insert a command to...Ch. 9 - Prob. 7CP3Ch. 9 - Prob. 8CP3Ch. 9 - Prob. 9CP3Ch. 9 - Prob. 10CP3Ch. 9 - Prob. 2CP4Ch. 9 - Prob. 3CP4Ch. 9 - Prob. 4CP4Ch. 9 - Prob. 5CP4Ch. 9 - Prob. 6CP4Ch. 9 - Prob. 7CP4Ch. 9 - Prob. 8CP4Ch. 9 - Explore 9. Scroll back to the top of the file and,...Ch. 9 - Prob. 10CP4Ch. 9 - Prob. 13CP4
Knowledge Booster
Similar questions
- . The O’Neill High School Performing Arts Center auditorium contains 20 rows (numbered 1through 20) with 40 seats each (numbered 1 through 40). Write an application that allows auser to continuously enter a row and seat request until a sentinel value is entered. If the rowor seat number is too high, issue an error message. Otherwise, determine whether the seat hasalready been reserved. If so, display an error message; if not, then charge the user $7.50 for aticket and display a running total of the user’s purchase. When the user enters a sentinel,display the number of seats taken and the number still available in the auditorium.arrow_forwardWhich of the following is false according to the code below? When the user submits the form setCity(String city) method runs O If the user selects the first option, the "city" variable is assigned to "City- İstanbul" O "city" variable keeps the user's choice O The user sees the second element of the dropdownlist as "City - Ankara"arrow_forwardCreate a GUI application named OddNumsGUI displays all the odd numbers from 1 through 99 when the user clicks a button. You table of numbers should look like the sample output below (10 columns /5 rows).arrow_forward
- Extra 6-1 Develop the Temperature Converter In this exercise, you’ll use radio buttons to determine whether the conversion is from Fahrenheit to Celsius or vice versa. You’ll also modify the DOM so the labels change when a radio button is clicked, and the page displays an error message when the user enters invalid data. 1. Open the application in this folder: exercises_extrach06convert_temps 2. Note that the JavaScript file has some starting JavaScript code, including the $() function, three helper functions, three event handler functions, and a DOMContentLoaded event handler that attaches the three event handlers. 3. Review how the toCelsius() and toFarhenheit() event handler functions call the toggleDisplay() helper function and pass it strings to display. Also note that the toggleDisplay() helper function and the convertTemp() event handler function are incomplete. 4. Code the toggleDisplay() function so it changes the text in the labels for the text boxes to the values in the…arrow_forwardWhich delimiter will be selected to change the text 'Happy#go#lucky' in to column? a. tab b. semicolon c. other d. spacearrow_forwardCreate a menu-driven application to keep track of a list of subscribers to a newsletter.The application should allow the user to add a new subscriber, remove a current subscriber, update a subscriber’s data, and display the current list of subscribers. Each subscriber should be identified by a unique ID assigned by the system.For each subscriber, you need to store first name, last name, and email address.The application must have:• A linked list as the main data structure in the application. You must use the C++ Standard Template Library (STL).• A “subscriber” class that contains data and methods related to each subscriber.arrow_forward
- switch_player(): we will allow the players to choose their own names, but for our purposes, it is easier to think of them as number (0 and 1, for indexing purposes). We will display their names to them on the screen, but in the background, we will keep track of them based on their number. This function should take 1 argument, an integer (either 0 or 1) representing the player and should return the opposite integer (1 if 0 is entered and 0 if 1 is entered). This is a simple function, but it will make our code cleaner later. Use your constants! Using Thonnyarrow_forwardWhen you use "lstMealPlans.SelectedIndex" where is that name given too? Im using the code and I keep getting that lstMealPlans.SelectedIndex is not declared.arrow_forwardWhich of the following changes the contents of the strCityState variable from“Chicago IL” to “Chicago, IL”?a. strCityState = strCityState.Insert(7, ",")b. strCityState = strCityState.Insert(8, ",")c. strCityState = strCityState.Insert(9, ",")d. none of the abovearrow_forward
- Create R code to verify all factorial scenarios.arrow_forward// write code to make the prompt field editable when the edit button is clicked (notice the input elements are set to read only at the moment) value="EDIT PROFILE" title="Edit" type="button" style="float: right;"> First Name: Last Name: Institution: Street: Apt: City: State: Zip Code: Age: Phone number: Email: Password:arrow_forwardyou have the listView and its inserted items,,, write in the box only the output without any other text (only the sum value) do not write "the output is " or "sum=" just number after press Button1 (executing the following code) %3D the listView name-->listView1 ColumnHea... ColumnH... Column... alio -2 ali3 6. ali6 14 5 ali9 22 ali12 ali15 30 38 For i = 2 To 3 Dim x As New ListViewItem(i) x. SubItems. Add(i• 5) x. SubItems.. ListViewl.Items.Add(x) Next •5/ 3)) Button1 Dim sum As Integer For i = 5 To ListViewl.Items.Count - 1 sum += Val(ListView1.Items(i). SubItems(0).Text) + Val(ListView1.Items(i).SubItems(2).Text) Next MsgBox(sum) Enter your answerarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning