Question
C header (rational.c) and source (rational.c) les and test program (day6.c) Demonstrate your understanding of the opaque object design pattern by completing the following: Create
C header (rational.c) and source (rational.c) les and test program (day6.c)
Demonstrate your understanding of the opaque object design pattern by completing the following: Create an interface file called rational.h, implementation file called rational.c and sample main program (in a file called day6.c) that creates a new opaque object for holding fractions called rational. You will need to implement a function to initialize a default rational with a numerator of 0 and a denominator of 1. You will need to then create a function to clean up the object with the naming convention we have used in class. Your main program should create a rational object handle, initialize it, and then clean up the space
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started