讲解:program、Python,c++、Java、EclipseMatlab|Web

Project RequirementsCreate a new Eclipse workspace named Project_1234567890 on the desktop of your computer (replace1234567890 with your student ID number). For each question below, create a new project in that workspace. Calleach project by its question number: Question1, Question2, etc. If you do not remember how to create aworkspace or projects, read the Introduction to Eclipse document which is on iSpace. Answer all the questions below.At the end of the project, create a ZIP archive of the whole workspace folder. The resulting ZIP file must be calledProject_1234567890.zip (replace 1234567890 with your student ID number). Upload the ZIP file on iSpace.Here are a few extra instructions: Give meaningful names to your variables so we can easily know what each variable is used for in your program. Put comments in your code (in English!) to explain WHAT your code is doing and also to explain HOW your programis doing it. Also put comments in your tests. Make sure all your code is properly indented (formatted). Your code should be beautiful to read.Failure to follow these instructions will result in you losing points.Question 1In this project you need to write software for UICs finance office. The finance office deals with the finances of differentkinds of people at UIC: students who pay money for their tuitions, employees who receive money for their salaries, etc.All these people pay or receive a certain amount of money, expressed in yuans.Write a Payer interface for people who pay money to the finance office, with the following UML specification:+-------------------------------+| > || Payer |+-------------------------------+| + getName(): String || + getDebt(): int || + pay(int amount): void |+-------------------------------+and a Person class that implements Payer and has the following UML specification:+------------------------------------+| Person |+------------------------------------+| - name: String || - debt: int |+------------------------------------+| + Person(String name, int debt) || + getName(): String || + getDebt(): int || # setDebt(int debt): void || + pay(int amount): void || + testPerson(): void |+------------------------------------+The name instance variable indicates the name of the Person. The debt instance variable indicates the amount ofmoney that the person must pay to UIC (to simplify the assignment we will assume that money is always expressed as aninteger number of yuans).The setDebt method changes the amount of debt that a person has. The setDebt method is protected, notpublic. This means that only subclasses of the Person class can use the setDebt method. All the other classes inthe software cannot use the setDebt method, so they cannot change the amount of debt a person has, which is goodfor security.The purpose of the pay method is to decrease or increase the amount of debt a person has (depending on what kind ofperson it is) by the amount given as argument to the method. The pay method of the Person class is abstract,since we do not know what kind of person the person is (a person paying money or a person receiving money).Also add to your program a Test class to test your Person class.Question 2Add a class Student that extends Person. The constructor of the Student class takes as arguments a name and theamount of UIC debt that the student has (because the student needs to pay tuition or pay for the dormitory, forexample). The Student class does not have any instance variable.The pay method of the Student class makes the student pay money to UIC, which decreases the amount of debt thatthe student has by the amount of money given as argument to the method. A student can have a negative debt(meaning that the student paid too much to UIC, which always makes UIC happy).Make sure you test all the methods of your new Student class, including inherited methods.Question 3Add a class Employee that extends Person. The constructor of the Employee class takes as arguments the name ofthe employee and the salary that UIC must pay to the employee. If the salary given as argument is strictly less than zerothen the constructor must throw a NegativeSalaryException with the message An employee cannothave a negative salary! The Employee class does not have any instance variable.Warning: the constructor of the Employee class takes as argument the salary of the employee (the amount of moneythat UIC must pay to the employee) but the debt instance variable of the Person class indicates how much money theperson must pay to UIC. Therefore a positive salary is the same as a negative debt.The pay method of the Employee class makes UIC pay money to the employee, which decreases the current salary ofthe employee by the amount of money given as argument to the method (so the debt of the employee becomes lessnegative!) For example, if an employee currently has a salary of 10000 yuans (-10000 yuans of debt) and pay(2000) iscalled then the employees salary becomes 8000 yuans (-8000 yuans of debt, meaning that UIC still needs to pay anextra 8000 yuans to the employee after paying the 2000 yuans). It is fine for the pay method to be given a negativevalue as argument, which means the employee then just receives a salary increase. For example, if an employeecurrently has a salary of 10000 yuans and pay(-2000) is called then the employees salary becomes 12000 yuans. Anemployee cannot be overpaid money by UIC though, so the current salary of the employee must always be positive orzero, never negative (the debt of the employee cannot be positive). If the argument given to the pay method is toopositive and would change the employees salary to become negative, then instead the current salary of the employeemust not change and the pay method must throw a NegativeSalaryException with the message Anemployee cannot be overpaid by XXX yuans!, where XXX is replaced with the amount of theoverpayment. For example, if an employee currently has a salary of 10000 yuans and pay(12000) is called then theemployee still has a salary of 10000 yuans and the method throws a NegativeSalaryException with the messageAn employee cannot be overpaid by 2000 yuans!Note: to simplify the project, do not worry about the setDebt method.Change other classes and interfaces as necessary.Question 4Add a class FacultyMember that extends Employee. The constructor of the FacultyMember class takes asarguments the name of the faculty member and the salary that UIC must pay to the faculty member. TheFacultyMember class does not have any instance variable.The pay method of the FacultyMember class makes UIC pay money to the faculty member, which decreases thecurrent salary of the faculty member by the amount of money given as argument to the method (so the debt of thefaculty member becomes less negative!) In addition to the normal salary, a faculty member might also temporarilyborrow extra money from UIC that the faculty member will need to reimburse later, so the salary of a faculty membermight then become negative (the debt becomes positive) without throwing any exception: a negative salary (positivedebt) then just means that the faculty member has temporarily borrowed some money.Change other classes and interfaces as necessary.Question 5Add a FinanceOffice class with the following UML specification:+--------------------------------------------+| FinanceOffice |+--------------------------------------------+| - name: String || - payers: ArrayList |+--------------------------------------------+| + FinanceOffice(String name) || + addPayer(Payer payer): void || + totalDebt(): int || + getDebt(String name): int || + pay(String name, int amount): void || + testFinanceOffice(): void |+--------------------------------------------+When a finance office is created, it has an arraylist of payers but the arraylist is empty (the arraylist does not contain anypayer).The addPayer method takes a payer as argument and adds the payer to the arraylist of payers for the finance office.The totalDebt method returns as result the total amount of debt of all the payers of the finance office (if the result ispositive then it means that the finance office will receive more money from all the students (and the faculty memberswith debts) than it needs money to pay all the salaries of the employees and UIC will then make a profit; if the result isnegative then it means that the finance office will not get enough money from the students and will need to borrow extra money from a bank to be able to pay all the employees, otherwise UIC will go bankrupt; if the result is zero then itmeans that the money paid by all the students will exactly cover the salaries of the employees).The getDebt method takes as argument the name of a payer and returns as result the current amount of debt for thispayer. If the finance office does not have a payer with the correct name then the getDebt method must throw anUnknownPayerException with the message Payer XXX unknown, where XXX is replaced with the name ofthe payer. Do not worry about multiple payers having the same name.The pay method takes as argument the name of a payer and an amount of money and uses the pay method of thatpayer to pay that amount of money to that payer. If the finance office does not have a payer with the correct name thenthe pay method must throw an UnknownPayerException with the message Payer XXX unknown, whereXXX is replaced with the name of the payer. Do not worry about multiple payers having the same name.Note: the pay method does not catch any exception, it only throws exceptions.Question 6In this question and the next one we want to create a command line interface (CLI) for our finance office software.Add a CLI class with a main method. Your code then has two classes with a main method: the Test class that youcan use to run all your tests for all your classes, and the CLI class that you will now use to run the interactive text-basedinterface of your program.The CLI class does not have any testCLI method because this class is only used to allow users to use the softwareinteractively.Add to the CLI class a private static input instance variable which is a Scanner object that reads input from thestandard input stream System.in:private static Scanner input = new Scanner(System.in);Always use this input scanner object when you need to read input. (Never close this scanner object, because thiswould also close the standard input stream System.in, and then the next time you tried to read something from thestandard input stream you would get a NoSuchElementException!)In addition to the main method and the input instance variable, the CLI class has two methods called readLineand readPosInt.The readLine method is static and private, it takes a string as argument, and returns another string as result. ThereadPosInt method is static and private, it takes a string as argument, and returns a positive integer as result.The readLine method uses System.out.print (not println) to print its string argument on the screen (laterwhen we use the readLine method, the string argument of the method will be a message telling the user to typesome text). Then the readLine method uses the input scanner object to read a whole line of text from the user ofthe program and returns the text as result.The readPosInt method uses System.out.print (not println) to print its string argument on the screen (laterwhen we use the readPosInt method, the string argument of the method will be a message telling the user to type someinteger). Then the readPosInt method uses the input scanner object to read an integer from the user of theprogram.After reading the integer, the readPosInt method must also use the scanners nextLine method to read the singlenewline character that comes from the user pressing the Enter key on the keyboard after typing the integer (if you donot read this newline character using the nextLine method inside the readPosInt method, then the newlinecharacter will remain in the input stream, and, the next time you use the readLine method described above, thereadLine method will just immediately read only the newline character from the input stream and return an emptystring as result, without waiting for the user to type anything!)If the user types something which is not an integer, then the nextInt method of the scanner will throw anInputMismatchException. In that case the code of your readPosInt method must catch the exception, useSystem.out.println to print the error message You must type an integer! to the user (useSystem.out.println for this, not System.err.println, otherwise you might hit a bug in Eclipse...), use thescanners nextLine method to read (and ignore) the wrong input typed by the user of the program (if you do not dothis, the wrong input typed by the user will remain in the input stream, and the next time you call the nextInt methodagain, you will get an InputMismatchException again!), and then do the whole thing again (including printingagain the string argument of the readPosInt method) to try to read an integer again (hint: put the whole code of themethod inside a while loop).After reading the integer and the newline character (which is just ignored), the readPosInt method tests the integer.If the integer is bigger than or equal to zero, then the readPosInt method returns the integer as result. If the integeris strictly less than zero, then the readPosInt method uses System.out.println to print the error messagePositive integers only! to the user (use System.out.println for this, not System.err.println,otherwise you might hit a bug in Eclipse...), and then does the whole thing again (including printing again the stringargument of the readPosInt method) to try to read an integer again (hint: just print the error message, and then thewhile loop you already have around the whole code will automatically do the whole thing again...)For example, if you want to check that your two methods readLine and readPosInt work correctly, put thefollowing code in the main method of your CLI class:public static void main(String[] args) {String str1 = readLine(Type some text: );System.out.println(Text read is: + str1);int i = readPosInt(Type an integer: );System.out.println(Integer read is: + i);String str2 = readLine(Type some text again: );System.out.println(Text read is: + str2);}then running the main method of the CLI class should look like this (where aaaa bbbb, cccc, dddd eeee, -100,-200, 1234, and ffff gggg are inputs typed by the user on the keyboard):Type some text: aaaa bbbbText read is: aaaa bbbbType an integer: ccccYou must type an integer!Type an integer: dddd eeeeYou must type an integer!Type an integer: -100Positive integers only!Type an integer: -200Positive integers only!Type an integer: 1234Integer read is: 1234Type some text again: ffff ggggText read is: ffff ggggQuestion 7Once you have checked that your methods readLine and readPosInt work correctly, remove all the code insidethe main method of the CLI class so that the main method is empty again.In the rest of this question, use the readLine and readPosInt methods every time your program needs to read astring or an integer from the user.In the empty main method of the CLI class, create a single FinanceOffice object with the name UIC FO. Themain method of the CLI class must then print a menu that allows the user of your software to do six different actionsthat involve the finance office object, and your program must t代写program、代做Python,c++程序语言、代写Jhen read an integer from the user that indicates whichaction must be performed by the program (see below for the details of each action). Use the readPosInt method toprint the menu (give the string for the menu as the argument of readPosInt) and to read the integer typed by theuser.For example, the menu should look like this:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6):The user then types an integer between 1 and 6 to select the action.For example (where 3 is an input from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3and your program then performs the selected action.After an action has been performed by your program, your program must again print the menu and ask again the user ofthe program for the next action to perform (hint: put the whole code of the main method inside a while loop, exceptfor the one line of code that creates the single finance office object).If the user types an integer which is not between 1 and 6, then your program must print an error message Unknownaction! to the user (hint: when testing the integer for the action, use the default case of a switch statement)and then print the menu again (by just going back to the beginning of the while loop).For example (where 7 is an input from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 7Unknown action!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6):If the user types something which is not an integer, the readPosInt method that you implemented in the previousquestion will automatically repeat the menu and ask the user to type an integer again until the user actually types aninteger, so you do not have to worry about this in the code of the main method of your CLI class.For example (where aaaa and bbbb cccc are inputs from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): aaaaYou must type an integer!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): bbbb ccccYou must type an integer!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6):Here are the detailed explanations for each action.Action 1: printing the total amount of debt.When the user of the software specifies action 1, your program must simply print on the screen the total amount ofdebt for all the payers of the finance office. Then your program goes back to printing the menu of actions (by just goingback to the beginning of the while loop).For example (where 1 is an input from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 2000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6):Action 2: adding a new payer to the finance office.When the user of the software specifies action 2, your program must add a new payer to the finance office. To add anew payer, your program needs to ask the user three things: the type of payer (an integer read using readPosInt: theinteger 1 represents a student, the integer 2 represents an employee, the integer 3 represents a faculty member, andany other integer must result in an error message Unknown type of payer! being printed and the softwaregoing immediately back to the main menu), the name of the payer (a string read using readLine), and the initialamount of money for the debt (for a student) or the salary (for an employee or a faculty member) when the payer iscreated. You program must then create the correct payer, add it to the finance office, and print an information messagefor the user of the software. The program then goes back to the menu.For example (where 1, 2, -100, 4, 2, 1, UIC Student, 5000, 1, 2, 2, Philippe, 1000, 1, 2, 3, Meunier, 2000,and 1 are inputs from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 0Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): -100Positive integers only!Enter the payer type (student:1 employee:2 faculty member:3): 4Unknown type of payer!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): 1Enter the name of the payer: UIC StudentEnter the initial amount of money: 5000Student UIC Student with 5000 yuans of debt addedType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 5000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): 2Enter the name of the payer: PhilippeEnter the initial amount of money: 1000Employee Philippe with 1000 yuans of salary addedType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 4000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): 3Enter the name of the payer: MeunierEnter the initial amount of money: 2000Faculty member Meunier with 2000 yuans of salary addedType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 2000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6):Note that the readPosInt method prevents the initial amount of money from being negative, so the constructor forthe Employee class will never throw a NegativeSalaryException when you create an employee object. Nevertheless the code of the main method of your CLI class must handle this exception correctly by printing the errormessage BUG! This must never happen! and immediately terminating the program usingSystem.exit(1). The same applies to a faculty member.Action 3: listing the amount of debt for a given payer.When the user of the software specifies action 3, your program must ask the user to type the name of a payer, and theprogram then prints the amount of debt for this payer.For example (where 3, UIC Student, 3, Philippe, 3, and Meunier are inputs from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has 5000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -1000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has -2000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6):If the name of the payer is wrong (the finance office does not have a payer with this name) then anUnknownPayerException will be thrown by the FinanceOffice object. The code of the main method of yourCLI class must then catch this exception, print the error message from the exception object, and then it just goes backto printing the menu of actions (by just going back to the beginning of the while loop).For example (where 3 and aaaa are inputs from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: aaaaPayer aaaa unknownType an action (total:1 add:2 get:3 give:4 take:5 quit:6):Action 4: paying money to a given payer.When the user of the software specifies action 4, your program must ask the user to type the name of a payer and anamount of money, and the program then uses that amount of money to call the pay method of the payer with thatname. Then the program goes back to the main menu.For example:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has 5000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: UIC StudentEnter the amount of money: 1000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has 4000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -1000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: PhilippeEnter the amount of money: -500Positive integers only!Enter the amount of money: 500Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has -2000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: MeunierEnter the amount of money: 500Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has -1500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6):If the name of the payer is wrong (the finance office does not have a payer with this name) then anUnknownPayerException will be thrown by the FinanceOffice object. The code of the main method of yourCLI class must then catch this exception, print the error message from the exception object, and then it just goes backto printing the menu of actions (by just going back to the beginning of the while loop).For example:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: aaaaEnter the amount of money: 1000Payer aaaa unknownType an action (total:1 add:2 get:3 give:4 take:5 quit:6):If a payer is an employee and the amount of money typed by the user is too big then a NegativeSalaryExceptionwill be thrown by the Employee object. The code of the main method of your CLI class must then catch thisexception, print the error message from the exception object, and then it just goes back to printing the menu of actions(by just going back to the beginning of the while loop).For example:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: PhilippeEnter the amount of money: 1500An employee cannot be overpaid by 1000 yuans!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has 4000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: UIC StudentEnter the amount of money: 5000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has -1000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has -1500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 4Enter the name of the payer: MeunierEnter the amount of money: 2000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has 500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6):Action 5: taking money from a given payer.When the user of the software specifies action 5, your program must ask the user to type the name of a payer and anamount of money, and the program then uses that amount of money, makes it negative, and pays that negative amountto the payer with that name. Then the program goes back to the main menu.For example:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has 4000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 5Enter the name of the payer: UIC StudentEnter the amount of money: 1000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: UIC StudentUIC Student has 5000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 5Enter the name of the payer: PhilippeEnter the amount of money: -500Positive integers only!Enter the amount of money: 500Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: PhilippePhilippe has -1000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has -1500 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 5Enter the name of the payer: MeunierEnter the amount of money: 500Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 3Enter the name of the payer: MeunierMeunier has -2000 yuans of debtType an action (total:1 add:2 get:3 give:4 take:5 quit:6):If the name of the payer is wrong (the finance office does not have a payer with this name) then anUnknownPayerException will be thrown by the FinanceOffice object. The code of the main method of yourCLI class must then catch this exception, print the error message from the exception object, and then it just goes backto printing the menu of actions (by just going back to the beginning of the while loop).For example:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 5Enter the name of the payer: aaaaEnter the amount of money: 1000Payer aaaa unknownType an action (total:1 add:2 get:3 give:4 take:5 quit:6):Note that, even if a payer is an employee, the readPosInt method prevents the amount of money typed by the userfrom being negative. This means an employee will never throw a NegativeSalaryException. Nevertheless thecode of the main method of your CLI class must handle this exception by printing the error message BUG! Thismust never happen! and immediately terminating the program using System.exit(1).Action 6: quitting the program.When the user of the software specifies action 6, your program must print a Goodbye! message, and terminate theprogram using: System.exit(0).For example (where 6 is an input from the user):Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 6Goodbye!Here is a more complete example of running the software:Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): aaaaYou must type an integer!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): bbbb ccccYou must type an integer!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): -100Positive integers only!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 7Unknown action!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 0Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): -100Positive integers only!Enter the payer type (student:1 employee:2 faculty member:3): 4Unknown type of payer!Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): 1Enter the name of the payer: UIC StudentEnter the initial amount of money: 5000Student UIC Student with 5000 yuans of debt addedType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 5000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): 2Enter the name of the payer: PhilippeEnter the initial amount of money: 1000Employee Philippe with 1000 yuans of salary addedType an action (total:1 add:2 get:3 give:4 take:5 quit:6): 1Total amount of debt: 4000Type an action (total:1 add:2 get:3 give:4 take:5 quit:6): 2Enter the payer type (student:1 employee:2 faculty member:3): 3

你可能感兴趣的:(讲解:program、Python,c++、Java、EclipseMatlab|Web)