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

  Description of the purpose of each layer in brief

description of the purpose of each layer in brief. A report to describe the different layers of SOA and the need for each layer. Examples of three Web services. An annotated diagram showing the layers.

  Why organization that meets the company''s specifications

A software application has been delivered to your organization that meets the company's specifications. Using associated examples, describe problems which may arise when it is installed and used in your organization.

  Compare and contrast telnet and ftp

find out whether or not additional components could be added to the IPv4 protocol to enhance its usefulness.

  What a white box testing plan includes

A business letter addressed to the board of Jonesville Library introducing the contents of the document.

  Express what tool you used to change the password

Change the password of the CLASSMATE user to STUDENT using the console. Test your change by connecting to CLASSMATE in the SQL*Plus worksheet. Explain what tool you used to change the password. Save the explanation in a file.

  Find out for a well-known company

Review the code of ethics that you find for a well-known company. Based on research, analyze it to determine whether or not the company is complying with it.

  The shipping clerk at the rinky dooflingy company is faced

Write a program that reads the number of dooflingies to be shipped and displays the number of huge, large, medium, and small containers needed to send the shipment in the atleast number of containers and with the minimum amount of wasted space.

  Write an academic report as per the format outlined

The advantages and disadvantages to an organisation of using Cloud Computing, for example, the potential to reduce costs, the risk of making the organisation's data more vulnerable to hacking.

  The purchase of hardware for the organization

What are important considerations for an organization to make while disposing of old computer equipment.

  Generating the crow’s foot erd

Provided the following business scenario, generate a Crow’s Foot ERD utilizing a specialization hierarchy if suitable. Tiny Hospital keeps the information on patients and the hospital rooms.

  Would this proposed solution meet the requirements

Your company has just occupied an old historic building in which 15 employees will work. because of historic building codes, the company is not permitted to run cables inside walls or ceilings.

  How to write basic structure of an exception handler

How to write basic structure of an Exception handler a. generate an abstract class Furniture b. Declare an abstract process Discount the returns no value but accepts the cost of item

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