Write an application named Perfect that displays every perfect number from 1 through 10,00O. A number is perfect if it equals the sum of all the smaller positive integers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it and their sum is 6.
Q: Write an application that reads the (x,y) coordinates for two points. This should prompt for and…
A: C++ program to print distance between two points #include <bits/stdc++.h>using namespace std;…
Q: This assigment wants me to: Assume that a gallon of paint covers about 350 square feet of wall…
A: A required program is as follows, import java.util.Scanner; public class PaintCalculator {…
Q: Also, workers in skill level 3 can elect to participate in the retirement plan at 3% of their gross…
A: Note: Comments mentioned in the code for understandability. In the implementation: If skill level…
Q: Magic Dates The date June 10, 1960, is special because when it is written in the following format,…
A: Program Plan: Input month, day, and year from the user. Determine whether the month times the day…
Q: You can divide the code for an application into logical parts by moving some of the code from the…
A: In Programming writing all the code inside main() method is not recommended. When ever possible we…
Q: In physics, an object that is in motion is said to have kinetic energy. The following formula can be…
A: Program: #include <iostream>using namespace std;double kineticEnergy(double mass, double…
Q: Microsoft Visual C#, 7th edition. chapter 11, Programming exercise 11-3 Instructions: Write the…
A: Algorithm: Start Read a number If number is greater than or equal to 0, print Math.sqrt(number)…
Q: Evaluate every numbered line of statements. In the textbox provided, type VALID if the statement is…
A: 1. VALID Statement1 is defining an interface named Drawable with 2 methods Numside() and draw() 2.…
Q: Complete the AscendingAndDescending application so that it asks a user to enter three integers.…
A: import java.util.Scanner; public class AscendingAndDescending { public static void main(String[]…
Q: QUESTION3. The program will ask the user to enter the width and length of a rectangle, and then…
A: Given:
Q: Write a Python program (Console and GUI) that prompts the user to enter a password and displays…
A: The elif keyword is pythons way of saying if the previous conditions were not true then try this…
Q: The Litsemba Life Insurance company computes annual policy premiums based on the age the customer…
A: ALGORITHM:- 1. Take input for the current year and the birth year. 2. Pass it to the function that…
Q: Create an application named Tables that computes the price of a table and chairs and whose Main()…
A: Procedure: StartRead no.of chairs nRead woos sort p,m or oif wood sort is "p" , then total=…
Q: In Chapter 4, you created a Die application that randomly “throws” five dice for the computer and…
A: public class FiveDice2 { /** * Application that randomly "throws" five dice for the computer and…
Q: Create an application that accepts a sentence as input and converts each word to “Pig Latin.” In one…
A: Take a string for the input. Take a string for the pig Latin. Input the string. Create an object of…
Q: QUESTION3. The program will ask the user to enter the width and length of a rectangle, and then…
A: import java swing j option pane Create a class Rectangle with tow integer variable width and length…
Q: ava) The SalesCenter application stores information about three employees. There is one manager…
A: Java is a high level object oriented programming language. It is developed by James Gosling. Java is…
Q: The date June 10, 1960, is special because when it is written in the following format, the month…
A: Program: #input month from the usermonth=int(input("Enter a month (in numeric form): "))#input day…
Q: Here is the question: Write an application that prompts a user for the number of years the user has…
A: GIVEN: Calculate the amount of money the user will have at retirement by c++ program. Get the inputs…
Q: The Grinder is a coffee company that has two coffee bean categories as shown in the table below:…
A: Required:
Q: Chapter 4: Making Decis ions I. Mass and VWeight (Nr 2, Page 282) Scientists measure an object's…
A: FORM DESIGN:
Q: Cell Phone Packages use Java Swing(GUI) Cell Solutions, a cell phone provider, sells the following…
A: Given: Cell Phone Packages use Java Swing(GUI)Cell Solutions, a cell phone provider, sells the…
Q: Write an application that displays the result of dividing two numbers and displays any remainder.…
A: Introduction Write an application that displays the result of dividing two numbers and displays…
Q: Write an application in Visual Studio with C# that handles a student report card. The application…
A:
Q: The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the…
A: Code: public class IncreaseProduction {public static void main(String[] args) { double…
Q: In Java) In the game Clacker, the numbers 1 through 12 are initially displayed. The player throws…
A: Code is given below below. import java.awt.BorderLayout; import java.awt.GridLayout; import…
Q: Java ATM machine program ATM machines are used to withdraw and deposit cash in addition to make…
A: THERE ARE VARIOUS PROGRAM CODE BASED ON THE ABOVE QUESTION I JUST GIVE TWO PROGRAM ON THE ATM.…
Q: art A Write a menu-driven program that will give the user the three choices: 1) Wage calculator, 2)…
A: import java.util.*;class partA{ public static void main(String a[]) { String name;float…
Q: Scientists measure an object’s mass in kilograms and its weight in Newtons. If you know the amount…
A: Program approach: To create this mass weight application we will use java. We will use java swing…
Q: There are 22 stones. How many would you like? 3 There are 19 stones. The computer takes 2 stones.…
A: import random # function checking the no. of stonesdef is_valid_entry(n): if(n>=15 and…
Q: Fill in the missing parts of the Javadoc comment for the below method: /** * Calculates the Body…
A: First two missing boxes: Declares a variable named weight of data type double Assigns a value to…
Q: ilename: TemperatureProblem_FamilyNam reate a java program that will read a mperature in degrees…
A: Since, the formula above is given that F= C * (9/5)+32. ( In the above question the formula is…
Q: Write an application that determines whether a phrase entered by the user is a palindrome. A…
A: public class Palindrome{ public static void main(String[] args){ Scanner sc=new…
Q: Using the Circle2D class you defined in Exercise 8.18, write a program that enables the user to…
A: Given below is the complete python program.
Q: write the pseudo-code for the above-given scenario
A: Given: Assume you are one of the programmers in the IT firm. You have assigned the application…
Q: Guess-the-Number Game Write an application that plays “guess the number” as follows: Your…
A: Guess-the-Number Game Write an application that plays “guess the number” as follows: Your…
Q: Write a program that declares a named constant to hold the number of quarts in a gallon (4). Also…
A:
Q: Design an application for Bob’s E-Z Loans. The application accepts a client’s loan amount and…
A:
Q: Create a program that calculates the interest on a loan. Console Interest Calculator Enter loan…
A: from decimal import Decimal def calculate(): loan_amount = float(input("Enter loan amount: "))…
Q: Write an application that prompts a user for the number of years the user has until retirement and…
A: Syntax: do { // Loop-body } while ( Condition ) ; Flowchart:
Q: using java (Use the Date class) Write a program that creates a Date object, sets its elapsed…
A: Complete Answer in Java Programming language is below:
Q: Do the following: Add buttons for all the numbers in a calculator (0-9). Look at a calculator…
A: Java code :
Q: The Harrison Group Life Insurance company computes annual policy premiums based on the age the…
A: I have given an answer in step 2.
Q: Write a console application that prints the next 20 leap years. A leap year is a year in which an…
A: Actually, program is an executable software that runs on a computer.
Q: A university has the following dormitories: Allen Hall: $1,500 per semester Pike Hall: $1,600 per…
A: Actually, Java is a programming language originally developed by James Gosling at Sun Microsystems…
Q: Java Programming A bakery company provides a bonus of a new bakery product package for customers…
A: A. Inputs and Outputs of the program The inputs of the program should be : Number of bread bought…
Q: The programming language to be used is: JAVA Please write a GUI that implements a game, where the…
A: import java.awt.Color;import java.awt.GridLayout;import java.awt.event.ActionEvent;import…
Q: The area of a rectangle can be computed using the following formula:…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: • getLength ()–This method should ask the user to enter the rectangle's length, and then return that…
A: The required Java code is: import java.util.Scanner;public class rectangle { double length;…
Q: JAVA Guess-the-Number Game Write an application that plays “guess the number” as follows: Your…
A: The code is given in next step:-
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- This is the question: Write an application that displays every perfect number from 1 through 1,000. A perfect number is one that equals the sum of all the numbers that divide evenly into it. For example, 6 is perfect because 1, 2, and 3 divide evenly into it, and their sum is 6; however, 12 is not a perfect number because 1, 2, 3, 4, and 6 divide evenly into it, and their sum is greater than 12. This is the code given: public class Perfect { public static void main (String args[]) { // Write your code here } public static boolean perfect(int n) { // Write your code here } }Travel Tickets Company sells tickets for airlines, tours, and other travel-related services. Because ticket agents frequently mistype long ticket numbers, Travel Tickets has asked you to write an application that indicates invalid ticket number entries. The class prompts a ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you drop the last digit of the number, then divide the number by 7, the remainder of the division will be identical to the last dropped digit. Accept the ticket number from the agent and verify whether it is a valid number. Test the application with the following ticket numbers: . 123454; the comparison should evaluate to true . 147103; the comparison should evaluate to true . 154123; the comparison should evaluate to false Save the program as TicketNumber.java.Using C# create a console app doing the following Write a method that takes two integers and displays their sum. Write a method that takes five doubles and returns their average. Write a method that returns the sum of two randomly generated integers. Write a method that takes three integers and returns true if their sum is divisible by 3, false otherwise. Write a method that takes two strings and displays the string that has fewer characters. Write a method that takes an array of doubles and returns the largest value in the array. Write a method that generates and returns an array of fifty integer values. Write a method that takes two bool variables and returns true if they have the same value, false otherwise. Write a method that takes an int and a double and returns their product. Write a method that takes a two-dimensional array of integers and returns the average of the entries.
- Java Programming Travel Tickets Company sells tickets for airlines, tours, and other travel-related services. Because ticket agents frequently mistype long ticket numbers, Travel Tickets has asked you to write an application that indicates invalid ticket number entries. The class prompts a ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you drop the last digit of the number, then divide the number by 7, the remainder of the division will be identical to the last dropped digit. This process is illustrated in the following example: Step 1. Enter the ticket number; for example, 123454. Step 2. Remove the last digit, leaving 12345. Step 3. Determine the remainder when the ticket number is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4. Assign the Boolean value of the comparison between the remainder and the digit dropped from the ticket number. Step 5. Display the result—true or false—in a message box. Accept the…Create an Adder application which prompts a player for the answer to an addition problem. The Adder game creates a problem from two randomly selected integers between 0 and 20. Adderallows the player three tries to enter a correct answer. If the correct answer isentered on the first try, the player is awarded 5 points. If the correct ansewer is enterd on the second try, 3 points are awarded. The correct answer on the third try earns 1 point. If after three tries, the correct answer is still not entered the player receives no points and the correct answer is displayed. The game continues until 999 is entered as sn answer. At the end of the game, Adder displays the players score. Application output should look similar to the following 20+5=25 20+2=20 Wrong answer. Enter another answer: 22 3+6=5 Wrong answer. Enter another answer: 4 5+12=17 14+18=999 Your score is 13Design the worst calculator ever: an application that accepts two numbers from the user and, when a button is pushed, performs a single operation and displays the results. You may choose: Multiplication, Division, Subtraction, square root, or raising the first number to the exponent of the second number. Don't use addition as we already did that in class. The result must be displayed to the user only when an appropriately labeled button is pushed.
- Greetings. The programming language to be used is: JAVA Please write a GUI that implements a game, where the user has to click the buttons in the order of their numbering. * The 9 buttons are arranged in a grid of 3 by 3. Each one has a different number from 1 to 9. * If the user selects the correct button, it should turn green and become disabled. The score should beincremented by 1. * If the user selects the incorrect button, it should turn red and all the buttons should become disabled. * If the user selects the “Reset” button, all buttons should be white and become enabled, their random numbers should be reassigned and the score set to 0. Thank you.A Java Practical Assignments.pdf - Adobe Acrobat Pro DC (32-bit) File Edit View E-Sign Window Help Home Tools Java Practical Assig. x Sign In 1 /1 139% Java Practical Assignments 1. Write an application that throws and catches an ArithmeticException when you attempt to take the square root of a negative value. Prompt the user for an input value and try the Math.sqrt() method on it. The application either displays the square root or catches the thrown Exception and displays an appropriate message. 2. Create a program that allows a user to input customer records (ID number, first name, last name, and balance owed) and save each record to a file. 3. Write an application for Limpopo's Car Care Shop that shows a user a list of available services: oil change, tire rotation, battery check, or brake inspection. Allow the user to enter a string that corresponds to one of the options, and display the option and its price as R250, R220, R150, or R50, accordingly. Display an error message if the…See the sample outputs for more clarification. Project Specifications Input for this project: Values of the grid (row by row) Output for this project: Whether or not the grid is magic square Programmer's full name Project number Project due date Processing Requirements Use the following template to start your project: #include using namespace std; // Global constants // The number of rows in the array // The number of columns in the array // The value of the smallest number // The value of the largest number const int ROWS = 3; const int COLS = 3; const int MIN = 1; const int MAX = 9; // Function prototypes bool isMagicsquare(int arrayRow1[], int arrayRow2 [], int arrayRow3[], int size); bool checkRange (int arrayRow1[], int arrayRow2[], int arrayRow3[], int size, int min, int max); bool checkUnique(int arrayRow1[], int arrayRow2[], int arrayRow3[], int size); bool checkRowSum (int arrayrow1[], int arrayrow2[], int arrayrow3[], int size); bool checkColiSum(int arrayrow1[], int…
- Create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)• If one player chooses…Java Programming A bakery company provides a bonus of a new bakery product package for customers who buy at least 10 breads in the company anniversary award which will be celebrated in the next three months. To get the bonus, the customer is given the opportunity three times to guess a number determined by the application from numbers 1 to 20. For each guess number given by the customer, the application will respond as follows:• If the guessed number is smaller than the lucky number, you will see the words "Bigger Number"• If the guessed number is greater than the lucky number, you will see the words "Smaller Number"• If the guessed number is the same as a lucky number, it will match the words "Congratulations ... you found a LUCKY number"As part of the company's IT team, you serve to create a lucky number guessing game console.A. Determine the inputs and outputs of the design programb. Draw a Flowchart of the programc. Write Coding to make the applicationd. Give Screen shoot the…Using C# in Microsoft Visual Studio create an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors…