Welcome to calculator program

Assignment Help Basic Computer Science
Reference no: EM131910471

1 Complete Java program with the following specifications:

  • Display a welcoming message such as: "Welcome to Calculator Program!"
  • Prompt the user twice to enter two positive whole numbers, indicating first and second values, first value being smaller than the second one
  • Calculate the square and cube of each number from first value to second value inclusive and then display an appropriately headered three column table with each row containing the number, its square and its cube respectively
  • Display a farewell message such as: "Goodbye, thank you for using our program!"

2 Complete Java program to calculate the total charge corresponding to purchase of books at a fictional annual book festival. The price of each book is based on its category as described below: 

  • Large print hardback books $10 each or three for $20
  • Small print hardback books $7 each or two for $10
  • All softcover books $5 each or five for $15

An example run of the program might look like the following (user input is shown in bold):

Welcome to the annual book festival!

Enter the number of large print hardback books purchased: 4

Enter the number of small print hardback books purchased: 6

Enter the number of softcover books purchased: 7

Your total bill is: $85

Would you like to calculate another bill (y/n)? y

Enter the number of large print hardback books purchased: 6

Enter the number of small print hardback books purchased: 0

Enter the number of softcover books purchased: 10

Your total bill is: $70

Would you like to calculate another bill (y/n)? n

Total sales in this session: $155

Goodbye!

Reference no: EM131910471

Questions Cloud

Describe the sales process in the employer-sponsored model : Discuss the influence of the Patient Protection and Affordable Care Act on ONE of the four areas: (a) marketing, (b) sales, (c) rating, and (d) underwriting.
Discuss reasons for mixing quantitative and qualitative data : Discuss the reason(s) for mixing both quantitative and qualitative data. Include the characteristics of a good qualitative purpose statement.
Payback period-profitability index-net present value : Calculate the payback period, profitability index, net present value, and inter-nal rate of return for the new strip mine.
Describe information systems functionalities in claims : Describe information systems functionalities in claims management and member services maintained by Managed Care Organizations (MCOs).
Welcome to calculator program : Display a welcoming message such as: "Welcome to Calculator Program!"
Bubble sort over a quick sort : 1. In what situations would you choose to use a bubble sort over a quick sort? Explain why.
What erm model would you recommendation for the company : Review Hoover's report on the National Interstate Corporation by using the Business Market Research Collection in the LIRN (see full reference below).
Evaluate the test market donatos used : Evaluate the test market Donatos used. What were its advantages and disadvantages?
How does social network apply to your personal information : Select a social network and summarize important points you learned about its privacy policy for environment. How does this apply to your personal information?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Discuss the role of the fomc

Discuss the role of the FOMC and the three major policies it implements to help regulate banks.

  What will be the values of h1 and h2

Consider two cache organizations both of them are using 32KB cache,32 bit physical address and 32B blocks. The 1st one is 2-way set associative cache, 2nd one is direct mapped cache

  What is the profitability index of the investment

The investment will cost you $ 8,975 today. If the appropriate Cost of Capital (quoted interest rate) is 8.8 %, what is the Profitability Index?

  What annual rate of return

What annual rate of return must you earn to achieve your financial goal?

  Discuss two security issues related to the researched

From the e-Activity, discuss two security issues related to the researched technologies. Select a Wi-Fi device you are familiar with and analyze the security protection currently implemented on the device. Speculate whether the protection on the se..

  Understanding linux system initialization and x windows

In Linux, a boot loader can locate and execute the kernel of the operating system, as well as performing other functions.

  Ddraw diagrams showing a conceptual view and a process view

Assume that the MHC-PMS is being developed using an object-oriented approach. Draw a use case diagram showing at least six possible use cases for this system.

  What is the mythical man concept

What is the mythical man concept and why is it important to project managers?

  Principles of good design and usability attributes

All assignments must be prepared in double-space format, 12 pt. type (preferably TimesRoman), and should include a title page, table of contents, and reference list. Allsubmitted work should contain student name and course number and term

  Consider an adt called square matrix

Consider an ADT called square matrix. (The Matrix can be represented by a two-dimensional array of integers with n rows and n columns)

  Social networking to make your organization more effective

How would you use social networking to make your organization more effective? If your organization currently uses a social networking tool, tell us which one and how you are using it. Even if your organization does not engage in social networking, is..

  Handling working capital and cash flow

Discuss the importance of financing to a new business, and describe best practices for handling working capital and cash flow for a new business.

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