Java Program 2. Write a java program that decides a variable named inches, which holds a length in inches, and assign a value in feet and inches: for example, 86 inches, becomes 7 feet and 2 inches. Be sure to use a named constant where appropriate. Save the class as inchesToFeet.java
Q: 1. Under the user location. scenario, all record- and file-locking activities are performed at the e...
A: Choose the correct answer for the given question.
Q: What does it imply to claim that two items have a "is a" relationship?
A: Introduction: Is-a (is a or is a) denotes a relationship of subsumption between abstractions, in whi...
Q: From the employee table, calculate the average compensation for each job category where the employee...
A: here is the the required SQL query as shown below :- SELECT -- columns to be retrieved JOB...
Q: Define the term "machine learning" in your own words. When designing AI systems for medical care, id...
A: Introduction: Machine learning (ML) is a subset of artificial intelligence (AI) that enables softwar...
Q: 5. Explain the documents needed for Scope Change Control
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: What are the notions of functions in Swift again? What are the qualities of Swift's functions that d...
A: Introduction: A function is a collection of statements that accomplish a certain activity. It is giv...
Q: Explain how nested loops are used to assign and report values from multidimensional arrays.
A: Introduction A nested loop is a mechanism where we write a loop inside another loop and for multidi...
Q: Which of the following variables is not a distinctive sign of a phishing message?
A: Phishing message usually contains links, spelling mistakes and will always ask you to click on some ...
Q: e know the order of growth is O(n). List the steps leading to your calculation in case your answer i...
A: the answer is an given below :
Q: You have important data on your hard drive that has not been backed up, and your Windows installatio...
A: There are many way to recover data from a corrupted windows system. The wayes are following.
Q: What are the most important computer science concepts to understand?
A: Introduction: The study of computers and computing, as well as its theoretical and practical applica...
Q: Give example of Date class from Simple date format class in JAVA.
A: Introduction: The java.text.SimpleDateFormat class in Java contains methods for formatting and parsi...
Q: A given network was deployed and was usec for one year. In its logbook was written that it was down ...
A: Mean time to Repair or MTTR is the metric used to determine the average time of the maintaining the ...
Q: The ImageList control is found in which part of the Toolbox?
A:
Q: A web form that allows users to select one of three pizza crust choices from a drop-down menu would ...
A: a web form that allow user to select one of three pizza crust choices from a drop down menu
Q: Explain how HDFS and MapReduce are mutually beneficial.
A: Introduction: Hadoop spreads data processing over a cluster of commodity computers and runs on sev...
Q: 1. Question : Simplify the following functions using Boolean algebra rules: F1 = a.b+c’+c(a’+b’) F...
A: Please refer below for your reference: Due to company's guidelines we are restricted to answer first...
Q: When are DML modifications in database tables made permanent?
A: Introduction: In SQL Developer, you may insert a DML statement in the Worksheet. To access and modif...
Q: cript pickanumber3.sh. The script will get a random number 1 - 100. Ask the user to pick a number. I...
A: Given : Name the script pickanumber3.sh. The script will get a random number 1 - 100. Ask the user ...
Q: describes a relationship in which each piece of data in one entity is represented by only one instan...
A: There are three distinct sorts of relationships between entities, They are as follows: Relationships...
Q: What is a string data type? What is ASCII character code?
A: String data type and ASCII character code .
Q: What is the primary function of a firewall? What are the general rules for employing packet filterin...
A: Introduction: Firewall is nothing but a barrier or layer of security between the traffics of two net...
Q: 3. In the C++ language, write a function that takes a vector as the parameter and reverses the vecto...
A: Code attached: The C++ code for reversing the vector by taking vector as a parameter is given below:...
Q: Discuss possible safeguards against wireless credentials being intercepted by Man-in-the-Middle (MIT...
A: INTRODUCTION: When an attacker intercepts communication between two or more devices that are linked ...
Q: What do you want them to say when they call you?
A: Introduction Paging is copying a virtual page from the disk to a page frame in the main memory.
Q: What is wear leveling and why is it important for solid-state drives?
A: Wear levelling (also known as wear levelling) is a method for extending the life of erasable compute...
Q: discuss in general the use data structures such as arrays, structures, linked lists, stack and queue...
A: Application of Arrays: Arrays are used to hold items of the same datatype and give O(1) access to th...
Q: Write a program that prompts the user to enter a length in feet and then enter a length in inches an...
A: Step 1 The answer is given in the below step
Q: NW Q3) IP addressing operates at the network layer (Layer 3) of OSI, IP addresses must be able to id...
A: The answer as
Q: In your own words, define the term "memory allocation."
A: Introduction: The process of assigning space within a program for data or variables in a computer is...
Q: Write a python program to generate the x values around the y with a standard deviation of z. Take th...
A: Required:- Write a python program to generate the x values around the y with a standard deviation of...
Q: Is there a way to rewrite this Java code differently? package application; public class Empl...
A: Answer: In this question, we are given a code and have to write in different possible if exist.
Q: What function does HDFS play in the Hadoop architecture?
A: Hadoop:An apache Hadoop system is a collection of open source software utilities that facilitates u...
Q: How handy is Microsoft Word's track change feature?
A: Keeping track of changes in MS Word Microsoft Word includes a built-in track changes capability. It ...
Q: Create 7 (SEVEN) different Open GL programs. (use Geometric form (simple shapes in different colors ...
A: #include <windows.h> #include <GL/glut.h> void initGL() { glClea...
Q: e Your Task: Write a program that creates a file - Your program should request the user to enter...
A: the code is an given below : Program - import java.io.FileWriter; import java.util.Scanner; public ...
Q: Is it possible to safeguard communications using message secrecy and integrity security? Is it the ...
A: Introduction: Because smart objects frequently communicate data across insecure communication medium...
Q: ####### in python ########## Calculate the approximate solution of th system of equations. xy = (z^2...
A: Python Code We can get the L¹ norm using the linear algebra module of the Numpy package which offers...
Q: Why are operating systems partitioned so differently?
A: Introduction: A partition is a logical split of a hard drive that operating systems (OSes) and file...
Q: Create a 1-by-1000 row vector called M containing random integer numbers between 8 and 256. Using lo...
A: task 1 :
Q: Write an SQL statement to display all orders from the tables Catalog2015 and Catalog2016 for orders ...
A: This code run properly if column of both datas having same column name and data type.
Q: What does the Ubuntu Server Operating System look like, and how does it vary from other server opera...
A: Before comparing the difference between Ubuntu Server from other operating systems, let's show what ...
Q: Explain how to turn the letters A, B, and C into decimal numbers.
A: Introduction: Decimal Number System The decimal number system is a base-ten system. It has ten sym...
Q: 20.2 Find the chromatic index of each graph in Fig. 20.7. Eig 20 7
A:
Q: Should the cardinality between entities be translated/read from both ends of the notation when deali...
A: Introduction: Cardinality: Cardinality refers to the maximum or lowest number of components permitte...
Q: Write a Python program to plot the marks data along with roll number using the matplotlib module. As...
A: Required:- Write a Python program to plot the marks data along with roll number using the matplotlib...
Q: Which of the following statements creates an array of elements of the integer data type with a lengt...
A: which of the following statement creates an array of element of the integer data type with the lengt...
Q: You have port scanned an Internet-facing web server. The following ports are open. 23, 8O, 443, 8080...
A: given ports are: 23, 80, 443, 8080 and 63524
Q: A rigid vessel is held at 70 °C and contains 100 moles of H20. Half of this water is liquid and half...
A: Answer: 31.2 kPa
Q: What is the result of this statement? True and 8 < 10 or False O Runtime error - parenthesis needed ...
A: Answer b) True For more understanding , I have provided PYTHON CODE along with SCREENSH...
Java Program
2. Write a java program that decides a variable named inches, which holds a length in inches, and assign a value in feet and inches: for example, 86 inches, becomes 7 feet and 2 inches. Be sure to use a named constant where appropriate. Save the class as inchesToFeet.java
Step by step
Solved in 2 steps with 1 images
- Write a structured Java program to calculate the parking fare forcustomers who park their cars in a parking lot when the following information isgiven:a) A character showing the type of vehicle: C for car, B for bus, T for truck An integer between 0 and 24 shows the hour the vehicle entered the lotc) An integer between 0 and 60 showing the minute the vehicle entered the lotd) An integer between 0 and 24 showing the hour the vehicle left the lote) An integer between 0 and 60 showing the minute the vehicle left the lotThis is a public lot. To encourage people to park for a short period of time, themanagement uses two different rates for each type of vehicle, as shown in thefollowing table:Vehicle First Rate Second RateCAR RM 0.00/hour first 3 hour RM 1.50/hour after 3 hourTRUCK RM 1.00/hour first 2 hour RM 2.30/hour after 2 hourBUS RM 2.00/hour for first hour RM 3.70/hour after first hourThe input data consist of a character and a set of four integers representing thetype of vehicle and…Create a class with [3][3] dimension and the java programshould display the magic square. Interpret your program.in a java program. Imagine that you own a flower store and you need to display a menu of all the item categories, items and prices you sell for your customers. Display the prices for each product and category. The flowers are {"Rose", "Carnation", "Tulips", "Sunflowers"}, the price in order are {1.15, 1.5, 2.5, 2.75} the second category is vase sizes, {"Small", "Medium", "Large", "XLarge"}, the prices in order are {1.25, 2.5, 3.75, 4.5}. The last category is add ons, {"Teddy Bear" , "note", "ballon", "choclates"}. The prices are in order {10.0, 2.5, 5.75, 8.75} The list of products and the list of prices should be stores in 2 separate arrays. Create a method "display" that accepts 2 arrays as parameters and displays the product and the prices in receipt form. Create another method "sum" that displays the total for each category.
- Write a program that uses a bar chart to display the percentagesof the overall market share represented by Apple, HTC, Samsung, andOthers, as shown in Figure . Suppose that Apple takes 20 percent and isdisplayed in red, HTC takes 26 percent and is displayed in blue, Samsung takes28 percent and is displayed in green, and the Others take 26 and are displayedin orange. Use the Rectangle class to display the bars. Interested readers mayexplore the JavaFX BarChart class for further study.Write a Java program that allows user to play Rock, Paper and Scissors game with a computer based on the exercise we did in class (which is posted on Moodle). You can refer to Powerpoint Slide #46 to use integers 0, 1, and 2 to represent rock, paper and scissors. At the beginning your program displays a welcome message "Welcome to Rock, Paper and Scissors game with my Computer", it then asks the user to enter his/her choice (only one of the choices: rock, paper and scissors is allowed). You can use a do... while loop to check the validity of the user input. Then your program use a random number generator to pick rock, or paper or scissors for the computer and displays computer’s pick. After that your program displays the result (either you win, or lose or a draw). After one game, your program asks user if he/she wants to continue. If the user decides to stop playing, your program displays how many games you played and how many time you win, lose and tie, and displays a "Thank you for…Write a program in java Write a program that asks the user to enter five test scores. The program should displaya letter grade for each score and the average test score. Write the following methods inthe program:• calcAverage—This method should accept five test scores as arguments and return theaverage of the scores.• determineGrade—This method should accept a test score as an argument and return aletter grade for the score, based on the following grading scale:(attached photo)
- A company has 5 stores {1, 2, 3, 4, 5}. The sales for each store is as follows: {200, 300, 400, 500, 600}. The tax rate is 6% Write a java program that: Print the sales tax for the entire companyjava Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (0, 0) with width 10 and height 5. For example, (2, 2) is inside the rectangle and (6, 4) is outside the rectangle, as shown in the Figure. (Hint: A point is in the rectangle if its horizontal distance to (0, 0) is less than or equal to 10 / 2 and its vertical distance to (0, 0) is less than or equal to 5 / 2.) Here are sample runs of the program: Sample 1: Enter a point with two coordinates: 2 2 Point (2.0, 2.0) is in the rectangle Sample 2: Enter a point with two coordinates: 6 4 Point (6.0, 4.0) is not in the rectangle Analysis: (Describe the problem including input and output in your own words.) Design: (Describe the major steps for solving the problem.) Coding: (Go over your code step by step) Testing: (Describe how you test this program). In other words run your code with sample outputs.Write a complete Java program that prints out the following information: Ask the user to enter the last three numbers of the student ID. Read the input and store it in a suitable variable. Find and print the Square root of the inputted number, using a Math function. The class name should be your Name. Note: Your answer should have the code as text, as well as a screenshot of the code with the output. The inputted number should be the last three digits of your Student ID number. Name is Rabab ID is 190058401
- Write a complete Java program that prints out the following information: Declare a String object and a variable to store your first name and ID. Display your name and student ID in two separate lines using one println() Replace your name with your father's name using the assignment operator and print the result. Display the course name, course code, and your grade in a tabular format. (e.g., course name course code grade computer programing CS140 A ). Note: The class name of your Java program must be your first name. Your answer should have the code as text as well as the screenshot of the program output (using your own name and student ID) as a part of your answer. Otherwise, zero marks will be awarded. A typical run of the programThis question is based on Java Programming language. The below java code, displays the calendar for a given month of the year. The program prompts the user to enter the year and the month, then displays the entire calendar for the month. Can you explain the code and its functions ? you can explain in paragraph or point form. //Java code // Header file to take user input import java.util.Scanner; //main class public class Main { //method is used to check days for the month public static int dayOfMonth(int mon, int day, int yr) { int y = yr - (14 - mon) / 12; int x = y + y/4 - y/100 + y/400; int m = mon + 12 * ((14 - mon) / 12) - 2; int d = (day + x + (31*m)/12) % 7; return d; //return day of month } //function is used to check whether the year is leap year or not public static boolean leapYear(int yr) { //check using if-else if ((yr % 4 == 0) && (yr % 100 != 0)) return true; //return true if not a leapYear if (yr % 400 == 0) return true; //return true if not a leapYear…in Java Write a program that establishes two savings accounts with saver1 having account number10002 with an initial balance of $2,000, and saver2 having account 10003 with an initialbalance of $3,000. Set a common rate of interest at 5% per year. At the end of each month,update the balance by adding one month’s interest to the balance, so that the balancecompounds monthly. Print an output that displays the month number and the account numberand the balance for each of the two accounts. Use month 0 to display the initial balances, month1 to display the balances after the first month’s interest, and so on. At the end of the year,display the total balance for both accounts combined, like this:Output:Monthly balances for one year with 0.05 annual interest:Month Account # Balance Account # Balance----- --------- ------- --------- ------- 0 10002 2000.00 10003 3000.00 1 10002 2008.33 10003 3012.50 2 10002 2016.70 10003 3025.05 3 10002 2025.10 10003 3037.66 4 10002 2033.54 10003 3050.31 5…