Implement a programme that reads an integer value

Assignment Help Computer Engineering
Reference no: EM13328536

Assignment Criteria: 1-3

NB: as you complete each program task, demonstrate the program to your tutor and get your tutor to sign the assignment log sheet. Do not leave it all to last moment. No signed Log, No grade.

Task 1: (1.1-1.3; 2.1-2.5; 3.1-3.3)

Design and implement a programme that reads an integer value and prints the sum of all even integers between 1 and the input value inclusive, as well as the sum of all odd integers.

The programme should print the input value, sum of even integers, sum of odd integers and sum of both odd and even numbers. (Use selection and loop)

 

Task 2: (1.1-1.3; 2.1-2.5; 3.1-3.3)

The Packing Company wants a program for their Orders Department to calculate and display the price of an order. The order clerks enter the number of the units ordered, whether a customer is a wholesaler or retailer (the clerk enter W for wholesaler and R for retailer), and whether or not the customer is a special customer. If the customer is a special customer the company offers 10% discount on the total order. Use a variety of controls for this data entry. The price the customer pays per unit depends on these three things. The prices are as follows: (use nested ifs OR switch case)

Wholesalers

Retailers

No. Units

Price per unit £

No. Units

Price per unit £

1- 6

50

1-4

60

7-11

40

5-9

50

12-21

30

10-15

40

22-60

20

16-50

30

Over 60

15

Over 50

25

 

Task 3: (1.1-1.3; 2.1-2.5; 3.1-3.3)

Write a program that asks the user to enter a total of three decimal numbers. After the numbers are entered, the program should ask the user to do the following: Enter 1 to find the maximum of three numbers, enter 2 to find the minimum, or enter 3 to find the average. The result should be displayed along with the three original numbers. (Use method)

 

Task 4: (1.1-1.3; 2.1-2.5; 3.1-3.3)

Create a Java application to calculate and display the cost of a number of rolls of wallpaper according to the rules:

  1.  
    • £5 per roll for woodchip paper (type = 1)

    • £10 per roll for contemporary pattern paper (type = 2)

    • £15 per roll for traditional pattern paper (type = 3)

    • £30 per roll for high quality embossed paper (type = 4)

The customer enters two whole numbers type andnumber (the number of rolls required) and the program should calculate and display the cost of that number of rolls of wallpaper for the customer.

You are required to check that the customer will enter the input correctly as whole numbers.

The program allows the customer to get the cost of many rolls types. (Verify input as whole number)

 

Documentation to be submitted

For Task 1, 2, 3 & 4

  1. Identify the user requirements (i.e. input, output and process)[AC:1.1-1.2]

  2. Explain and justify the variables or constants used. [AC:2.1]

  3. Design of code (Pseudocode or JSD)[AC: 1.3;2.2-2.3]

  4. Code listing [AC: 2.1-2.5].

  5. Suitable set of test data with expected and actual results.Explain appropriate action carried out to correct programs errors.[AC:3.1-3.3]

  6. Evidence should include table of test data. (Provide screen prints of at least 2 actual results for each task).

Reference no: EM13328536

Questions Cloud

Explain the costs involved in the creation of the system : During a conversation at a family dinner, she mentions her frustration with having to manually track and reorder high demand items. She would like an automated system but has a very small budget.
Determine how much should dr j set aside from today : Dr. J. wants to buy a Dell computer which will cost $3,000 three years from today. He would like to set aside an equal amount at the end of each year in order to accumulate the amount needed.
Determine the advertising budget allocation : Develop a model that can be used to determine the advertising budget allocation for the Flamingo Grill - plan an advertising campaign for the coming season, Flamingo's management team hired the advertising firm of Haskell and Johnson
Calculate the mass flow rate of blood in the aorta : If the human aorta has a cross-sectional area of 2.5 cm2 and the flow speed of blood in the aorta is 30 cm/s while the density of blood is 1.05 g/cm3. Calculate the mass flow rate of blood (in g/s) in the aorta
Implement a programme that reads an integer value : Design and implement a programme that reads an integer value and prints the sum of all even integers between 1 and the input value inclusive, as well as the sum of all odd integers.
Potential sources and reactions : Please state the necessary background information for the following medical alerts. So state the potential sources, reactions and what the care provider can do to help for each.
What is the buoyancy force on the object : A block is suspended from a string connected to a balance. While in air, the scale reads 350 N. What is the buoyancy force on the object when immersed in water
Property destruction by the firefighter : Carl applies for fire insurance for his house. Before the application is processed, Carl's house burns down. Carl will have coverage if the insurance company
What does the npv decision rule indicate for the project : Diagram the cash flows for the project using a time line. For each of Years 1 through 5, include the following data on your diagram (in this order) : EBIT, tax, depreciation, Operating Cash Flow (OCF), and discounted OCF.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Peer-to-peer networking

Explain the term peer-to-peer networking? Describe why is bit torrent regarded to be a more efficient protocol? In the bit torrent context, explain how seeders and the leechers work.

  Define different career tracks within information technology

The range of information technology (IT) jobs is extensive, but all IT professionals focus on improving usability and the efficiency of technological systems and processes.

  What is difference between client and a server

What are the differences between client and a server. What is function of each layer in a three-layer application?

  Determine the period of the signal

Determine the period of the signal. Be sure to mention the units of the period, describe this signal in a complex exponential form and write the mathematical expression that describes the signal that will come out of the LTI system.

  Provide a java class named "input"

Provide a Java class named "Input" containing the method "readInt" (prototype given below) that displays the prompt string, reads an integer, and tests either it is between the supplied minimum and maximum. If not, it prints an error message and r..

  Ethernet mac address

Specify the size of Ethernet MAC addresses. State the Ethernet MAC broadcast address. Explain the format of the Ethernet frame?

  Determining pearson correlation coefficient

Determining the Pearson correlation coefficient you need to write down the program computing Pearson correlation coefficient utilizing the parallel loop templates from the Intel Threading Building Blocks library (TBB).

  Developing a pseudocode and the flowchart

Develop a flowchart and write down the psuedocode for the following: A program which prints every number from 1 through 10. A program which prints every number from 1 through 10 along with its square and cube.

  Describing the penetration test

By using the MS Word, write down the three-page summary explaining a successful penetration test. Which penetration tools and techniques do you think would be required in the successful penetration test.

  Stop-and-wait arq

Assume that each router utilizes the stop-and-wait ARQ and offer one buffer (large enough for one packet) for every VC in every direction of traffic.

  Estimaitng the cost of ordering and management

If company utilizing the best inventory policy, what would be the total cost of ordering and management?

  Prepare an opening statement that specifies organization

The graphically depicted solution is not included in the required page length. Explain what the client can expect from your services.

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