Write a script that inputs several lines of text

Assignment Help JAVA Programming
Reference no: EM131149261

Programming Exercise

1. Write JavaScript statements to accomplish each of the following tasks:

a) Display the value of the seventh element of array f.
b) Initialize each of the five elements of one-dimensional array g to 8.
c) Total the elements of array c, which contains 100 numeric elements.
d) Copy 11-element array a into the first portion of array b, which contains 34 elements.
e) Determine and print the smallest and largest values contained in 99-element floating point array w.

2. Use a one-dimensional array to solve the following problem: A company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9 percent of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9 percent of $5000, or a total of $650. Write a script (using an array of counters) that obtains the gross sales for each employee through an HTML5 form and determines how many of the salespeople earned salaries in each of the following ranges (assume that each salesperson's salary is truncated to an integer amount):

a) $200-299
b) $300-399
c) $400-499
d) $500-599
e) $600-699
f) $700-799
g) $800-899
h) $900-999
i) $1000 and over

3. Write a script that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text.

4. Write a script based on the program in Exercise 11.13 that inputs several lines of text and uses String method indexOf to determine the total number of occurrences of each letter of the alphabet in the text. Uppercase and lowercase letters should be counted together. Store the totals for each letter in an array, and print the values in tabular format in an HTML5 textarea after the totals have been determined.

Reference no: EM131149261

Questions Cloud

Write a css rule that changes the color of all elements : Write a CSS rule that changes the color of all elements containing attribute class = "green-Move" to green and shifts them down 25 pixels and right 15 pixels.
What kind of working conditions will you have : Consider your ultimate career goal.- What kind of working conditions will you have?- Does your future career have a union?
What obstacles has this person encountered as a leader : In what ways is this person a leader? In what ways is this person a manager? What different leadership roles and functions does this person fulfill? How are these roles similar? How are they different?
Is the climate a social issue : Is the climate a social issue? Some say that the climate is warming, that man is causing it, that the science on the matter is settled, and that the results will be catastrophic if we don't make radical global interventions. Do you think the sci..
Write a script that inputs several lines of text : Write a script that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text.
Prepare a research paper on feminist or care ethics : repare a three-page research paper on feminist/care ethics and do the following: - Define feminist/care ethics.- Provide a brief history on the subject.
What is the fund net asset value : The Capitalist Mutual Fund's portfolio is valued at $48 million. The fund has liabilities of $4 million, and the investment company sponsoring the fund has issued 1,600,000 shares. What is the fund's net asset value
What is the grammar and sentence structure like : Consider what you read in the Unit III lecture concerning exegesis. Take into consideration every element that might affect how you interpret the piece of text for your art. What is your cultural lens through which you are reading the text? (Think..
Should the behavior be fixed : Choose a deviant behavior (based on society and not religion) and research it online. Discuss this behavior using Strain Theory, Cultural Transmission Theory, or Differential Association Theory. Should the behavior be "fixed?" Why, or why not?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Part a -code comprehensionusing the uncommented sample code

part a -code comprehensionusing the uncommented sample code has been provided in moodleanswer the following questions1.

  Discuss the good and the bad of javascript libraries

Discuss the good and the bad of JavaScript Libraries. In what circumstances would you use Libraries? Describe what design measures you will incorporate in your web sites to assure web site security? Provide some examples.

  Requests the user to enter a value

Requests the user to enter a value, and searches the array to find a matching value. If there is a match, display Match; otherwise, display No Match.Display only one message at the end of the search.Write the code so the search stops when a match is ..

  What are the concerns about how java implements arrays

What are the concerns about how Java implements arrays? What are your concerns? In Java, what is the starting index of an array

  Details about the consultants and projects

A consulting firm maintains a database of its employees (a number of consultants) and a list of projects it has accomplished, has been developing, and is about to start. Details about the consultants and projects are given below:

  Java program which, given three sides of a triangle

Produce a Java program which, given three sides of a triangle, determines whether the triangle is:

  Sorted list adt and the binary search tree adt

Explain the differences between our specifications of the Sorted List ADT and the Binary Search Tree ADT.

  Calculate the final grade

write must ask the user to input the percent score for each of these items then calculate the final grade.

  Write java code to read integers from an input file

write java code to read integers from an input file and write only the odd numbers to an output file. the two file names will be provided on the command line as the input file followed by the output file.

  Traditionally-nutrition programs were targeted to indigent

Traditionally, nutrition programs were targeted to the indigent and poor populations in developing countries. Many of today's Americans are malnourished also, but they are glutted with a wealth of unhealthy foods and require a multidisciplinary appro..

  Luminous jewels - the polishing game

Once a jewel type is removed from the necklace, all other instances of the same jewel type is treated as polished by the person who removed the jewel

  What is overloading and what is overriding

What is overloading and what is overriding? Wrtie JAVA code code to explain it.

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