a- one word b- a line of text 3) The Scanner class .nextLine() method will read: c- a character d- an integer e- None of the above
Q: (Check password) Some websites impose certain rules for passwords. Write a method that checks…
A: Given question has asked to write a program that prompts the user to enter a password and displays…
Q: Create a class whose main() holds two integer variables. Assign values to the variables. Create two…
A: Step 1 : Start Step 2 : Define a method main() and declare two integer variables a and b in it. Step…
Q: 2. Temp conversion This program, prompts the user to enter either an 'F' for Fahrenheit or 'C' for…
A: Java is a high-level programming language promoted by Sun Microsystems. Alternatively, Java programs…
Q: A length of at least 8 characters • At least 1 uppercase letter At least 2 numbers • At least 1…
A: Step-1: StartStep-2: Declare variable upper, num, ch, containSpecial and passwordStep-3: Start a…
Q: getHour: Returns the hour in military format. getStandHr: Returns the hour in standard format.…
A: //#include "stdafx"//#include <Time> //header file that contains the Time class file#include…
Q: Cookie Box **Please add comments and instructions throughout the code to help me understand better…
A: Answer :
Q: Create a sample program that uses fype conversion and scanner class. Create a PHOTO ESSAY that shows…
A: ANSWER:
Q: Instructions AdmissionModulariz.. 1 using System; 2 using static System.Console; 3 class Admission…
A: Actually, given information you wrote a program named Admission for a college admissions office in…
Q: 10. Inside class StaticMethods, create the static method menu that displays a menu for the user to…
A: logic: - use while(true) to repeat loop until return or break is not encountered. read a single…
Q: Write a Java application that can perform the above expression. Create a method that takes two…
A: java code for expression evaluation: Code: import java.util.*; public class…
Q: Note: Help me debug and complete code The program should do the following: Show the customer the…
A: Program: Programs contain a set of lines of code, where the instructions are given through these…
Q: symbol: variable circleArea location: class Geometry Geometry.java:114: error: cannot find symbol…
A: Below is the code :-
Q: Instructions Songlyrics.java 1 class Songlyrics { public static void main(string[] args) { // write…
A: Given The answer is given below.
Q: I CANT GET IT RIGHT Create a class named Purchase. Each Purchase contains an invoice number,…
A: set() method is used to set values of instance variables. set method takes values from main call.…
Q: create book class. use static variable : numberofbooks
A: I give the code in Java as per the requirement along with output and code screenshot
Q: This program assigns values to two variables // and performs mathematical operations with them
A: Errors 1. System.out.println("adding " + x + y); The above statement concatenates the value of x and…
Q: Overview In this task, you should try using the Scanner class to read data from the keyboard. This…
A: I give the code in Java as per your requirement along with output and code screenshot
Q: Please code in python Use Object oriented programming Write a method names "letterFinder" that gets…
A: NOTE Below is the answer for the given question. Hope you understand it well. If you have any…
Q: 2. Complete the application below. public class CarApp { public static void main() { string color =…
A: Create an object by specifying the variables color, model and speed and sets values and then updates…
Q: uter-Assisted Instruction) The use of computers in education is referred to as computer-assisted…
A: I have given the code in C# below.
Q: object is used to read data from the keyboard.
A: We can use the scanner class to read text data from the keyboard. However, Reading text…
Q: Apply (Methods switch statement, input validation, printf). Write a java program ( user either the…
A: START DECLARE amountInDollars, choice DO Print the menu to select a currency to conver to Input…
Q: 3. Rectangle Area–Complete the Program If you have downloaded the book's source code from…
A: Formula to calculate the AREA OF RECTANGLE = Length * Width We use Scanner class to take input from…
Q: Write, compile, and test a class that displays the first few lines of the lyrics of your favorite…
A: PROGRAM: File Name: favoritesong.java //Defining the class class favoritesong { //Defining the…
Q: The Scanner class .next() method will read
A: 1) The Scanner class .next() method will read:
Q: Fix all the errors and send the code please // Application looks up home price // for different…
A: After removing error, the resulting Java codes are: import java.util.*;public class DebugEight3{…
Q: This is the code that needs to be corrected: // This application gets a user's name and displays a…
A: Here's your code :- // This application gets a user's name and displays a greetingimport…
Q: (Find the highest score) Write a program that prompts the user to enter the number of students and…
A: Use one array to store the name and one array to store the scores
Q: Please create a flowchart for the following program: // Import Scanner class import…
A: The flow chart for the given program is as follows.
Q: Re-type the code and fix any errors. The code should convert non-positive numbers to 1. if (userNum…
A: Hey, since multiple questions posted, we will answer first question according to our policy. If you…
Q: Instructions MovieQuotelnfojava 1 class MovieQuoteInfo { public static void main(String[] args) { //…
A: Here, I have to provide a java solution to the above question.
Q: static void RoomVolume(O { Scanner scan = new Scanner (System.in); System.out.println("Your room…
A: Start define function RoomVolume() in this input length , breadth and height print volume call…
Q: 1. If you attempt to add an int, a byte, a long, and a double, the result will be a value. 2.…
A: correct answers for both the questions with explanation given below
Q: Rest of code in image / This is a bad programming style since it is using goto. // This is an…
A: The ask is to make the given program menu-driven with the different functions and errors resolved.
Q: PYTHON GUI - Tkinker) Write a Python program GUI that reads the following information from user,…
A: user = strend = "0"hours = round(40,2)print("One Stop Shop Payroll Calculator")while user != end:…
Q: java finding Distance Between Points Write method distance used to calculate the distance between…
A: Logic:- input 4 points and pass it a method distance of return type double. Use formula sqrt(…
Q: 5. Draw Olympic Rings. O (a) Write a Java program that displays the 5 rings of different colors as…
A: The answer is given below, the code implementation is done in Java programming language and the text…
Q: Create a method that randomly select a letter in the alphabet. java
A: Please find the answer below :
Q: PROBLEM STATEMENT: Return a number, 1 lesser than the given number. public class Decrement{…
A: Here I have created a function named solution (). This function has one input parameter. Inside this…
Q: Write a class that uses the command window that displays Programs comments are nonexecuting…
A: The class program to display the given statement is class print{ public print() {} public…
Q: Test Average and Grade rite a program that asks the user to enter five test scores. The program…
A: Define java.util.Scanner for taking inputs. Define main class. Define main function. Define int…
Q: - Name the demo file firstname_lastname_PE2 Create a program that simulates a dumpster diving game.…
A: Java program to implement die class and create a method to roll a 10 sided die and other method to…
Q: public class DiscountPrice public static void main(String[] args) { // Step 3: Create a Scanner…
A: import java.util.Scanner; public class DiscountPrice { public static void main(String[] args) {…
Q: Graphics / Fonts on digits, characters etc. 1. Generate graphics of digits 0, 1, 2, 3, .., until 8,…
A: “Since you have posted a question with multiple sub-parts, we will solve first three subparts for…
Q: Create a class whose main() holds two integer variables. Assign values to the variables. Create two…
A: As per our company guidelines we are supposed to answer only one question per post and kindly…
Q: Directions This exercise will provide you with the opportunity to utilize NetBeans to create an…
A: Algorithm: Start Create NumberFormat objects for the locale US to represent currency $ where one…
Q: 5.8 (FIND THE HIGHEST SCORE) Write a program that prompts the user to enter the number of students…
A: According to the information given:- We have to write a java program to find the highest score.
Q: 1. A method named isANumber that takes a character and returns true if the character is a number…
A: Note: Answering the first question as per the guidelines. Input : Input the character Output :…
Q: Need this to be debugged // Application looks up home price // for different floor plans // allows…
A: import java.util.*;public class MyClass{public static void main(String[] args){Scanner input = new…
Q: Create a class named Movie that holds a movie name and rating; Provide methods to get and set both…
A: The program is written in Java using object oriented approach. The data members are private whereas…
Step by step
Solved in 2 steps
- c++ Please You are given a Rectangle class that produces a string which, when printed, displays a rectangle with a fancy border. The interior of the rectangle contains spaces. Write a derived class BoxedText whose to_string method replaces the spaces with a given text. Complete the following files:OOP1 - Objects, Classes, and Encapsulation Create a program that has the following method and corresponding usage. 1. AreaCircle - compute the area of the circleVariables name: Choose meaningful and descriptive names. No x, y … etc. Use lowercase. If the name consists of several words, concatenate all in one, uselowercase for the first word, and capitalize the first letter of each subsequent word inthe name. For example, the variables radius and area, and the method computeArea.3. File type: only JAVA file is allowed. Name it as Assignment2. Java5. Please add the appropriate comments for each step you add. In the top of the program, addyour name, time of starting writing the code and title of the assignment. Extra informationwould be great
- Question is in the image #include <iostream> using namespace std; class Game { public: Game() { cout <<"Game Started"<<endl; } //destructor goes here }; class Quiz: public Game { public: Quiz() { cout <<"Quiz Started"<<endl; } //destructor goes here }; int main() { Quiz q; }Rest of code in image / This is a bad programming style since it is using goto. // This is an spagetti code and not working.// Use function to display menu, and display game rules,// Use different color for text display.// fix it so it works any way you like./*HANDLE screen = GetStdHandle(STD_OUTPUT_HANDLE); // Write 16 lines in 16 different colors. for (int color = 0; color < 16; color++) { SetConsoleTextAttribute (screen, color); cout << " Hello World!" << endl; Sleep(400); // Pause between lines to watch them appear } // Restore the normal text color) SetConsoleTextAttribute(screen, 7);*/#include <iostream>#include <windows.h>using namespace std;int main(){ //textbackground(WHITE); //textcolor(RED); system("cls"); char ch, a[20], ch2; int num = 100, rnum, guess, count, ch1, c = 0; cout << "**********************************************************"<<endl; cout << "*…Need this to be debugged // Application looks up home price// for different floor plans// allows upper or lowercase data entryimport java.util.*;public class DebugEight3{public static void main(String[] args){ Scanner input = new Scanner(System.in);String entry;char[] floorPlans = {'A','B','C','a','b','c'}int[] pricesInThousands = {145, 190, 235};char plan;int x, fp = 99;String prompt = "Please select a floor plan\n" +"Our floorPlanss are:\n" + "A - Augusta, a ranch\n" +"B - Brittany, a split level\n" +"C - Colonial, a two-story\n" +"Enter floorPlans letter";System.out.println(prompt);entry = input.next();plan = entry.charAt(1);for(x = 0; x < floorPlans.length; ++x)if(plan == floorPlans[x])x = fp;if(fp = 99)System.out.println("Invalid floor plan code entered"));else{if(fp >= 3)fp = fp - 3;System.out.println("Model " +plan + " is priced at only $" +pricesInThousends[fp] + ",000");}}}
- Project Name: ActivitiesClass name: Dollar_Conversion Write a Java program that will accept theamount of US Dollar and convert to PhilippinePeso. The current exchange rate is 1 dollar is to 49.75pesos. Convert 50 dollars to peso. Display the converted value using three (3)decimal places. Using blueJ#include <string>#include <iostream>#include <stdlib.h> #include <stdio.h>#include <iomanip> using namespace std; //################################################################################################# class Dice{ private: int value; public: //Randomly assigns a value between from 1 to 6 to the dice. void roll(){ value = rand() % 6 + 1; } int reveal() {return value;} void setValue(int value) {this->value = value;} }; //################################################################################################# const int HAND_SIZE = 5; class Hand { public: Dice dices[HAND_SIZE]; //Display the value of the five dice void show(){ for(int i = 0; i < HAND_SIZE; i++){ cout << dices[i].reveal() << " "; } cout << endl; } void play(){ for(int i = 0; i < HAND_SIZE; i++){ dices[i].roll(); } } Dice* getDice(int diceNum){…Hello I am struggling in some code can you help me. #include <string>#include <iostream>#include <stdlib.h> #include <stdio.h>#include <iomanip> using namespace std; //################################################################################################# class Dice{ private: int value; public: //Randomly assigns a value between from 1 to 6 to the dice. void roll(){ value = rand() % 6 + 1; } int reveal() {return value;} void setValue(int value) {this->value = value;} }; //################################################################################################# const int HAND_SIZE = 5; class Hand { public: Dice dices[HAND_SIZE]; //Display the value of the five dice void show(){ for(int i = 0; i < HAND_SIZE; i++){ cout << dices[i].reveal() << " "; } cout << endl; } void play(){ for(int i = 0; i < HAND_SIZE; i++){ dices[i].roll(); }…
- Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is correct. Each question has one correct answer. Thank you. Part 1 - 9. Given the following code, the output is the date and time of __.Calendar cal = Calendar.getInstance(); TimeZone tz = TimeZone.getTimeZone("Europe/Rome");TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles");TimeZone tz = TimeZone.getTimeZone("Asia/Istanbul");System.out.println(cal.getTime()); A. the "Europe/Rome" time zone.B. the time zone is computer is currently set to use.C. the "America/Los_Angeles" time zone.D. the "Asia/Istanbul" time zone.E. All of the three listed time zones. Part 2 - 10. Given the following code, the output is the date and time of __. Calendar cal = Calendar.getInstance();TimeZone tz = TimeZone.getTimeZone("Europe/Rome");cal.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));TimeZone tz = TimeZone.getTimeZone("Asia/Istanbul");System.out.println(cal.getTime()); A. the "Europe/Rome"…nstructions The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. An example of the program is shown below: Enter the amount of your check >> 12.99 Enter the amount of your friend's check >> 9.50 The tip should be at least $1.9485 The tip should be at least $1.425 Task 1: The DebugThree1 class compiles without error. Task 2: The calcTip() method calculates a 15% gratuity. Task 3: The DebugThree1 program accepts user input and displays the correct output.Java Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is correct. Each question has one correct answer. Thank you. Part 1 - 5. Given the following code, the date is set to be __. Calendar cal = Calendar.getInstance();cal.set(2059, 0, 1, 2, 2, 1); A. Feb 1, 2059B. Mar 2, 2059C. Jan 1, 2059D. Feb 2, 2059E. Jan 2, 2059 Part 2 - 6. Given the following code, what is the output if the current time is 14:55:32? Calendar cal = Calendar.getInstance();System.out.println(get(Calendar.AM_PM)); A. AMB. PMC. 0D. 1E. Calendar.AM