- advanced-algebra-ii-conceptual-explanations-15.10.pdf
- MFM2P0.outline
- MAT117 MAT 117 117.docx
- 2012 Class 10 Set-3 Section-b
- Math_Algebra.pdf
- Question F5 Add Math P1 2015_SMKTD3_mid Year
- Suppsat Fss
- Advanced Paper 2 CTY 1719 AB Lot PT 4
- 1.docx
- Rec Bookcontoh
- syllabus - alg2 2015-16
- algebra
- Quadratic Expression
- math 2 syllabus - spring block 2018-2019
- Algebra 1 EHS 2014-2015, no Stats
- As and A2 Maths Revision Checklist
- A Conjencture on the Forms of the Roots of Equations Leonard Euler
- Positive Roots of Quadratic Equations
- MTH 209 Week 5 MyMathLab Study Plan for Final Exam
- Haraldsson Etal Bidrag
- Alg 2 H Syllabus 14
- MTH141 Syllabus Spring 2011
- math notes.doc
- June 2012 calc
- cross_1982_designerlywaysofknowing.pdf
- Yearly Teaching Plan 2011
- 9-12 Math Overview
- Algebra I B Review
- Chs 4038 2010 Prelim III p2
- maths first year
- Resumo-IBGE1
- Nive Lamento
- Prova Concurso
- Sebigas - Fortaleza_2014
- ART - Embrapa
- Lista - Aula 01.docx
- SIlva Neto 2016 Artigo Conidis
- Quadro Sintese Das Tendencias Pedagogicas
- Bolsas de Estudo
- Termopar Tipo T
- Aula 7 a 10
- Memorial Descritivo
- _COBEQ-IC2011
- Curso Refino Ufrn-final 1
- Planejamento
- Hydrophobic Interaction Chromatography
- 81849339 Thermo Homework 6
- Estágio - Metodologias
- Paper - Project
- Matlab
- Presentation - Gonzagao
- Instrucoes Normativas Para Elaboracao Do Artigo (Relatorio Final)

**Florida State University
**

Jose Mariano da Silva Neto

ECH 3854 – Homework Set #1

FAMU-FSU College of Engineering

Fall 2014 Due Date: 09/03/14

1. You are developing a program for a credit card authorization machine so that it can accept credit

cards and obtain approval for transactions. It can read cards issued by major credit card

companies. You are currently interested in contacting the appropriate credit card company and

providing the card number read. Applying the first two steps of the problem solving

methodology covered in class, design all the operations that you think are reasonable for such a

problem.

SOLUTION:

For this problem, it was required to use the methodology covered in class. It is necessary to

follow some steps:

1

st

Step – Problem Statement and Input/Output Analysis

a) Problem statement: To create a program that can be used to obtain approval for

transactions in a credit card machine.

b) Input/Output Analysis:

The input is the credit_card_authorization and it includes:

i) credit_card_company

ii) number_of_card

iii) expiration_date

iv) CVS_number

The output includes:

i) answer_for_the_authorization

2

nd

Step – Decomposition

i) Enter with the following data:

First: Credit_card_company:

It is valid?

If yes, proceed to the next step;

Otherwise, print the message: This card is not valid.

End the program

Second: number_of_card

It is valid?

If yes, proceed to the next step;

Otherwise, print the message: The number of this card is not valid.

End the program

Third: expiration_date

It is valid?

If yes, proceed to the next step;

Otherwise, print the message: This card does not have a valid date.

End the program

Fourth: CVS_number

It is valid?

If yes, proceed to the next step;

Otherwise, print the message: This card does not have a valid CVS number.

End the program

ii) Available balance

The available balance is equal or higher than the purchase amount?

If yes, print the answer: answer_for_the_authorization: Accept with success

Otherwise, print the answer: answer_for_the_authorization: Sorry, you do not have

an available balance for this transaction.

2. Given a quadratic equation of the form:

You are required to design and write a program to solve for the roots of any quadratic equation

of the form given above, regardless of type. Following the top-down design approach outlined in

class, (a) State the problem (b) Define the inputs and outputs (c) design and then decompose the

problem into subtasks (d) refine the subtasks into smaller more detailed pieces

SOLUTION:

1

st

Step – Problem Statement and Input/Output Analysis

a) Problem statement: To find the roots of any quadratic equation of the form:

**b) Define the inputs and outputs
**

The input is the credit_card_authorization and it includes:

i) a_value

ii) b_value

iii) c_value

The outputs include:

i) x1_root1

ii) x2_root2

c) Design and then decompose the problem into subtasks

i) Enter with the following data:

a_value

b_value

c_value

ii) To calculate the delta_value

iii) If delta_value is valid, to calculate the roots for the quadratic equation

iv) To print the x1_root1 and x2_root2

d) Refine the subtasks into smaller more detailed pieces

i) To write the equation in the form:

**ii) In the program, enter with the a, b and c values:
**

a_value

b_value

c_value

iii) To calculate the delta_value:

delta_value = b*b-4*a*c

if delta_value is equal to 0, this equation has a solution and it is unique,

x1=x2

if delta_value is greater than 0, this equation has solution and it has two

roots, x1_ root1 and x2_root2

otherwise, this equation does not have a real solution.

iv) To calculate x1_ root1 and x2_root2:

x1_root1=(-b+sqrt(delta_value))/(2*a);

x2_root2 = (-b-sqrt(delta_value))/(2*a);

v) To print the results:

x1_ root1

x2_root2

- advanced-algebra-ii-conceptual-explanations-15.10.pdfUploaded byIosif Beniamin Șolot
- MFM2P0.outlineUploaded bypurple71
- MAT117 MAT 117 117.docxUploaded by116helper
- 2012 Class 10 Set-3 Section-bUploaded byAndrew Merrill
- Math_Algebra.pdfUploaded bySyed Jaffree
- Question F5 Add Math P1 2015_SMKTD3_mid YearUploaded byMJ Chow
- Suppsat FssUploaded byKelli Flores
- Advanced Paper 2 CTY 1719 AB Lot PT 4Uploaded byNibha Pandey
- 1.docxUploaded byJasmina Angelevska
- Rec BookcontohUploaded byameradi085421
- syllabus - alg2 2015-16Uploaded byapi-308781855
- algebraUploaded byapi-65563698
- Quadratic ExpressionUploaded byAmin Jawa
- math 2 syllabus - spring block 2018-2019Uploaded byapi-286599245
- Algebra 1 EHS 2014-2015, no StatsUploaded bySmithMath
- As and A2 Maths Revision ChecklistUploaded byAlan Yap
- A Conjencture on the Forms of the Roots of Equations Leonard EulerUploaded bycoucou8949
- Positive Roots of Quadratic EquationsUploaded bySiddharth Acharya
- MTH 209 Week 5 MyMathLab Study Plan for Final ExamUploaded byuop2018
- Haraldsson Etal BidragUploaded byManuel Balaguera
- Alg 2 H Syllabus 14Uploaded byMichelle New
- MTH141 Syllabus Spring 2011Uploaded byschreckk118
- math notes.docUploaded byshimizu111
- June 2012 calcUploaded bymoiseicristian
- cross_1982_designerlywaysofknowing.pdfUploaded byme98
- Yearly Teaching Plan 2011Uploaded byhadie06
- 9-12 Math OverviewUploaded byMedford Public Schools and City of Medford, MA
- Algebra I B ReviewUploaded byVanessa Mazzurco
- Chs 4038 2010 Prelim III p2Uploaded bymath3matics3
- maths first yearUploaded byRida Asim

- Resumo-IBGE1Uploaded byMariano Neto
- Nive LamentoUploaded byMariano Neto
- Prova ConcursoUploaded byMariano Neto
- Sebigas - Fortaleza_2014Uploaded byMariano Neto
- ART - EmbrapaUploaded byMariano Neto
- Lista - Aula 01.docxUploaded byMariano Neto
- SIlva Neto 2016 Artigo ConidisUploaded byMariano Neto
- Quadro Sintese Das Tendencias PedagogicasUploaded byMariano Neto
- Bolsas de EstudoUploaded byMariano Neto
- Termopar Tipo TUploaded byMariano Neto
- Aula 7 a 10Uploaded byMariano Neto
- Memorial DescritivoUploaded byMariano Neto
- _COBEQ-IC2011Uploaded byMariano Neto
- Curso Refino Ufrn-final 1Uploaded byMariano Neto
- PlanejamentoUploaded byMariano Neto
- Hydrophobic Interaction ChromatographyUploaded byMariano Neto
- 81849339 Thermo Homework 6Uploaded byMariano Neto
- Estágio - MetodologiasUploaded byMariano Neto
- Paper - ProjectUploaded byMariano Neto
- MatlabUploaded byMariano Neto
- Presentation - GonzagaoUploaded byMariano Neto
- Instrucoes Normativas Para Elaboracao Do Artigo (Relatorio Final)Uploaded byMariano Neto