Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write in C program and in , important part In this portion you will read the data but only implement the logic for young people.

image text in transcribedimage text in transcribedimage text in transcribed

Write in C program and in , important part "In this portion you will read the data but only implement the logic for young people. Applications from middle aged or older adults will be rejected."

Instructions Credit card approval using decision tree classifier Background I A credit card company receives thousands of applications for new cards. Each application contains information about an applicant, age O Marital status annual salary outstanding debts credit rating etc. Problem: To evaluate a credit card application into two categories, approved and not approved. Focus: implement a function to evaluate the approval (or not) of a credit card application. Instructions 1. Input data: The user will enter the applicant's age, has job, own_house and credit_rating. See sample data below. 2. Based on the user input, implement the decision tree shown below to decide whether to approve the credit card application or not. The program should display yes or no. Use a switch construct where most appropriate. Consider to create a mapping for categorization when using a switch construct. For instance, For Age: O=young (ages 18-35 years), 1=mid-aged (ages 36-55), 2-old (aged older than 55 years). For Credit Rating: 0=fair, 1=good, 2=excellent Age? Young middle old Has job? Own house? Credit rating? true false true false Yes (2/2) No . (3/3) Yes (3/3) No (2/2) fair good excellent ! No Yes Yes (2/2) (2/2) OUTPUT EXAMPLE Test with data from lines 4, 5, 6, 8, 11, 12, and 15 in order to test the output of every single branch of the decision tree. Below is an output example for only lines 4 and 5. Yes ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Age young young young young young middle middle middle middle middle old old old old old Has Job Own House Credit Rating approved false false fair No false false good No true false good Yes true true fair false false fair No false false fair No false false good No true true good Yes true excellent false true excellent Yes false true excellent Yes false true good true false good Yes true false excellent Yes false false fair No false Yes ---=== Credit Card Application Enter your age: 30 Do you have a job? y Do you do you own a house? y Enter the credit rating: Fair approved No Yes (2/2) No (3/3) Yes (3/3) No (2/2) Yes (2/2) Yes (2/2) OUTPUT EXAMPLE Test with data from lines 4, 5, 6, 8, 11, 12, and 15 in order to test the output of every single branch of the decision tree. Below is an output example for only lines 4 and 5. ID 1 2 3 4 S good 6 7 8 Age young young young young young middle middle middle middle middle old old old old old Has_Job Own_House Credit_Rating approved false false fair No false false good No true false Yes true true fair Yes false false fair No false false fair No false false good No true true good Yes false true excellent Yes false truc excellent Yes true excellent Yes false true Yes true false Yes true false excellent Yes false false fair No 9 10 false 11 12 13 14 15 good good ===--- ---=== Credit Card Application Enter your age: 30 Do you have a job? y Do you do you own a house? y Enter the credit rating: Fair approved ---=== Credit Card Application Enter your age: 30 Do you have a job? n Do you do you own a house? n Enter the credit rating: Fair not approved IN-LAB (30%) In this portion you will read the data but only implement the logic for young people. Applications from middle aged or older adults will be rejected

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago