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

  Writing a program to calculate the terms

The third programming project involves writing a program to calculate the terms of the following sequence of numbers: 0 1 2 5 12 29 ... where each term of the sequence is twice the previous term plus the second previous term. The 0th term of the s..

  User-defined methods

You will create the ShoutBox class for your Virtual World. Your ShoutBox class will have a shoutOutCannedMessage() method that returns a String type.

  Write a class that has three overloaded static methods

Write a class that has three overloaded static methods for calculating the areas of the following geometric shapes

  Write a class called palatine

Write a class called palatine that converts an STL string into Pig Latin form. The rules for converting a string into Pig Latin are as follows.

  Integer elements from an array

Suppose this same system has a TLB (Translation Lookaside Buffer) with 32 entries. Furthermore, suppose that a program contains instructions that fit into one page and it sequentially reads long integer elements from an array that spans thou- sand..

  Writing a program to calculate state income tax

The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income..

  Create a driver class in java

Your project is to create a driver class that uses SuperJavaIceCreamClass.

  Develops algorithms for problem solving

The graduate designs and develops algorithms for problem solving and implements those algorithms using appropriate program code.

  Various ways of exception handling

Various ways of exception handling

  Write java program to store values retrieved from user-array

Write a Java program named Arrays6_2GF.java Use an array to store values retrieved from user input. The number of integers to be entered (the length of the array )should also be retrieved through user input.

  Explain polymorphism

Explain polymorphism. Do all programming languages have polymorphism, and why or why not? Why is it useful and identify situations where polymorphic behavior would be absolutely necessary

  Develop a java application for the local library

You have been requested to develop a Java application for the local library as part of an upgrade initiative. As in all libraries, this is a place where one can check out books

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