Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C programming I need to write the header corresponding to the function that is c

ID: 3812999 • Letter: C

Question

C programming

I need to write the header corresponding to the function that is carried out by each one of the foillowing tasks. And yup, only the header though, I'll try to implement myself the line codes.

And yup, I think we could use , or at leats have defined type tBool in order to store booleans.

a) translateText : Action that reads a text typed in in english (input) and it gives the translation in chinese (output)

b) isLeapYear : ( I have it done)

c) updateAccont : Action that once given an statement of how much money we have in our bank account a date of 01.01.2015 and how much we have spent a date of 31.01.2015 gives me back my balance updated.

Explanation / Answer

#ifndef TRANSLATE_H_ /* Include guard */
#define TRANSLATE_H_

char* translateText(char* text);
/* Takes a pointer to the text string and returns a pointer to the chinese text Function declaration */
/*It can be printed from within the function : void translateText(char* text) */
#endif // TRANSLATE_H_

#ifndef LEAPCHECK_H_ /* Include guard */
#define LEAPCHECK_H_

bool isLeapYear(int year);
/* Function declaration assuming year is passed as int , would return true or false */

#endif // LEAPCHECK_H_


#ifndef UPDATEACCOUNT_H_ /* Include guard */
#define UPDATEACCOUNT_H_

double updateAccont(double bal,double spent);
/* Takes balance on 01.01.2015 and amount spent till 31.01.2015 returns balance left */

#endif // UPDATEACCOUNT_H_

Names of headers are : translate.h , leapcheck.h , updateaccount.h