Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1 Due Thursday, February 2 9 , 2 0 2 4 by 1 1 : 0 0 pm as Email ( 1 ) Write

Exercise 1 Due Thursday, February 29,2024 by 11:00pm as Email
(1) Write a C program with call to functions to produce the output given below.
(2) The program should first display the output to screen (from function calls) as
We write code to manipulate data (which are
provided by the user) to produce the required
outcome in the most efficient way!
CIS 27 Data Structures and Algorithms
Laney College
Your Name
Information --
Assignment: HW #2 Exercise #1
Implemented by: Your Name
Required Submission Date: 2024/02/29
Actual Submission Date: ____/__/__
Where Your Name means Firstname Lastname; no abbreviation!
For examples, if your name is First Last then Your Name should be First Last
throughout all of your work/code as mentioned.
(3) The program will have the setup as follows,
A. struct FractionYourName is defined as below.
/**
* Program Name: fractionYourName.h
* Discussion: Specification File
* struct Fraction & Relevance
* Written By: Your Name
* Date: 2024/__/__
*/
#define _CRT_SECURE_NO_WARNINGS
#ifndef FRACTIONYOURNAME_H
#define FRACTIONYOURNAME_H
// Header/include File
#include
#include
struct FractionFirstLast {
int num;
int denom;
};
CIS 27 Spring 2024 Homework #2 Page 10 of 18
// typedef
typedef struct FractionFirstLast TdFractionFL;
typedef TdFractionFL* TdFractionPtrFL;
typedef TdFractionFL* TdFractionAddrFL;
// Function Prototypes
TdFractionAddr createFractionFL(void);
int removeFractionFL(TdFractionAddr);
void printFraction(const TdFractionAddrFL);
#endif
B. The set of functions to support your struct FractionYOURNAME is given in the header
file below.
/**
* Program Name: fractionUtilityYourName.h
* Discussion: Specification File
* Support Functions for Fraction
* Written By: Your Name
* Date: 2024/__/__
*/
#ifndef FRACTIONUTILITYYOURNAME_H
#define FRACTIONUTILITYYOURNAME_H
// Header/include File
#include
#include
#include fractionYourName.h
// Function Prototypes
int gcdFL(int, int);
#endif
C.The set of functions to support HW #2 is given in the header file below.
/**
* Program Name: cis27Spring2024YourNameHw2Utility.h
* Discussion: Specification File
* Support Functions for HW #2
* Written By: Your Name
* Date: 2024/__/__
*/
#ifndef CIS27SPRING2024YOURNAMEHW2UTILITY_H
#define CIS27SPRING2024YOURNAMEHW2UTILITY_H
// Header/include File
#include
#include
#include "fractionYourName.h"
#include "fractionUtilityYourName.h"
CIS 27 Spring 2024 Homework #2 Page 11 of 18
// Function Prototypes
void displayCodingStatementFL(void);
void displayClassInfoFL(void);
void runMenuHw2FL(void);
void displayFractionInfoFL(TdFractionPtrFL);
void initFractionSubmenu(TdFractionPtrFL*);
#endif
D.The program will then continue to call other functions and display the results as follows,
// OUTPUT Sample Run
We write code to manipulate data (which are
provided by the user) to produce the required
outcome in the most efficient way!
CIS 27 Data Structures and Algorithms
Laney College
Your Name
Information --
Assignment: HW #2 Exercise #1
Implemented by: Your Name
Required Submission Date: 2024/02/29
Actual Submission Date: 2024/__/__
***************************************
* MENU HW #2*
*(1) Creating Fractions *
*(2) Calling displayFractionInfoFL()*
*(3) Displaying Fractions *
*(4) Quit *
***************************************
Enter an integer for option + ENTER: 9
Wrong Option!
***************************************
* MENU HW #2*
*(1) Creating Fractions *
*(2) Calling displayFractionInfoFL()*
*(3) Displaying Fractions *
*(4) Quit *
***************************************
Enter an integer for option + ENTER: 2
Calling displayFractionInfoFL()!
No Fractions ...
***************************************
* MENU HW #2*
*(1) Creating Fractions *
*(2) Calling displayFractionInfoFL()*
*(3) Displaying Fractions *CIS 27 Spring 2024 Homework #2 Page 11 of 18
// Function Prototypes
void displayCodingStatementFL(void);
void displayClassInfoFL(void);
void runMenuHw2FL(void);
void displayFractionInfoFL(TdFractionPtrFL);
void initFractionSubmenu(TdFractionPtrFL*);
#endif
D.The program will then continue to call other functions and display the results as follows,
// OUTPUT Sample Run
We write code to manipulate data (which are
provided by the user) to produce the required
outcome in the most efficient way!
CIS 27 Data Structures and Algorithms
Laney College
Your Name
Information --
Assignment: HW #2 Exercise #1
Implemented by: Your Name
Required Submission Date: 2024/02/29
Actual Submission Date: 2024/__/__
***************************************
* MENU HW #2*
*(1) Creating Fractions *
*(2) Calling displayFractionInfoFL()*
*(3) Displaying Fractions *
*(4) Quit *
***************************************
Enter an integer for option + ENTER: 9
Wrong Option!
***************

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_2

Step: 3

blur-text-image_3

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago