Write a program called checkpassfail

Assignment Help Basic Computer Science
Reference no: EM13985179

Business Computer Languages

Q1. Identify and correct the error(s) in each of the following:

a) if (1 <= x <= 10)

System.out.println(x);

b) if (x = 1)

y++;

else if (x = 2)

y = y + 2;

c) final double CM_PER_INCH = 2.54;

CM_PER_INCH = 2.55;

Q2. What are the values of the following expressions? In each line, assume that

1. What are the values of the following expressions?  In each line assume that

double  X = 2.5,  Y = -1.5;
int  M = 18,  N = 4;
String  S = "Hello",  T = "World";

i)  X + N * Y - ( X + N ) * Y

ii) M / N + M % N

iii) 5 * X - N / 5

iv) S + T

v)  S + N

vi) ( 1 - ( 1 - ( 1 - ( 1 - N ))))

Q3. Write a program called CheckPassFail which read the mark from user and prints "PASS" if the mark is more than or equal to 60; or prints "FAIL" otherwise.

Reference no: EM13985179

Questions Cloud

How do stakeholders define ethical issues in business : How do stakeholders define ethical issues in business? Can stakeholders influence ethical decision in business?
Find the thermal resistance of each cube : Two metal cubes, one copper (Cu) and one aluminum (Al), with 4 cm edges are arranged as shown in Figure 1. Find (j) the thermal resistance of each cube, (ii) the thermal resistance of the two-cube system, (iii) the thermal current I and (iv) the t..
What was the original amount of uranium-235 in the rock : A rock is found to contain 2.2 grams of uranium-235, a radioactive isotope. If the rock has undergone 2.75 half lives, what was the original amount of uranium-235 in the rock and how old is the rock?
Calculate the projects npv : Calculate the value of the option if the company waits one year. Should the company wait or go ahead with the project now?
Write a program called checkpassfail : Write a program called CheckPassFail which read the mark from user and prints "PASS" if the mark is more than or equal to 60; or prints "FAIL" otherwise.
Calculate the current value of the company : Calculate the current value of the company's stock, using equation: Price per share = Vs/shares outstanding
Unique characteristics of the russian culture : What are some unique characteristics of the Russian culture that make cyberspace issues more challenging - do Russia and China do enough in the cyberspace area?
What is the photon energy in joules : Calculate the carrier frequency and corresponding frequency bandwidth for a microwave communication system operating at 10 cm with a microwave bandwidth of 0.2 mm and for an optical communication system operating at 1.35 micrometers with an optical b..
What absolute temperature will the ends touch : Again starting at 293 K, the steel rod is replaced by a brass rod 1.92 m long, also placed 0.6 cm from the aluminum rod and clamped tight on its other end. At what absolute temperature will the two rods touch?

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Systems analyst modifying the sales order process

Suppose that you are a systems analyst on a project that involves modifying the sales order process. How many do you need to sample if you want 95 percent certainty that you have covered all variations?

  Describes the system administration task

Your company is currently planning to automate many different system administration tasks. Your manager has asked you to research a system administration task and implement it using VBScript. In addition, your manager would like to see both a proposa..

  Bringing t into the fundamental domain

Let T = (9 + i )/ 10.Find the transformation in the modular group that brings it into a point To of the fundamental domain :F0 • Show that the transformation is unique by proving that there is no transformation  in the modular group (except  the id..

  Textbook ordering system deployment diagram

System architects and analysts use unified modeling language (UML) deployment diagrams to model the configuration of the hardware and software components of a system and how they will be deployed in a production environment. In other words, dep..

  Explain implications of copyrights on usage of web site

Study and explain copyright implications associated to Web site development. Write down minimum of 350 words explaining the implications of copyrights on usage of content on Web site.

  Design a file system checker for our file system

Design a file system checker for our file system. You should call it csefsck. It will have to do the following: The DeviceID is correct All times are in the past, nothing in the future Validate that the free block list is accurate this includ..

  Clearly labeled with a cancer warning question

In March 2012, the state of California started requiring that all packaging for food and drink with the additive 4-methylimidazole (4-MI) be clearly labeled with a cancer warning. Because of this, both Pepsi and Coke changed their formula to elimi..

  Computing days take for fine to reach d dollars

In the recent court case, a judge cited the city for contempt and ordered fine of $2 for first day. Each subsequent day, till the city followed judge's order, fine was squared.

  Possesses some finite amount of magical energy

A spellcaster is given an object (e.g. mouse, owl, dwarf, purse ...) and a set of spells that she / he can use to transform the object. The effect of each spell is described by a set of from-to pairs. For example, spell "Chiroptera" may transform ob..

  The digital system usually operated

1) The digital system usually operated on .........system. (a) binary (b) decimal (c)octal (d) hexadecimal 2)The First Microprocessor was__________

  What was business impact of tjx-s data loss on tjx

What was the business impact of TJX's data loss on TJX, consumers and banks and how effectively did TJX deal with these problems?

  Demonstrate the capacity to communicate clearly with stake

Demonstrate the capacity to communicate clearly with stakeholders a range of options that should be considered by a business in an online environment and the ability to apply appropriate structure and referencing formats

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd