Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hey new programmer here i'm working on this problem in C++ on visual studio, my code is below. I can't figure out why it won't

Hey new programmer here i'm working on this problem in C++ on visual studio, my code is below. I can't figure out why it won't work, can anyone help? It doesn't seem to even be opening the .csv file

image text in transcribedimage text in transcribed
A B C D E 1 Age Spectacle Prescription |Astigmatism |Tear Production Rate N young myope no reduced m young myope no normal 4 young myope yes reduced LO young myope yes normal 6 young hypermetrope no reduced 7 young hypermetrope no normal 8 young hypermetrope yes reduced 9 young hypermetrope yes normal 10 pre-presbyopic myope no reduced 11 pre-presbyopic myope no normal 12 pre-presbyopic myope yes reduced 13 pre-presbyopic myope yes normal 14 pre-presbyopic hypermetrope no reduced 15 pre-presbyopic hypermetrope no normal 16 pre-presbyopic hypermetrope yes reduced 17 pre-presbyopic hypermetrope yes normal 18 presbyopic myope no reduced 19 presbyopic myope no normal 20 presbyopic myope yes reduced 21 presbyopic myope yes normal 22 presbyopic hypermetrope no reduced 23 presbyopic hypermetrope no normal 24 presbyopic hypermetrope yes reduced 25 presbyopic hypermetrope yes normal 26When diagnosing the type of contact lens that would be best for a patent with glasses, a doctor uses the decision tree below: Tear production rate Reduced Normal None Astigmatism No Yes Soft Spectacle prescription Myope Hypermetrope Hard None FIGURE 1.2 Decision tree for the contact lens data. Your program should accept as input, a comma separated file with: patient age, spectacle prescription, astigmatism, and tear production rate. Use the data file contactLensData.xlsx. Save the data in .csv format to switch it to a comma delimited text file. young, myope, no, reduced young, myope, no, normal young, myope ves, reduced young, myope, yes, normal Your program should read each line of the input file and use the decision tree to make a contact lens recommendation. Output a line with the initial input and along with the diagnosis to an output file. young, myope, no, reduced, none young, myope, no, normal, soft young, myope, yes, reduced none young, myope, yes, normal, hard

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions