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

  What is the starting index of an array

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

  Test plan outline a test plan for a substantial real-life

test plan outline a test plan for a substantial real-life system of your choosing. some possible examplesbullbaggage

  What are the diagrams defined in the uml standard

What are the diagrams defined in the UML Standard. Give a one or two sentence description of each one. Given the following code, how should the toString methods in the classes H2ClassA and H2ClassB be written to give the indicated output and take a..

  Describe an application that can deadlock

Describe an application that can deadlock, or starve a thread.

  Create dynamic web applications using javaserver pages

Analyze, design, develop, test, and deploy small-to-medium-scale Web applications and Create dynamic Web applications using JavaServer Pages (JSP) technology and Java Servlets

  Sets a loop to find 10 random generated

Write a java code that 1) uploads a file 2) sets a loop to find 10 random generated words from the file and then search those words by a. IndexSequential Method b. indexBinary Method. then, report how much time both methods took.

  Write portions of java class that models a very simple clock

You will be writing portions of a Java class that models a very simple clock. You will also be provided with two different "front ends" that use this same class as a plug-in - a simple program that loops through the time for a full hour of time.

  Loop structure

Suggest one (1) example of a problematic programming situation or scenario that the use or implementation of a loop structure could resolve. Justify your response

  Function using javascript syntax to compute gross pay

Write a function using JavaScript syntax to compute a person's gross pay for a week. The function must receive the number of hours worked and the rate of pay per hour.

  Write a console program with java

Programming exercises are a key component of learning any programming language

  Write a program that will prompt the user for a file name

Write a program that will prompt the user for a file name and open that file for reading. Print out all the information in the file, numbering each new line of text.

  Write java program that calculates total order for customer

Write a Java program that calculates the total order for a customer. The order should include the details of buying several products. For each product (item), there should be a product code, product price, product description, and product icon.

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