Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. What does a variable declaration (e.g., int value) tell the Java compiler about a variable? Q2. Briefly describe the difference between variable assignment and

image text in transcribed
image text in transcribed
image text in transcribed
Q1. What does a variable declaration (e.g., int value) tell the Java compiler about a variable? Q2. Briefly describe the difference between variable assignment and variable initialization. Q3. Consider the following message. String message "Have a nice day"; What will the following code output? System.out.println(message.charAt(5)); System.out.println(message.toUpperCase0) System.out.println(message); Q4. Write a program that calculates the current balance in a savings account. It must ask the user for the following inputs. The starting balance The total dollar amount of deposits made The total dollar amount of withdrawals made The monthly interest rate Calculate the current balance of the account based on deposit and withdrawal amounts and add the interest eamed for that month. Once the program calculates the current balance, display the result on the screen using a dialog box. a) b) c) Write the pseudocode for the program. Write the source code for the program. After compiling and running your program, briefly discuss the steps involved in executing the program using Java IDE or JDK. Q5. Write a program to troubleshoot a bad Wi-Fi connection. Have a look at the following simplified flowchart for troubleshooting a bad Wi-Fi connection and create a program th person through the steps of fixing a bad Wi-Fi connection. (Hint: Decision tree - Nested ifs) at leads a Reboot the computer and try to connect No x the Reboot the router and try to connect Did that for the problem? No Yes Make sure the cables between the router& modem Did that tx the No yes Move the router to a new location and try to connect Did that fx the No Get a new router See the examples for output as follows: Example 1: Reboot the computer and try to connect Did that fix the problem? no lEnter Reboot the router and try to connect. Did that fix the problem? yes [Enter Example 2: Reboot the computer and try to connect Did that fix the problem no [Enter] Reboot the router and try to connect. Did that fix the problem? no [Enterl Make sure the cables between the router modem are plugged in firmly Did that fix the problem? no [Enter] Move the router to a new location. Did that fix the problem? no lEnter Get a new router

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions