Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a program in C and upload it into your Arduino Mega 2560 board to implement a simple credit card management system. The Arduino Mega

Develop a program in C and upload it into your Arduino Mega 2560 board to implement a simple credit card management system. The Arduino Mega 2560 should interact with the user via the Serial Monitor. This Question is based on AVR programming in C. The program should do as described below. (Use the C code I have already developed below, making any changes if neccessary) .

The use of high level ArduinoFunctions (seehttp://arduino.cc/en/Reference/HomePage, under Functions) is not permitted.Significant marks will be deducted if any of the functions is used. Native C functionsare however permitted.

Thank you for your help! :)

Implemented c source code:-

==================== #include #include "structure.h" #include int main() { struct Bank_Account array[10]; int size, option, account_no, amount; int retval,position; printf(" ---------------------------------- "); printf(" **** Welcome to the Bank of Melbourne***** "); printf(" Please Read Number of customer records you want to enter:"); scanf("%d", &size); Read_Data(array, size); while(1) { printf(" ---------------------------------- "); printf(" ****** MENU ******** "); printf(" 1.To display all customer Records"); printf(" 2.To deposit amount"); printf(" 3.To withdraw amount"); printf(" 4.To search a record"); printf(" 5.Exit:"); printf(" Select Any Option "); scanf("%d", &option); switch (option) { case 1: Display_Record(array, size); break; case 2: printf(" Please Enter your account number:"); scanf("%d", &account_no); printf(" Please Enter amount to deposit:"); scanf("%d", &amount); Deposit(array, size, account_no, amount); break; case 3: printf(" Please Enter your account number:"); scanf("%d", &account_no); printf(" Please Enter amount to withdraw:"); scanf("%d", &amount); withdrawal(array, size, account_no, amount); break; case 4: printf(" Please Enter account number to search"); scanf("%d", &account_no); retval = Search_Account(array, size, account_no); position=retval; if (retval == - 1) { printf(" No Record Found"); } else { printf(" A/c Number:\tName:\tBalance:\tInterestRate "); printf("%d\t%s\t%d ",array[position].account_no, array[position].name,array[position].balance,array[position].interestRate); } break; case 5: exit(0); } } return 0; } void Read_Data(struct Bank_Account list[10], int size) { int i; for(i=0;i

WHAT THE C CODE ABOVE WAS BASED ON + more instructions on the Ardiuno requirements:

image text in transcribedimage text in transcribed

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

Students also viewed these Databases questions

Question

How would we like to see ourselves?

Answered: 1 week ago