Jump to content

Recent Status Updates

  • Photo
      15 Nov

    Hi, I am final year Interior Design Student from University of Huddersfield. I am currently working on my final major project which is going to be linked to coding. I was hoping that you could help me with my research. I have prepared a short survey, it would be a massive help if you could fill it in for me. It takes less than 2 minutes to complete, I promise. Here is the link: https://www.surveymonkey.com/s/73XLJKK Thank you so much in advance!

View All Updates

Developed by TechBiz Xccelerator
- - - - -

Programming problem


  • Please log in to reply
2 replies to this topic

#1 cming21


    CC Lurker

  • New Member
  • Pip
  • 7 posts
  • Learning:C, C++, Objective-C, (Visual) Basic, JavaScript, Others

Posted 09 September 2012 - 08:46 AM


I understand this site is not here to help with homework but I am stuck and this is my first programming class.

Here is the question. Below the question is the answer to part one, I need help with part 2 and 3. I understand that the text book exampless are not in here but my answer should help you understand what I need. Please give me some help. I was told that this section would maybe help me a little more.

Thank you so much.
  • Using a similar approach as example 3.6 (textbook page 147): “A new Car Price Calculator”, provide your analysis for the following problem statement:

Write a program to compute the income tax due on a taxable income entered by the user. Please refer to Programming Problem 5 (Pg. 162) for the details of this program.
Your analysis should be clearly written and demonstrate your thought process and steps used to analyze the problem. Be sure to include what is the required output? What is the necessary input and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe the necessary formulas and sample calculations that might be needed.

2. Using a similar approach as example 3.6 (textbook page 147): “A new Car Price Calculator”, provide your program design for the program you analyzed from Step 1. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls (see page 148 for an example), a Hierarchy chart (see figure 3.8 page 148), and flow chart (Raptor only). Finally, list all of your pseudocode for each module. (See pages148-151 as an example.)

Include header and step comments in your pseudocode, using a similar approach as the example provided in section 2.3 (textbook page 86). See example 2.8 on pages 87-88).

Prepare at least 5 sets of input data (Test data) along with their expected output for testing your program.Your test data can be presented in the form of a table as was shown in Assignment 1. Be sure that you provide expected output for each test case.

Here is my answer to part 1.

[Tax Table]

From To Tax due
$0 $50,000 $0 + 5% of amount over $0

$50,000 $100,000 $2,500 + 7% of amount over $50,000

$100,000 ... $6,000 + 9% of amount over $100,000
Declare Public Class tax
Declare Public Property INCOME As Integer;
Declare Public Property TAXDUE As Float With Precision 2, Size 3;

Declare Public Method NEW(income As Integer = 0)
this.INCOME = income;
this.TAXDUE = 0.00
End Public Method NEW

Declare Public Method COMPUTETAX
If this.INCOME Is Less Than Or Equal To 50000 Then
this.TAXDUE = this.INCOME * 0.05;
Else If this.Income Is Less Than Or Equal To 100000 Then
this.TAXDUE = (this.INCOME * 0.07) + 2500;
this.TAXDUE = (this.INCOME * 0.09) + 6000;
End If
End Public Method COMPUTETAX

End Public Class

BEGIN main program BEGIN
Use Class tax;
Declare input As Integer;
Declare taxtotal As Float With Precision 2, Size 3

Prompt "Input a salary (enter 0 To exit): " + Line Break;
input = User Input;
Declare salary As New tax(input);
taxtotal = salary.COMPUTETAX;
Output "The tax for salary of " + input + " is " + taxtotal + Line Break;
Loop While input Is Not Equal To 0

END main program END
  • 0

#2 cming21


    CC Lurker

  • New Member
  • Pip
  • 7 posts
  • Learning:C, C++, Objective-C, (Visual) Basic, JavaScript, Others

Posted 09 September 2012 - 04:50 PM

Can anyone help me?
  • 0

#3 BlackRabbit


    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3,583 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 09 September 2012 - 07:06 PM

hello pal, what is the problem ? i mean you need help with the logic or you don't know what is pseudocode, flowchart, etc are ?

please point us to your specific need and we will gladly help

Just in case i let you some links that might help your approach

Pseudocode standard


What they are asking you to do is to give a description of the program that other programer could understand.
  • 0

Powered by binpress