Task 1a define and describe the steps to program

Assignment Help JAVA Programming
Reference no: EM13374869

Task 1

A. Define and describe the steps to program development.

B. What is an Algorithm? Discuss and provide examples (using psuedocode).

C. How do you put JavaScript into a web page? Explain.

Task 2

A program is required to read in the maximum and minimum temperatures on a particular day and calculate and print the average temperature. Develop the psuedocode to perform this task. Desk Check your solution.

Task 3

A program is required by a company to read an employee's number, pay rate and the number of hours worked in a week. The program is then to compute the employee's weekly pay and print it along with the input data. According to the company's rules, no employee may be paid for more than 60 hours per week and the maximum hourly rate is $25.00 per hour. If more than 35 hours are worked then payment for the overtime hours worked is calculated at time a half. If the hours worked field or the hourly rate field is out of range, then the input data and an appropriate message is to be printed and the employee's pay is not to be calculated

Task 4

A temperature file consists of fifteen records, each containing a temperature in degrees Fahrenheit. A program is to be written which will read and print both temperatures in two columns on a report. Column headings, which read ‘Degrees F' and ‘Degrees C', are to be
printed at the top of the page.

Task 5

Develop JavaScript code that prints current date in the top right corner of your Web page

Task 6

Outline what each of the following code segments does:

A.
<script type="text/javascript">
// Popup window code
function newPopup(url) {
popupWindow = window.open(

url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
}
</script>

<script language="javascript" type="text/javascript" >
<!-- hide
function jumpto(x){

if (document.form1.jumpmenu.value != "null") {
document.location.href = x
}
}

// end hide -->
</script>
<form name="form1">
<select name="jumpmenu"
onChange="jumpto(document.form1.jumpmenu.options[document.form1.jumpmenu.options.s
electedIndex].value)">
<option>Jump to...</option>
<option value=https://www.test.com> Homepage</option>
<option value=https://www.test.com/javascript/>JavaScript</option>
<option value=https://www.test.com/html/>HTML</option>
<option value=https://www.test.com/css/>CSS</option>
<option value=https://www.test.com/sql/tutorial/>SQL</option>
<option value=https://www.test.com/database/tutorial/>Database Tutorial</option>
<option value=https://www.test.com/web_hosting/>Web Hosting Tutorial</option>
</select>
</form>
<p style="font-family:verdana,arial,sans-serif;font-size:10px;color:#999;">Codes by <a
href="https://www.test.com">Test</a>

C.
<a href="JavaScript:window.print();">Print this page</a>

D.
<a href="JavaScript:window.print();"><img src="/pix/printer_icon.gif" border="0" width="17"
height="17" align="middle" alt="Print Version" /></a>

E.
<input type="button" onclick="alert('Wow... you sure do know how to click!');" value="Click
me..." />

F.
<script type="text/javascript">
function confirmHappy()
{
var happiness=confirm("Are you sure you're happy?");
if (happiness==true)
{
alert("Wow! You seem really happy!");


}
else
{
alert("You should get out more!");
}
}
</script>
<input type="button" onclick="confirmHappy()" value="If you're happy and you know it, click me..." />

G.
<script type="text/javascript">
function displayPrompt()
{
var name=prompt("What's your name?","Homer");
if (name!=null && name!="")
{
alert("Well " + name + ". You seem very daring!");
}
else
{
alert("Hey, I asked you your name!");
}
}
</script>
<input type="button" onclick="displayPrompt()" value="I dare you to click me!" />

H.
<a href="https://www.test.com/html/codes/" onMouseover="JavaScript:window.status='Get your HTML codes here!'; return true;"onMouseout="JavaScript:window.status=''; return true">Hover over me!</a>

I.
<script type="text/JavaScript">
<!--
function timedRedirect(redirectTo, timeoutPeriod) {
setTimeout("location.href = redirectTo;",timeoutPeriod);
}
// -->
</script>
<a href="JavaScript:void(0);"
onclick="JavaScript:timedRedirect(redirectTo='https://www.test.com/html/examples/', timeoutPeriod='2000')">Redirect in 2 seconds...</a>

J.
<script type="text/JavaScript">

function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
</script>
<p><a href="javascript:timedRefresh(3000)">Refresh this page in 3 seconds...</a></p>

Task 7
Create a JavaScript clock using functions where appropriate.

Task 8

Create a Multiplication Table Using Nested Loops.

Task 9

Given the following code:
var n = prompt("Check your number", "Type your number here");
n = parseInt(n);
if (isNaN(n))
{
alert("The input cannot be parsed to a number");
}
else
{
if (n == 0)
{
alert("The number is zero");
}
else if (n%2)
{
alert("The number is odd");
}
else
{
alert("The number is even");
}
}

Answer the following questions:

1. With which object would you associate the prompt() method?

2. Prompt() takes two arguments. Where are they displayed?

3. The input from a prompt() is of which data type?

4. What is the function of parseFloat() and parseInt()?

5. What will be result if we send "abcd" through a prompt() input and pass it through parseInt()?

6. What is the use of isNaN()?

Reference no: EM13374869

Questions Cloud

Would each of the following groups be happy or unhappy if : would each of the following groups be happy or unhappy if the u.s. dollar appreciated? explain. problems and
Students are reminded to read pages related to assessment : students are reminded to read pages related to assessment rules including rules for dishonest work in the bcs student
Descriptionbull complete this assignment in groups of 4-5 : descriptionbull complete this assignment in groups of 4-5 students. bull maintain a portfolio of financial issues taken
Project title high alcohol consumption and physical : project title high alcohol consumption and physical violence inflicted by fathers on young australian mothers.project
Task 1a define and describe the steps to program : task 1a. define and describe the steps to program development.b. what is an algorithm? discuss and provide examples
1 consider a macroeconomy was initially at equilibrium : 1. consider a macroeconomy was initially at equilibrium level.nbsp using the short run aggregate demand and aggregate
Task 1 individual assignment - problem solving : task 1 individual assignment - problem solving assignmentnbsptop juices pty ltd case studynbspyou have been operating a
Part 1 george ltd manufactures two types of coils used in : part 1 george ltd manufactures two types of coils used in electric motors. the two types are nbspc20 and d40. they both
Part a international standards on auditing isa have been : part a international standards on auditing isa have been approved by the international auditing and assurance board

Reviews

Write a Review

JAVA Programming Questions & Answers

  Java project

Prompt the user for an int between lower and upper boundary.

  Write an application that uses an array

Write an application that uses an Array to store 10 messages of type String. You will store this Array with 10 messages of your choosing.

  Productexception class whose constructor

Create a ProductException class whose constructor receives a String that consists of a product number and price. Save the file as ProductException.java. Create a Product class with two fields, productNum and price. The Product constructor requires va..

  Java program on eclipse

Using a while( true ) loop,and using the upper case alphabeth from Z to A,print the lower case alphabeth and its corresponding ascii values.You must terminate/exit/break this loop once you process the last letter (A).

  standard graph with four quadrant

Write a program in java that asks the user for values of x and y, and displays the point as an ordered pair along with a message that describes where that point falls on the standard graph with four quadrant.

  Technical community blog

Write a blog article for a coding and technical community blog.

  The code must take into account

The code must take into account leap year and adding or subtracting between years. Write two additional methods that you come with on your own as well.

  Develop a gui based java program

Designing and developing a College Registration program

  Write an application that reads determines the surface area

Write a program that uses the top five countries' National Wealth to calculate the average of those five countries.

  Write java program to print price of table-furniture company

Write down the Java program for furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany. Illustrate the price of table produced with chosen wood.

  Use a gui interface to control and display result of program

The scenario is inspired by a Library Management System (LIMS). For the first version of the project, the LIMS is a very basic one, allowing just for the import of data from a text file and perfom some basic search operations.

  Addressed with attributable risk

Which of the following questions is addressed with attributable risk?

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