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

  The main method must repeatedly have the use

After the method is defined, the main method must repeatedly have the user enter 3 integers, call the triangleType method and display the return type. Be sure not to have an infinite loop by allowing the user to quit.

  Mvc pattern and servlet

When you use the MVC pattern, the controller directs the flow of control to

  Prepare a program that constructs a binary tree and

prepare a program that constructs a binary tree and traverses the tree in pre-order in-order and post-order methods.

  Write a java program that (1) defines a base/super class a

Write a Java program that (1) Defines a base/super class A, a subclass B (inherits from A), and a subclass C (inherits from B). The A class must have a method f() which is not implemented in A,

  Die class that can hold an integer

Design a die class that can hold an integer from 1 to 6. use the dice class to create a dice game. in this game, the user chooses a number between 2 and 12 inclusive

  Adt for a two color double stack adt consists of two stacks

design an adt for a two color double stack adt that consists of two stacks one red and one blue and has its operations color coded versions of the regular stack adt operations.

  Evaluate the rtas resource requirements

Design and implement a set of classes and interfaces and use them to evaluate the RTA's resource requirements.

  Write a program to track hourly employee arrival

A company hires you to write a program to track hourly employee arrival and departure times from work. In essence, you are tasked to make an online time clock.

  What are some debugging techniques for javascript

What are some common programming errors? How can they be prevented? What is the try catch structure, how is it useful? What are some debugging techniques for JavaScript?

  Write a java program that uses a search tree of strings

Write a Java program that uses a search tree of strings to sort text lines in alphabetic order. You may choose how you de?ne alphabetic order as long as there is some sense in the de?nition. You may also choose what kind of tree you use.

  Java program by array

Write a program that reads in a file that contains one integer per line. Each integer represents one location in the image. Assume that there are 64 rows and 64 columns in the image

  Write program using a switch statement that display polygon

Write a program using a switch statement that displays the name of a polygon with sides between 3 and 12 depending on the number entered by the user

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