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

Write a program that can read XML files, such as 3 1295.32 4 25.00 3 100.00 3 25

ID: 3689520 • Letter: W

Question

Write a program that can read XML files, such as 3 1295.32 4 25.00 3 100.00 3 25.00 3 4 250.00 Your program should construct a Bank object, parse the XML data & create new BankAccount objects in the Bank for each of the accounts the XML data, execute all of the transactions from the file, and print the list of accounts & total value of the balances. Note that there can be any number of accounts, and any number of deposit, withdraw, and transfer transactions. Do not hard-code a specific number of accounts or transactions. Download and use the provided BankParserDemo.java class as the main program for your solution, and download the provided Bank.java and BankAccount.java classes to use with your BankParser solution. Download the provided BankParser.java class and complete the parse() method to finish the program. Download and use the provided bank.xml to test your program – after the transactions, the accounts from the provided bank.xml files should have the balances: 1001: 0.00 1002: 1000.00 1003: 2000.00 1004: 3000.00 1005: 4000.00 and the total balance should be 10000.00. (Different XML data will be used to test your program, so don’t assume there are only five accounts in the XML data.) To run the BankParserDemo Java program in Eclipse, create a new project, copy the BankParserDemo.java, BankParser.java, Bank.java, and BankAccount.java files into the src folder of your project, and copy the Bank.xml file into the project's folder. Open the Project’s Properties dialog and select Run/Debug Settings, then click the Arguments tab and enter "bank.xml" in the Arguments field. Click OK to save these changes to the Project’s properties

Explanation / Answer

#include<stdio.h>

#include<conio.h>

void main() {

  struct student {

     char name[30];

     char sex;

     int rollno;

     float percentage;

  };

  union details {

     struct student st;

  };

  union details set;

  printf("Enter details:");

  printf(" Enter name : ");

  scanf("%s", set.st.name);

  printf(" Enter roll no : ");

  scanf("%d", &set.st.rollno);

  flushall();

  printf(" Enter sex : ");

  scanf("%c", &set.st.sex);

  printf(" Enter percentage :");

  scanf("%f", &set.st.percentage);

  printf(" The student details are : ");

  printf(" ame : %s", set.st.name);

  printf(" Rollno : %d", set.st.rollno);

  printf(" Sex : %c", set.st.sex);

  printf(" Percentage : %f", set.st.percentage);

  getch();

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote