Write a java program that stores integers

Assignment Help Basic Computer Science
Reference no: EM132301413

1. Write array declarations for the following:

a. 60 double interest rates. How do you reference the 3rd element?

b. 20 integer scores. How do you reference the last element?

c. 25 characters, each representing a code. How do you reference the first element?

2. Write a Java program to input 4 values into an array named prices. After the data has been entered by the user, have your program output the values. Now output the values in reverse order.

3. Write a java program that stores these integers 10, 20, 30, 40, 20 in an array named nums. Write the code to count all the occurrences of 20 and then display the count.

Add the code to create a new integer array that has twice the number of elements as nums and assign the values in nums to the new array. Display the new array.

Try to think of a way for the program to calculate twice the number of elements for the new array.

4. Write a program that declares three arrays named price, qty, and amt. Each array should be declared in main() and capable of holding 3 values. Make up numbers for price and quantity.  

Write a method to fill the amt array with the product of the corresponding elements in price and qty.  

Display the values in the amt array in main.

This problem will be useful when you work on Project Five.

5. Go back to your Zeller's code. Set up an array like this:

String [] day = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

Replace the switch to display the day with a one statement System.out.printlnjQuery22407234776868287549_1556481381981?.

Reference no: EM132301413

Questions Cloud

Describe the characteristics of ideal computer : What would you use it for? Would you choose a handheld, portable, desktop or workstation computer? Why?
Why are job-internship fairs beneficial for college students : Explain why are job and internship fairs beneficial for college students.
Draw a diagram for a non-deterministic finite state : Draw a diagram for a non-deterministic finite state machine for the language L = { w e {a,b,c}* : w contains aabbcc}
Discuss some hardening techniques or products : Discuss some hardening techniques or products you have used for Workstations.
Write a java program that stores integers : Write a java program that stores these integers 10, 20, 30, 40, 20 in an array named nums. Write the code to count all the occurrences of 20 and then display
Describe controversial corporate social responsibility : Specify one (1) controversial corporate social responsibility concern associated with your company. Submit a reference page with at least four (4) quality.
Database tables using sql data definition language : Please also explain how to create Oracle database tables using SQL Data Definition Language (DDL) for each table listed in the metadata.
Vendor names and email addresses : Create a program that keeps vendor names and email addresses in a dictionary as key-value pairs. The key should be vendor name.
Discuss how you decide to schedule your school assignments : Discuss how you decide to schedule your school assignments. Do your informal scheduling rules correspond to any of the rules described in this chapter?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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