EssayGhost Assignment代写,Essay代写,网课代修,Quiz代考

EssayGhost-Essay代写,作业代写,网课代修代上,cs代写代考

一站式网课代修,论文代写

高质量的Assignment代写、Paper代写、Report代写服务

EG1hao
网课代修代上,cs代写代考
Java代做
您的位置: 主页 > 编程案例 > Java代做 >
代做Java:代写CS之JAVA An Online Ticket Exchange 作业加急 - Java代做
发布时间:2021-07-25 10:24:54浏览次数:
Notes·Please follow both the Programming Standards and Assignment Guidelines for all work you submit. Programming standards 1-22 are in effect, but see also the notes at the bottom of thisassignment.·Hand-in will be via the UM Learn Assignment facility, which will be demonstrated in class. Make sure you leave enough time before the deadline to ensure your hand-in worksproperly.·Official test data will be provided several days before the assignment due date.Until then, work with your own testdata.·All assignments in this course will carry an equalweight.Assignment 1: An Online Ticket ExchangeDescriptionGetting tickets for games for certain sports teams can be difficult. Many tickets are already held by season ticket owners. Online fraudsters take advantage of this demand to sell phony tickets. However, owners of legitimate tickets may need to sell tickets to certain games and would like to do so without the inconvenience of having to arrange a meeting with a potential buyer.Online ticket exchanges have been created by teams in order to protect both buyer and seller, and to make the process simple. Season ticket holders are the only ones who may offer tickets for sale, and they are automatically given an account on the exchange (they may also buy additional seats). Those wanting to buy tickets create an account on the exchange. When they wish to buy seats, they enter their buy request, and the exchange attempts to match them up with a seller. If a match is found, the exchange processes payment (we are not modelling the payment in this assignment) and makes the tickets available to the buyer, either as a printable ticket or a QR code that can be displayed on a smartphone.Data FilesThere are several data files containing different types of information. They are described below. Note that where names are specified, they may include spaces and special characters (e.g., single quotes) but do not include newline characters.·Games file: this file contains information on the season s games, one game per line, including game number, date and name of the opponent, respectively. The game number is a positive integer, the date is written in yyyy/mm/dd format (where y, m and d are digits), and opponent is a name. An example is shownbelow:1 2018/09/4 Toronto Maple Leafs·Season ticket file: this file contains information on the season ticket holders, one ticket holder per line. Included is the ticket holder s name, which may contain blanks, and the number of tickets held. An example is shownbelow:Chipman, Mark 12·Transaction file: This file contains information on transactions that occur. Each transaction is on one line of the file. More details about transactionsfollow.For each type of transaction, you may assume that the type of each data item is correct (i.e. integers or strings). Other types of errors are permitted though (e.g. incorrect spelling, or an integer not found in the data).Each transaction begins with one of five 3-letter codes. A comment line is also supported.1.ADD: Add a new ticket buyer to theexchange.The line has the form ADD namewhere nameis the name of the buyer. You may assume that buyer names are unique.2.SEL: A season ticket holder offers tickets forsale.The line has the form SEL game quantity namewhere gameis the game number, quantityis how many tickets are for sale and nameis the name of the ticket holder. When tickets are offered for sale, they must be assigned AT RANDOM to any buyers waiting for them.3.BUY: A buyer offers to buytickets.The line has the form BUY game quantity namewhere gameis the game number, quantity is how many tickets are wanted and name is the name of the buyer. A buyer may have only one BUY request for any single game.4.CAN: A buyer cancels an offer to buytickets.The line has the form CAN game namewhere gameis the game number and nameis the name of the buyer.5.REM: A buyer removes her account from theexchange.The line has the form REM namewhere nameis the name of the buyer. Only buyers can be removed from the exchange, and any outstanding buy offers must also be deleted.6.#: Lines beginning with a hashtag are comments and are ignored by theprogram.Transaction error processingEach transaction may be either successful or contain one or more errors that must be reported. The list below describes some error conditions your program should detect (but there may be others as well).1.ADD: nameis already in the exchange as a buyer or ticket holder.2.SEL:gameisnotavalid gamenumber,quantityismorethanthenumber owned by the ticket holder, nameis not a ticket holder.3.BUY:gameisnotavalidgamenumber,nameisnot amemberoftheexchange,or already has a BUY request for thisgame.4.CAN:gameisnotavalid gamenumber,nameisnotamember oftheexchangeorelse does not have a BUY request for thisgame.5.REM: nameis not a buyer in the exchange (you can t remove a ticket holder).Main method and File.javaIn order to make marking assignments easier, your main method MUST accept the namesof thethree input filestransaction file as a command-line argument. The data file names onthe command-line must be in the same order as described above (games, ticket holders,transactions). The other two input files can have their names hard-coded into your program (as games.txt and ticketHolders.txt). A sample main class will be given to you, that has the code necessary to accept file names on the command-line, which you are free to use (or ignore) as you wish. Utility functions used by this sample main class are contained in File.java, which is also given to you.NO PACKAGESDO NOT USE PACKAGES! Any assignment that uses packages will receive a zero!OutputFor each transaction, produce a line of output (to standard output), describing the relevant details.At the end of the program, produce a summary description. This description contains a list of all the ticket purchases for all games, ordered by game number first, then ordered by buyer.More details of the output will be released shortly.Data StructuresThere are some restrictions on data structures you must use for the assignment. Do not use ANY built-in Java collection classes (e.g. ArrayLists, Hashes, ) in this assignment, or Java Generics: any linked structures must be your own, built from scratch. You should avoid using arrays other than one exception listed specifically below (other than for minor things such as temporary storage when parsing strings, etc.). See the notes at the bottom of this assignment for further details on arrays.The dataset descriptions above should be enough for you to generate your own test data to start with. Official test data will be provided several days before the assignment is due.Notes·This is a large programming problem with many pieces to the puzzle remember your incremental development strategy from COMP1020 and get small pieces working rather than trying to tackle the whole thing atonce.·The ADTs required above must be linked structures written by you. Do not use built-in Java collection classes anywhere here. Plain arrays (not ArrayLists) maybe used as basic temporary storage to support things like string parsingusingsplit(). Don t use them to build data structures or for storage in data. If your solution requires ADTs other than those described above, these must also be your own linked structures.·See the documentation for class Random in Java for built-in routines to choose randomly among the possibilities yougenerate.·Your program will be tested by the markers under Unix and must run with a simple javac/java as per the Running Java instructions on the coursewebsite.·As yet, we do not know much OO you should follow the rules of abstraction and object-oriented programming based on what you have learned in previous courses and given the limitations specified in this assignment. Use separate classes for entities like buyers and offers to sell. Try to make other entities and classes for your ADTs. Do not be afraid of using many classes breaking things up usually makes for much simpler pieces. The model solution I will show you uses more than ten classes, just as anexample.代写CS Finance|建模|代码|系统|报告|考试编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 机器学习金融类:统计,计量,风险投资,金融工程,R语言,Python语言,Matlab,建立模型,数据分析,数据处理服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导天才写手,代写C,代写R,代写JAVA,考试助攻E-mail:[email protected]微信:BadGeniuscs 工作时间:无休息工作日-早上8点到凌晨3点如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。

所有的编程代写范围:essayghost为美国、加拿大、英国、澳洲的留学生提供C语言代写、代写C语言、C语言代做、代做C语言、数据库代写、代写数据库、数据库代做、代做数据库、Web作业代写、代写Web作业、Web作业代做、代做Web作业、Java代写、代写Java、Java代做、代做Java、Python代写、代写Python、Python代做、代做Python、C/C++代写、代写C/C++、C/C++代做、代做C/C++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。