Requirements Create a Java program that reads a value representing a number of seconds, and then prints the equivalent amount of time as a combination of days, hours, minutes, and seconds. For example, 99999 seconds is equivalent o1 day, 3 hours, 46 minutes, and 39 seconds.
Q: create a java application that: Prompts the user for a number called num (MUST BE INTEGER). Finds…
A: Program description: user input is stored in the num variable as integer The user input number is…
Q: Write a JAVA program that declares a variable that represents the minutes worked on a job and assign…
A: Here is the easy approach :- Create three variables one to hold the minutes then second to hold…
Q: Write a Java program to sell a limited number of cinema tickets. Each person can buy up to 4…
A: First total 100 tickets are available. Each person can buy maximum 4 tickets if he want to buy more…
Q: To make a profit, a local store marks up the prices of its items by a certain percentage. Write a…
A: Note: Below is the required program in java language. Programming Approach: Importing appropriate…
Q: Based on the exercise we did in class, write a complete Java program that allows a user to play…
A: Given:
Q: At a certain university, students have to submit their exams online.
A: Source code: Program: //Header filesimport java.util.Scanner; //Classpublic class Main{…
Q: Create a Java program that will compute for the total salary of an employee. Hourly rate - 168.76…
A: Code: class NetSalary{ public static void main(String arg[]) { double gs,it,pt,pf,netSalary;…
Q: Create a Java program that will read a date (month, day and year) in integer form and display the…
A: Simple Date Format is a concrete class for formatting and parsing dates in a locale-sensitive…
Q: Develop a java program that validates a user’s credit card number as per the following criteria;…
A: In this question we have some definition about some function. We have to write a code in Java, test…
Q: Write a structured Java program to calculate the parking fare for customers
A: Program Explanation: Import the text and util classes Define a class for implementing the parking…
Q: Required is a Java program that receives the names of 250 students via a keyboard, and their…
A: import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import…
Q: Write a java program called ImperialMetric that displays a conversion table for feet and inches to…
A: Program: //import Scannerimport java.util.Scanner;//created class ImperialMetricpublic class…
Q: Create a new Java program called MyInfo. Create one or more method(s) that pass the following…
A: public class MyInfo{ //myMethod prints the parameter it has received static void myMethod(String…
Q: Write, Compile and Execute a Java program that reads an investment amount, annual interest rate and…
A: Algorithm : Step 1 : declare variables. Step 2 : create object of scanner class to take input. Step…
Q: Write a Java Program Code for this,Please. The East Coast sales division of a company generates…
A: The java code along with the snapshot of code and output is given below.
Q: Assume you are working for the Kean University and given a task to build an Email Registration…
A: Required: java Assume you are working for the Kean University and given a task to build an Email…
Q: Write a java program to print the area of a rectangle by creating a class named 'Area' having two…
A: The required Java code is given below: import java.util.Scanner;public class Area{ // class Area…
Q: Create a Java program that will ask the user to input time-in and time-out from January 1 to 15,…
A: Objective: This program determines the difference between two given times (in-out) and also displays…
Q: Write a java program that prompts the user to enter two integers, intLeft and intRight, taking into…
A: public static Scanner scan = new Scanner(System.in); declare scan object for taking input…
Q: In Java, one way to determine how healthy a person is by measuring the body fat of the person. The…
A: Hello Student. Warm welcome from my side. Hope you are doing great. Here's your answer. I will try…
Q: Create a Java program that detects whether the mouse is clicked inside or outside a circle. The…
A: We need to use the MouseListener class and the paint method) to draw a circle and show the result…
Q: Write a complete Java program that will calculate and display your BMI based on your weight and…
A: BMI = weight / height2
Q: Write a java program by taking two variables num1 and num2 with values of your own and perform the…
A: Please find the answer below :
Q: Input The input begins with an integer 1 ≤ ? ≤ 10000, the number of frosh. For each frosh, a line…
A: Here I have the code in C++ but you can apply converter and get it in your language.
Q: TASK 4 Given a set of cities, the central city is the city that has the shortest total distance to…
A: Given, Sample Output: Enter the number of cities: 5 Enter the coordinates of the cities: 2.5 5…
Q: Write a Java program that simulates a meeting reservation system. The program shall allow the user…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Write a program that calculates how much money you’ll end up with if you invest an amount of money…
A: Let p in initial amount, n be number of years and r be interest rate then compound interest is…
Q: Create a Java program that allows the user to add up any number of non-zero fractions. The program…
A: Program: //Main.java import java.util.Scanner; public class Main { public static void…
Q: Using Java, make a program that computes and displays various properties of a circle. For the…
A: The required java program using input/output processing has been given in the next step.
Q: There are several cases where we can use conversions from one quantity to another. It can be about…
A: given data
Q: Modify the command-line argument example Hello.java, to handle a few command-line arguments. Ask the…
A: Please find the answer below :
Q: Write a Java GUI program Create a program using GUI format where you are to enter 12 monthly sales…
A: Answer :
Q: java
A:
Q: There are several cases where we can use conversions from one quantity to another. It can be about…
A: Attached Java Source code below import java.util.Scanner; public class conversion { public static…
Q: 3. Create a Java program that asks a teacher how many (numeric) grades s/he is going to enter in the…
A: ANSWER 3. Declare all the variables as static including the number of grades to be entered and the…
Q: Create a Java program that asks the user to enter three (3) first names then display the following:…
A: //Note i have given the answer as asked in the question //Coding import java.util.Scanner;public…
Q: Write, Compile and Execute a Java program that reads an investment amount, annual interest rate and…
A:
Q: Write a java program called ImperialMetric that displays a conversion table for feet and inches to…
A: import java.util.Scanner; public class ImperialMetric{ public static void main(String args[]){…
Q: write a java program that converts years to weeks, days, hours, minutes and seconds. Assume that 1…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Instruction: Create a java program using user-defines methods that will perform the 3 major…
A: Sample Response: //Java program for ATM transactionpackage atm;import java.util.Scanner;//class…
Q: Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south,…
A: The, given information is: Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the…
Q: Write a Java program (Class Name: VolumeDiameterSphere) to getd constant value T (value Volume and…
A: import java.util.Scanner;class Main { public static void main(String args[]) { Scanner…
Q: Develop a Java application to approximate e using the following formula: Design an e calculator by…
A: - We need to solve the provided in java.
Q: Write a java application that prompts for the number of hours that an employee worked in a week
A: use concatenation operator + to make program interface good with user. It will ask user name and…
Q: Given a set of cities, the central city is the city that has the shortest total distance to all…
A: GIVEN:
Q: In Java: Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go…
A: Code of this program is:
Q: Write a java program called ImperialMetric that displays a conversion table for feet and inches to…
A: PROGRAM: //Head file import java.util.*; //Defining the class public class ImperialMetric{…
Q: alled "CurrentDateTime.java" to display the current date and time. The PrintCalendar case study in…
A: Below the java program called "CurrentDateTime.java" to display the current date and time.
Q: Please code this in Java. Write a program to input a phone number and output a phone directory with…
A: Hello student Please do like if this solution will help you I really work hard for getting accurate…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- JAVA LANGUAGE Body Mass Index Version 2.0 by CodeChum Admin Recall that according to the National Heart, Lung, and Blood Institute of the National Institutes of Health, body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. It is used to monitor one's health by determining whether one is underweight, overweight, has normal weight or is obese. It is computed based as follows (when using standard weight in pounds and height in inches): BMI = 703 x (weight/(height2)) Furthermore, people with BMI scores that are less than 18.5 are said to be underweight. Those with scores between 18.5–24.9 (inclusive) are of normal weight. Those with scores between 25–29.9 (inclusive) are said to be overweight. And those with scores 30 or higher are obese. Input The input is composed of two positive integers representing the weight in pounds and the height in inches. 140·65 Output A single line containing two values: the computed…JAVA PROGRAM Introduction The goal of this project is to develop a nontrivial computer program in the Java language by applying elementary programming language concepts learned so far. Specifically, the concepts to be used for this project include simple input/output, selection, iteration (loops), and possibly one-dimensional arrays (although the use of arrays is not required for completing this project). Developing a Java program for printing a calendar Statement of Problem: Develop a Java program to print a calendar for the year that the user will provide as an input to the program. Use the Eclipse IDE (on a Windows or Mac machine). Your program must fulfill the following requirements: Your program should prompt and receive as input an integer value representing the year for which the user wishes to have a calendar printed. This integer must be in the range from 1780 through 2040. In case the user input a year that is outside this range, your program must print out a message such as…CSCI 2436:01L Data Structures Lab Lab 1 - Chapter 4 The Efficiency of Algorithms In this lab, you will practice how to measure the running time f a section of code in Java. One approach is to use System.nano Time() where the current time is stored as a long integer equals to the number of nanoseconds. By subtracting the starting time in nanoseconds from the ending time in nanoseconds, you get the run time-in nanoseconds of a section of code. public static void main(String[] args) { int n1 = 10, n2 = 100, n3 = 1000, n4 = 10000; long n1Time, n2Time, n3Time, n4Time; n1Time AlgorithmA (nl); For example, suppose that AlgorithmA is the name of a method you wish to time. The following statements will compute the number of nanoseconds that AlgorithmA requires to execute: } public static long AlgorithmA (int n) { long startTime, endTime, elapsedTime; startTime = System.nanoTime (); int sum = 0; for (int i = 1; i 0 1 2. By midnight, Tuesday, Jan 24th, submit your Java source file and a…
- Art.java In this part you will create a program Art.java that produces a recursive drawing of the design attached in the picture. Requirements Art.java must take one (1) integer command-line argument n that controls the depth of recursion. Your drawing must stay within the drawing window when n is between 1 and 7. (The autograder will not test values of n outside of this range.) You may not change the size of the drawing window (but you may change the scale). Do not add sound. Your drawing can be a geometric pattern, a random construction, or anything else that takes advantage of recursive functions. Optionally, you may use the Transform2D library you implemented in Part 1. You may also define additional geometric transforms in Art.java, such as sheer, reflect across the x- or y- axis, or rotate about an arbitrary point (as opposed to the origin). Your program must be organized into at least three separate functions, including main(). All functions except main() must be private. call…PLEASE CODE IN PYTHON Problem Description An anagram is a word or a phrase formed by rearranging the letters of another phrase such as “ITEM” and “TIME”. Anagrams may be several words long such as “CS AT WATERLOO” and “COOL AS WET ART”. Note that two phrases may be anagrams of each other even if each phrase has a different number of words (as in the previous example). Write a program to determine if two phrases are anagrams of each other. Input Specifications The input for the program will come from an input file in.dat, in.dat will have two lines of data, line (1) will have the first phrase and the line(2) will have the second phrase. You may assume that the input only contains upper case letters and spaces. Output Specifications The program will print out one of two statements: ”Is an anagram.” or, ”Is not an anagram.” All output will be to the screen. Sample Input CS AT WATERLOO COOL AS WET ART Output for Sample Input Is an anagram.Computer Science JAVA: If you wanted to test two variables for equivalency, what operator do you use? Give two circumstances in which that operator does not perform as expected, and why.
- Java I am beginner in java my program is to take 2 number from user and given that these number is of int type . i have to find quotient and print that Do fastPLZ help with the following: IN JAVA Static variables are often used: (a) in arithmetic expressions (b) to communicate between objects (c) within looping structures (d) all of the aboveBook information: Textbook: Introduction to Java Programming and Data Structures, Comprehensive Version, Edition: 11th Author: Y. Daniel Liang Publisher: Pearson ISBN: 9780134670942 --------------------------------------------------------- PROBLEM: Prompt the user to enter a string containing a hexadecimal number. Use class Integer to parse the input to a base-10 integer variable and display it. Convert this base-10 variable to a string holding an equivalent number in binary. Print this binary equivalent. Use class Integer to convert the binary string back to base-10 and display it.
- WORD FREQUENCIES Input Standard Input Output Standard Output Data Structure List Problem Description Write a JAVA program that will display all words from a given passage with its frequencies. At the end of output, print the text analysis such as (i) Total words, (ii) Number of Repeated words, (iii) Number of Unique words and (iv) Most used word. Input Input of this program is a passage. A passage consists of N words and symbols. Symbols that will be considered in the passage are full stop (.), comma (,), question mark (?) and exclamation mark (!). The passage will have M unique words, where the M is less than or equal to N. Output Output of the program is M lines, where each line contains a word followed by symbol (, then followed by an integer that represent the word frequency and ends by symbol). Display the analysis of Total words, Number of repeated words, Number of unique words and Most used word as shown in Sample InputOutput. Sample Input-Output…main.cpp 1 @include 2 using namespace std; int maxResult() 4-( int maxVal = 0; 6. for (int i = 0; i <= n; i += a) { for (int j = e; j <= n i;j += b) !! 10 (float)(n - (i + j)) / (float)(c); 11 float z = 12 if (floor (z) { int x = i / a; int y 13 ceil(z)) 14 15 16 j/ b; max (maxVal, x + y + (int)z); 17 maxVal = 18 19 20 21 22 return maxVal; 23 } 24 int main() 26 { 25 27 28 cout << maxResult( ); 29 30 return 0; 31 } Input Compilation failed due to following erors) main.cpp:7:23: error: 'n was not declared in this scope 7 for (int i = 0; i <= n; i t a) main.cpp:7:31: error: 'a' was not declared in this scope 7 for (int i 0; i <= n; i t a) main.cpp:9:36: error: 'b' was not declared in this scope for (int j = 0; j <- n i; j b) %3D main.cpp:11:45: error: was not declared in this scopeJAVA LANGUAGE CODE Postfix Calculator by CodeChum Admin One good implementation of computing infix expressions is to transform them to postfix and then evaluate via the postfix expression. Infix expressions is the common way of writing arithmetic expressions. The binary operator come between them as shown below: 2 * 5 + 9 - 10 / 20 In postfix expressions, the operands come first before the operator: 2 5 * 9 + 10 20 / - A stack can be used to evaluate postfix expressions. The operands are pushed onto the Stack and when an operator is found two operands are popped and the operation is performed and finally the result is pushed back onto the Stack. The final answer will be the lone element of the Stack. Input The first line contains a positive integer n representing the number of postfix expressions. What follows are n postfix expressions themselves. 5 10 20 + 30 15 2 * + 100 20 30 + / 90 20 10 + + 0 / 9 3 - 10 + 2 * Output A single line containing the result of…