Pasing Grades
  • Start Selling
  • Blog
  • Contact
  • 0

    Your cart is empty!

English

  • English
  • Spanish
  • Arabic
Create Account Sign In
  • Library
    • New Prep Guides
    • Featured Prep Guides
    • Free Exam Prep Guides
    • Best sellers
  • General
  • Nursing
    • Research Paper
    • Case Study
    • Discussion Post
    • Assignment
    • Exam
    • Practice Questions and Answers
    • Test Bank
    • solutions manual
  • Accounting
    • Case Study
    • Thesis
    • Study Guide
    • Summary
    • Research Paper
    • test bank
  • English
    • Creative Writing
    • Research Paper
    • Summary
    • Rhetorics
    • Literature
    • Journal
    • Exam
    • Grammar
    • Discussion Post
    • Essay
  • Psychology
    • Hesi
    • Presentation
    • Essay
    • Summary
    • Study Guide
    • Essay
    • Solution Manual
    • Final Exam Review
    • Class Notes
    • test bank
  • Business
    • Lecture Notes
    • Solution Manual
    • Presentation
    • Business Plan
    • Class Notes
    • Experiment
    • Summary
    • Practice Questions
    • Study Guide
    • Case Study
    • test bank
    • Exam
  • More
    • Computer Science
    • Economics
    • Statistics
    • Engineering
    • Biology
    • Religious Studies
    • Physics
    • Chemistry
    • Mathematics
    • History
    • Sociology
    • Science
    • Philosophy
    • Law
  • Pages
    • About Us
    • Selling Tips
    • Delivery Policy
    • Faq
    • Privacy Policy
  • Flash Sale
  • Home
  • CS 265 CourseWork Assignment - Advanced Programming Tools And Techniques (Answered)

CS 265 CourseWork Assignment - Advanced Programming Tools And Techniques (Answered)

CS 265 CourseWork Assignment - Advanced Programming Tools And Techniques (Answered)

Free Text Image

This Question has been Answered!

The blurred section contains detailed solutions to the Assignment or Exam above.

See Answer | 5 USD

What to do: This assignment is called "Compute the invoice grand total and tax due"

You must develop everything on the Drexel tux.cs.drexel.edu servers

Requirements

Create a C program, named a1.c, to solve the following problem. 

You are the developer of an online shop and you are working with the shopping cart module that holds the customer's online order. The online order contains multiple products that may be shipped to different states.  Your job is to create a C program that reads the order in the shopping cart and calculates both the grand total due and the total tax due.

 

The order / shopping cart information should be made available to your program via a command line argument. An example order file has been provided with the assignment. The format of the file should be

 

productName, quantity, unitPrice, state

 

Each line item represents the sale of a product at a given quantity and unit price that will ship to a given state. Your program should assume that there could be spaces, between any token in the file, meaning that attributes may be surrounded by spaces to the left or to the right (see the example file provided). You should eliminate leading and trailing spaces from the tokens.

 

Each product in the order may be shipped to a different address and therefore it is subject to a different sales tax. The tax rate information should be made available to your program via a second command line argument. An example file tax_rate.txt has been provided with the assignment. The format of each line in the file is

 

state,state_abbreviation,sales_tax

 

For example

          Pennsylvania,PA,6.000%

 

Please note that for this file there are no trailing or leading spaces surrounding the tokens, and there is no need to write code to remove them.

 

There should be two ways of invoking your program

 

a1

 

and

 

a1 order_file tax_rate_file invoice_file

 

Your program should read the input files order_file and tax_rate_file, make all necessary calculations and generate an output file named invoice_file.

 

If there are no command line arguments, the program should assume the following default file names 

            

     order.txt

     tax_rate.txt

     invoice.txt

 

The program should read the order file and tax rate file. For each product it should compute the subtotal (price * quantity) as well as the tax due for that product. It should also provide the grand total for the entire order (sum of all the subtotals) as well as the total tax due (sum of all taxes). Your output should be written to a file and could look like this:

 

Product           Price     Quantity State   Tax      Subtotal

----------------------------------------------------------------

Knife             125.00        1     PA     7.50      132.50     

Colander           25.95        2     NJ     3.44       55.34 

.. 

 

Total Tax Due: XXXXX

Grand Total: YYYY

 

Tips 

 

  • You may assume that the filenames are no longer that a number of your choice, say 100 characters.
  • You may assume that each line in the files is no longer than a number of your choice, say no larger than 256 characters.
  • You may assume that the number of states is 52 (as given in the file).
  • You may assume that an order may contain no more than a number of products, say no more than 100 products.

·        order.txt

·            Knife, 1,   125,   PA

·        Colander  ,2  ,25.95   ,NJ  

·        Cutting Board,  3   ,   29.99  ,  NY 

·        Measuring Cup,4,15,PA

·        Measuring Spoon,5,10,NY

·        Grater,6,20.99,PA

·        Blender,7,100,PR

·         

·         

·        tax_rate.txt

·        Alabama,AL,4.000%

·        Alaska,AK,0.000%

·        Arizona,AZ,5.600%

·        Arkansas,AR,6.500%

·        California,CA,7.250%

·        Colorado,CO,2.900%

·        Connecticut,CT,6.350%

·        Delaware,DE,0.000%

·        District of Columbia,DC,6.000%

·        Florida,FL,6.000%

·        Georgia,GA,4.000%    

·        Hawaii,HI,4.000%

·        Idaho,ID,6.000%

·        Illinois,IL,6.250%

·        Indiana,IN,7.000%

·        Iowa,IA,6.000%

·        Kansas,KS,6.500%

·        Kentucky,KY,6.000%

·        Louisiana,LA,4.450%

·        Maine,ME,5.500%

·        Maryland,MD,6.000%

·        Massachusetts,MA,6.250%

·        Michigan,MI,6.000%

·        Minnesota,MN,6.875%

·        Mississippi,MS,7.000%

·        Missouri,MO,4.225%

·        Montana,MT,0.000%

·        Nebraska,NE,5.50%

·        Nevada,NV,6.85%

·        New Hampshire,NH,0.000%

·        New Jersey,NJ,6.625%

·        New Mexico,NM,5.125%

·        New York,NY,4.000%

·        North Carolina,NC,4.750%

·        North Dakota,ND,5.000%

·        Ohio,OH,5.750%

·        Oklahoma,OK,4.500%

·        Oregon,OR,0.000%

·        Pennsylvania,PA,6.000%

·        Puerto Rico,PR,11.500%

·        Rhode Island,RI,7.000%

·        South Carolina,SC,6.000%

·        South Dakota,SD,4.500%

·        Tennessee,TN,7.000%

·        Texas,TX,6.250%

·        Utah,UT,4.850%

·        Vermont,VT,6.000%

·        Virginia,VA,4.300%

·        Washington,WA,6.500%

·        West Virginia,WV,6.000%

·        Wisconsin,WI,5.000%

·        Wyoming,WY,4.000%

 

Free Text Image

This Question has been Answered!

The blurred section contains detailed solutions to the Assignment or Exam above.

See Answer | 5 USD
Previous Question Next Question

Popular Items

  • Asthma Care Plan (Answered)
  • Reflection paper
  • Nursing Diagnosis: Asthma
  • Narcolepsy Device
  • Social Determinants Of Health (Research paper, 2 pages)

Latest Items

  • What is most likely to result immediately after a rainforest in Brazil is clear-cut?
  • Play the role of an epidemiologist and investigate an emerging disease Assignment Solution
  • These infographics present a visual representation of data found in HCUP databases. Select one HCUP Infographic that you found interesting. What type of information does the infographic provide?
  • Create an informational flyer for the Healthcare Cost and Utilization Project The assignment should be a 1-page flyer
  • Week5 NR439 Critiquing Evidence (Solved!)

Tags

  • CS 265
  • advanced programming
  • assignment
  • CS 265 Assignment

More Related Items

Asthma Care Plan (Answered)
View Document

Asthma Care Plan (Answered)...

{!! html_entity_decode(substr($item->short_desc, 0, 150)50) . '...'1 ,

See Answer
Reflection paper
View Document

Reflection paper...

{!! html_entity_decode(substr($item->short_desc, 0, 150)50) . '...'1 ,

See Answer
Nursing Diagnosis: Asthma
View Document

Nursing Diagnosis: Asthma...

{!! html_entity_decode(substr($item->short_desc, 0, 150)50) . '...'1 ,

See Answer
Purchase

Download link will be sent this email instantly after purchase.

IMPORTANT LINKS

  • How To Upload Class Notes
  • Selling Tips
  • Passing Grades's Study Materials
  • Scholarships for International Students 2026

POPULAR CATEGORIES

  • Law
  • Accounting
  • English
  • Psychology
  • Business
  • Nursing
  • Computer Science
  • General

View Document

  • Blog
  • Contact
  • Delivery Policy
  • Latest Scholarships Around the World
  • How to Pass Bar Exams: Passing Grades’ Strategies
  • How to Study and Pass the CPA Exam
  • All Test Banks
  • Faq
  • Copyright Claims
  • Privacy Policy
  • Terms of Use

KNOWLEDGE BASE

  • How to Write A+ Grade Good Research Paper
  • How to Manage Stress During Exam Period
  • Best Time to Study
  • How to Pass NCLEX-RN Exam
  • How To Effectively Utilize Test Banks
  • Popular Shadow Health Exam Assessments
  • Popular HESI Case Studies
  • How to Prepare for a Nursing Career
  • The Importance Of Summaries in Exam Revisvion

© 2026 Pasing Grades. All rights reserved.