Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

1. Choose any everyday action and prepare a specific, clear, and precise algorithm for it, in English. Be sure to take the approach that whomever is going to perform the algorithm know nothing about the process. You may number the different steps, if needed. 

Post your algorithm ex as a REPLY to this message.


2.Construct and evaluate an arithmetic expression containing at least four different operators. Show each step that C++ would take to evaluate the expression, and the final answer that the expression would evaluate to (see ex on the bottom of page 43 in your textbook). 

Your expression must contain at least 4 different operators, including at least one division and one modulus (remainder) operator. 

Start with an expression that contains no parentheses. Then fully parenthesize the expression to show the operator precedence. Next show each step that would be taken to evaluate the expression and the final answer that the expression would evaluate to.


Post your arithmetic expression ex as a REPLY to this message.



Program #1
Assume a newspaper wants to display the sales in each quadrant of town.
The quadrant, number of customers, and sales are:
In the Northwest quadrant, 23 customers with sales of $ 345.00
In the Northeast quadrant, 156 customers with sales of $ 2111.11
In the Southwest quadrant, 9 customers with sales of $ 120.80
In the Southeast quadrant, 222 customers with sales of $3030.35
Requirements :
prepare a program, using output manipulators, to produce the following output exactly:
Output Notes:
??The Newspaper and Month values are aligned on the right.
??The 'T' of the "Town" column label appears in column 6 of console screen
(i.e. there are 5 spaces before the word "Town").
??The Number of Customers and Month's Sales values are rounded to 2 decimal places
and are aligned on the right.
Do not convert the Number of Customers and Sales values in the code to strings (e.g. "23" or
"345.00"). They should both be coded in the output statements as numbers (e.g. 23 and 345.00).
Minimally, you must use the setfill output manipulator to create and format the dividing lines, and
you must use the setw and setprecision output manipulators to format the numeric output in the
table.
No variables or constants should be used in this program.
Newspaper: Daily Herald
Month: June 2014
#===================================#
Town Number of Month's
Quadrant Customers Sales
#===================================#
Northwest 23 345.00
Northeast 156 2111.11
Southwest 9 120.80
Southeast 222 3030.35
#===================================#


Program #2
prepare a program that computes a bill for newspaper delivery for a charge period (weekly, monthly,
annually, etc).
The charge for the daily newspaper is 52 cents. The charge for a Sunday newspaper is 75 cents.
Customers may also tip a percentage of the monthly bill.
Since the number of days in a charge period varies, the program will need to do some calculations.
Prompt the user for the number of days in the charge period and a tip percentage. Use these figures
to find out the total bill.
For every 7 days, charge for 6 daily papers and 1 Sunday paper. Remaining days will be charged at
the daily rate. (Hint: Use the division operator (/) to determine the number of full weeks/Sundays,
and use the modulus operator (%) to determine the number of remaining days over the full weeks).
Requirements:
The program must:
??Define an integer constant that holds the number of daily papers in one week.
??Define two floating point constants that will hold:
o The cost of a daily newpaper
o The cost of a Sunday newspaper
??Define a string constant for the customer's name - use YOUR name
(e.g., "Samantha Washington")
??Define two character variables for the quadrant of town being served
o One will hold a character representing either the north or south side of town
- Initialize this value to 'S' for south, when you define it
o One will hold a character representing the east or west side of town
- Initialize this value to 'W' for west, when you define it
??Define an integer variable to store the number of days in the charge period
(read from the user)
??Define a floating point variable to store the tip rate (read from the user)
??Define five floating point variables to store parts of the total cost, the subtotal and the total.
o The cost of all Sunday papers
o The cost of all daily papers
o The newspaper subtotal
o The tip charge
o The total bill
©2014, Regis University
??Display a program description, followed a prompts and input statement to read number of
days in the charge period from the user.
Sample Input
??find out the newspaper costs and then the tip.
??Add all of the above together to determine the total.
??Add any other variable definitions or calculation statements you think are needed to perform
the task
??Display a few blank lines to separate the input from the output. Then use output
statements to display the results to the console, in the following format:
NOTES:
o The dollar figures in the totals column should all line up, aligned right, on the
decimal point.
o If the customer enters 0% for the tip, the tip displayed will be 0.00.
Documentation
1) For each program, be sure to include top of program comments
(as specified in course Content section 1.8) that include:
Your name, the course, and the assignment number
What the Program Does including:
What is Input
Processing/Calculations Performed
What is Output
Customer: Samantha Washington
Location: SW quadrant
Days in Period: 30
Tip Rate: 4.2%
Cost for daily papers 13.52
Cost for Sunday papers 3.00
---------
Newspaper Total 16.52
Tip for Carrier 0.69
---------
Total Billed to Customer 17.21
Newspaper Billing Program
Enter number of days in the charge period: 30
Enter tip percentage (e.g. 5.5 for 5.5% or 0 for none): 4.2
2) Clarifying comments beside constants and variable declarations
3) Inline clarifying documentation, as needed. 

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M986355

Have any Question?


Related Questions in Programming Language

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As