Subject: Computer Education Lesson: Java Write the java program for the following problem. The program will accept the value of Celsius. If the value of the Ce is greater than 300, it will convert to Kelvin, otherwise, it will con Fahrenheit. Kelvin = Celsius + 273.15
Q: Let A be an array of integers of size 10, whose ith entry is represented by A[i] for i = 0 to 9, and...
A: - According to the rules, we have to check for the element 85 position in the array.
Q: Which of the four conditions would be violated if a user could remove jobs from a spooling system? S...
A: Some devices, such as tape drives and printers, cannot usefully multiplexthe I/0 requests of multipl...
Q: 3. Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. ...
A: The Answer is in given below steps
Q: Write a program that uses two classes. The first class is called “dAta" and holds x and y coordinate...
A: Summary: -Hence, we have discussed all the points.
Q: what is Hard disk?
A: Hard Disk also known as HDD is a hard drive (a physical device) that is used for storage purposes. i...
Q: Draw a schematic logic diagram for a binary adder that could properly sum numbers as large as the bi...
A:
Q: List the numerous relationships that exist in the database.
A: A social information base gathers various sorts of datasets or informational indexes that utilizatio...
Q: Sample Output 1 Would you like to take out a loan? maybe Invalid choice; please enter yes or no. Wou...
A: code #include<bits/stdc++.h> using namespace std; double askIncome(){ double income; ...
Q: Ada Lovelace is well-known for what she did.
A: A program is source code which is written in human readable format. It gets converted into machine l...
Q: Liverpool will play against a certain team n number of times in a tournament. A match can end with 3...
A: Introduction: Include any header files that are required.A function that calculates the num...
Q: What exactly is local storage on a computer, and how does it function?
A: As we say backbone ties our body together, same way Motherboard is the backbone of the computer, whi...
Q: What kinds of artificial intelligence are there? Define artificial intelligence domains and provide ...
A: Introduction: The computer simulation of human intelligence processes is known as artificial intelli...
Q: When did the first computer chip appear on the scene?
A: Introduction: Computer history: In the modern are, computers have surpassed all othe...
Q: 2. Write a Java program that determines if a number is positive or negative. Ехample: Input a number...
A: Here in this question we have asked to write a Java program which determine that given number is pos...
Q: Determine if the following statements should use permutation or combination Five friends posing for...
A: Permutation is the technique used for arranging various objects in a specific order, but combination...
Q: Which measures for usability and user experience were used in the review, and how were they distribu...
A: answer is
Q: When it comes to infrastructure and architecture, what's the difference?
A: The two terms are often used interchangeably, but in fact they mean quite different things. Architec...
Q: Q-3 Sort the following elements using Selection Sort. 67 34 45 12 23 89 55 9. 60 18
A: According to the company policy I can do only one question at the time to know the answer of the oth...
Q: Write a Python program that takes a String as input from the user, removes the characters at even in...
A: Introduction: Write a Python program that takes a string as input from the user, removes the charact...
Q: Suppose you have a packet to send of N bytes. What will happen when you send it using the below swit...
A: the answer is
Q: What are the functions of database languages?
A: What are the main functions of the DBMS:The principle functions that are performed by database manag...
Q: Why is data transformation simplified?
A: Introduction: Transformed data may be easier to utilise for both people and computers. Data that has...
Q: Code fragment 1: int i=0; int scores[]={0,0,0}; 1 while(i<3) 2 { printf("Scores: "); scanf("%d", &sc...
A: Ans : The true statements are : 1) Array declaration and Initialization 2) Relational Operator 3) Va...
Q: Explain any five assembler directives of 8086 microprocessor.
A: 8086 Microprocessor: It is the enhanced version of Intel 8085 microprocessor and designed by Intel i...
Q: Given the following class definition, how would you instantiate it
A: An object is an instance of class and instantiating is a process of creating an instance for a class...
Q: 3. Explain the following MIPS addressing modes with the use examples (instructions): a) Register ...
A: Given :- 3. Explain the following MIPS addressing modes with the use examples (instructions): a) Reg...
Q: . 1. Prove that the naive string matching algorithm runs in time O(n) when all the characters in th...
A:
Q: Don't just make a performance-based case for why deep access is superior to shallow access.
A: DEEP ACCESS The concept is to maintain a stack of active variables. Instead of access links, us...
Q: 1. Give the name of a function that returns an int and generates a random number in the C Standard L...
A: 1. ions that allow us to get the absolute value of a number located in different headers. What two h...
Q: What exactly is disc storage, and how does it function?
A: First of all, we should know what is Data Storage? The digital recording of data and documents, as w...
Q: Find the recurrence relation for the worst-case time complexity of the following code. Explain your ...
A: T(n)=T(n-1)+O(n)
Q: Q: Describe the definition, advantages and disadvantages of the following databases (In your own wor...
A: INTRODUCTION: We need to tell about the definition and pros and cons. Only 3 parts are be entertain...
Q: Using Python show the code and outputs for the following: Any dataset, does not matter as long as co...
A: Implement ANOVA program on dataset in given below step.
Q: What does a computer's brain look like
A: Computers: Charles Babbage created the 'Babbage's Engine' in the 1880s, which was the predecessor t...
Q: You are a consultant specializing in database creation and you have been hired to design a database ...
A: An Employee Cost Management System (EEMS) is a technology that practically all firms and enterprises...
Q: Identify three key Web site performance measures.
A: Given :- Identify three key Web site performance measures.
Q: • The number of gallons of paint required • The hours of labor required • The cost of the paint • Th...
A: Solution: ws = float(input('Enter number of square feet of wall space to be painted:'))pg = float(in...
Q: What do you mean by "partitioning" in terms of operating systems? Examine the pros and downsides of ...
A: In order to maintain, manage and allocation of the computer's main memory, Memory management plays ...
Q: Write the pseudocode to find the lowest common ancestor of two nodes n1, n2 in a linked binary tree ...
A: Code to fin lowest common ancestor of two nodes in a linked binary tree structure
Q: RESEARCH What is seven-segment display? How to produce the required decimal digit from 0 through 9 ...
A: Ans:
Q: 5. What is wrong with the following function and why? int *setup(int n){ int a(n): for(int i=0; i<n;...
A: The solution to the given problem is below.
Q: n PHP language, write a program to input a string from the user and print every character of the str...
A: Answer
Q: Storage locations on a disk that are divided into pie-shaped sections?
A: Storage locations on a disk that are divided into pie-shaped sections
Q: There are two integer data values in locations num1 and num2. Create these two variables in an assem...
A: the program is an given below :
Q: Communication is immediate in asynchronous telecommunication Group of answer choices True False
A: Communication is immediate in asynchronous telecommunication Group of answer choices True False i...
Q: ficant contribution to the field of c
A: Ada Lovelace made a significant contribution to the field of computer science.
Q: mport math ef segment_area(r,theta): """calculate the area given radius r and angle theta, return th...
A: Answer
Q: 1. An NFA accepts a string w only if all possible computation branches end up in accepting states on...
A: Ans:- True
Q: Give context-free grammars to generate the following languages: (a) L = {b"c™ :n m+ k} (c) L3 = {a"b...
A: Lets understand context free grammar: Context free grammar has following type of productions: A->...
Q: What is the purpose of using a group clause?
A: What is the purpose of using a group clause?
Subject: Computer Education
Step by step
Solved in 3 steps with 1 images
- in Java Tasks Write a program 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 is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.) 2. The user enters his or her choice of "rock", "paper", or "scissors" at the keyboard. (You can use a menu if you prefer.) 3. The computer's choice is displayed. Tasks 4. A winner is selected according to the following rules: a. If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.) b. If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) C. If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps…JAVA PROGRAMMING LAB Write a Java program to takes 2 numbers from the user and print true if one or the other is teen, but not both. "teen" number is that number which lies in the range 13..19 inclusive.Use java code Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. The interpretation of BMI for people 16 years or older is as follows: BMI below 16 16-18 19-24 25-29 30-35 above 35 Interpretation seriously underweight underweight normal weight overweight seriously overweight gravely overweight Write a Java program that prompts the user to enter a weight in kilograms and height in meter and display the BMI. Use nested if- else statements to solve this exercise. Here is a sample run: Enter weight in kilograms: 66.22 Enter height in meters: 1.788 Your BMI is 20.71353142 You are normal weight
- Problem specification: There is a grid of NXN squares. We can easily determines how many different rectangles (squares are excluded) there are in the grid. For example, in a 3X3 grid, you can find 22 different rectangles, marked as the green rectangles. You can see that we did not count the red ones as they are squares. In this assignment, you will write a Java program that takes the value of N as input and determines the total area of all the rectangles in the grid. Assume that the smallest squares in the grid have length 1. So a 3X2 rectangle will have an area of 6. For example, the total area of all the rectangles in the 3X3 grid is 66.…Student need to draw the process flow for calculating the Income tax of an employee. Write a java program which initialization earning of an employee. The program should calculate the income tax to be paid by the employee as per the criteria given below:Slab rate IT rateUpto Rs. 50,000 NilUpto Rs. 60,000 10% on additional amountUpto Rs. 1,50,000 20% on additional amountAbove Rs. 1,50,000 30% on additional amount Hint: - Income tax calculation formula: Slab rate(percentage) / Annual income * 100Annual Income calculation formula : monthly income * 12 Final output :Name of the Employee:Employee ID number:Monthly income :Annual income : Tax amount need to pay :Use Java ⮚ Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. ⮚ Symbol Value I 1 V 5 X 10 L 50 C 100 D 500 M 1000.⮚ For example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II. ⮚ Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as IX. There are six instances where subtraction is used: I can be placed before V (5) and X (10) to make 4 and 9. X can be placed before L (50) and C (100) to make 40 and 90. C can be placed before D (500) and M (1000) to make 400 and 900. ⮚ Given a roman numeral, convert it to an integer
- For My Java class, this being my first programming class, I have been asked to complete the following to learn Loops. Next is arrays but I was hoping to get help understanding this first. Thanks 1-Design a program that asks the user to enter a series of positive numbers. The user should enter a negative number to signal the end of the series. After all the positive numbers have been entered, the program should display their sum. 2-The distance a vehicle travels can be calculated as follows: Distance = Speed x Time Design a program that asks a user for the speed of a vehicle in miles per hour and how many hours it has travelled (Assume the two values are integers). Your program should then use a loop to display the distance the vehicle has traveled for each hour of that time period. (For example, entering 50 mph and 4 hours should produce output like: Hour 1: 50 miles, Hour 2: 100 miles, Hour 3: 150 miles, Hour 4: 200 miles. ) 3-Design a program that uses nested loops to display a…Write a complete Java program that performs the following tasks: 1. Ask the user to enter the last two digits of his/her student ID. 2. Break the number into two digits using arithmetic operators, then store the first and second digits in integer variables named digitl and digit2 3. Find and print the following: Note: • The product of digit] and digit2. The sum of digit1 and digit2 • The average of digit1 and digit2 • The maximum of the two numbers; digit1 digit2 using a method from the class Math. Typical run of the program 03.java Compile Messages IGRASP Messages Run 1/0 Interactions End Clear Help -jGRASP exec: java 03 Enter the last two numbers of your student IDI 46 The first digit 4, the second digit -6 Product: 4 6 = 24.0 sum: 4 + 6 - 10.0 average 15.0 maximun is 6 GRASP: operation complete.Java question Write a program that plays the Rock-Paper-Scissors game againstthe computer. When played between two people, each personpicks one of three options (usually shown by a hand gesture) atthe same time, and a winner is determined. In the game, Rockbeats Scissors, Scissors beats Paper, and Paper beats Rock. The program should randomly choose one of the three options (with-out revealing it), then prompt for the user's selection. At that point, the program reveals both choices and prints a statementindicating if the user won, the computer won, or if it was a tie.Continue playing until the user chooses to stop, then print thenumber of user wins, losses, and ties.
- A Software Engineering Company has a salary system based on position level. The table below represents the salary paid according to each position: Employee Position Employees Salary Employees' Name: Ali Position: Bonus Amount: Final Cost: $3500 Manager Supervisors Sales Person The Company decided to give a 25% bonus for employees whose salaries are less than 3000$ due to holidays. Write a java program that asks the user to enter his/her name, and his/her work position. The program should calculate and display the total salary of the employee based on his/her salary position, the bonus amount and the final salary for an employee. Make sure that your program outputs exactly as the sample run below. Sample Run1: Enter Your Name: Ali Enter Your Position (M for Managers, S for Supervisors or P for Sales Person): M Fixed Monthly Salary 3500$ 2100$ Manager Salary: $3500.0 $0.0 Internet Service Bill 700$ Sample Run2: Enter Your Name: Cerine Enter Your Position (M for Managers, S for…JAVA Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula: length = v2 / 2 * a Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared ( m/s2 ) , then displays the minimum runway length needed to take off. Here is a sample run: Enter speed and acceleration: 60 3.5 [enter] The minimum runway length for this airplane is 514.286The U.S. Census Bureau projects population based on the following assumptions:- One birth every 7 seconds- One death every 13 seconds- One new immigrant every 45 secondsWrite a program to display the population for each of the next five years. Assume the current population is 312,032,486 and one year has 365 days.Hint: In Java, if two integers perform division, the result is an integer. The fractional part is truncated. For example, 5 / 4 is 1 (not 1.25) and 10 / 4 is 2 (not 2.5). To get an accurate result with the fractional part, one of the values involved in the division must be a number with a decimal point. For example, 5.0 / 4 is 1.25 and 10 / 4.0 is 2.5.Sample RunPopulation after 1 year: 3.148125827032967E8Population after 2 years: 3.1759267940659344E8Population after 3 years: 3.2037277610989016E8Population after 4 years: 3.2315287281318676E8Population after 5 years: 3.259329695164835E8Class Name: Exercise01_11