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

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

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

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

EG1hao
网课代修代上,cs代写代考
C/C++代写
您的位置: 主页 > 编程案例 > C/C++代写 >
代写C++/C:C语言或C++KIT107 Programming 2018 Assignment 2 - C++代写
发布时间:2021-07-25 22:31:47浏览次数:
The assignment is due at 3PM Wednesday September 19th 2018BackgroundAh, the Donald. Everyone’s favourite President. A modern politician who shares his, um, ‘thoughts’ with us each day via Twitter. You could follow his thoughts too (@realdonaldtrump) but let’s face it, you’ve got better things to do. Like this assignment… So I’ll do it for you.I’ve archived my favourite 4000ish President Trump tweets into a single text file. That’s all of them from 30/12/’16 up to 14/8/’18. The file consists of one tweet per line; each tweet consists of the date and time, a tab character, and then the text of the tweet.You will need to store the collection of tweets in monthly clusters (January– December) and within each cluster the tweets should be stored in the order they are added (i.e. first ones at the front, last ones at the back). You will need to provide some summary data (e.g. number of tweets per month, total number of tweets), and an ability to display all tweets containing a certain string, e.g. “fake news” or “dog”, or for a certainmonth.aWhich underlying data structure (array or linked-list) will you use as a basis to model the collection? In two–three sentences, justify youranswer.bWhich kind of abstract data type (binary tree, general tree, array, stack, priority queue, double-ended queue, set, list, etc.) would you use to model the collection? In two–three sentences, justify your answer by indicating the functionalityrequired.cWhich underlying data structure (array or linked-list) will you use as a basis to model the cluster of tweets for each month? In two–three sentences, justify your answer.dWhich kind of abstract data type (binary tree, general tree, array, stack, priority queue, double-ended queue, set, list, etc.) would you use to model the cluster of tweets for each month? In two–three sentences, justify your answer by indicating the functionalityrequired.The types required to implement this include the following:typedef???cluster;typedefstruct{char*name;clustertweets;}month;typedef???collection;collectionarchive;In other words, you must create a struct (called month in the above example) which combines the month’s name with your answer to (c) above to represent the cluster of tweets for that particular month, and then use that as a basis for another type (used to create a variable called archive in the above example) which uses your answer to (a) above to create a collection of months. Therefore, you must define both clusterand collection.A tweet is defined as follows:structtweet_int{chardate[30];chartext[300];};typedefstructtweet_int*tweet;and you may assume the existence of those types and the following functions:voidinit_tweet(tweet*tp,char*t_name,char*t_text);char*get_date(tweett);char*get_text(tweett);voidset_date(tweett,char*t_name);voidset_text(tweett,char*t_text);char*to_string(tweett);A Visual Studio project is available on MyLO for you to download and use as a starting point. This comprises the following files:·tweet.handtweet.c—theTweet ADTas specifiedabove.Thesefiles arecomplete;·assig_two218.c — the file which contains the main() function and other functions which implement the required task (including reading tweets from the textfile).eYou must complete assig_two218.cby adding the month, cluster, and collection types from above, the archive variable (which may be defined globally), and also functions to store tweets read from the file inyourcollection and to search and display the results. Function stubs are already present; you must complete these and may add others.If your answer to (a) or (c) above is a linked-list then you will also need to writenode.hand node.cand add them to the project.The project also contains the data file. This is just a text file which can be openedwith most applications.Program specificationFirst you must obtain the from a text file. The data must be stored in appropriate collections. At the top level there should be 12 months and for each there should be a cluster of the tweets (stored in the order encountered).As a tweet is read from the file, the tweet should be stored in the appropriate collection and cluster (depending upon the month).Once the data have been read in and stored in the collections, summary information (see below) should be provided and the user should be prompted to enter a search string. All tweets containing that search string — case insensitive — should then be displayed in order or month (but regardless of year) and the number of tweets displayed should should be printed. Hint: the code contains a function, lower(), to convert text to lower-case so that case-insensitive comparison may be made. The comparison can be made using strstr() which looks for its second parameter within its first.The output of your program should look something like the following:Program StyleThe program you write for this assignment must be contained in five files as follows:·tweet.hand tweet.cformanagingatweet;·node.hand node.cfornodes oflinkedlists (ifappropriate);·assig_two218.cfor the main algorithm which controls the reading of the data, the management of the collections, the searching, and the display of the results. There should be at least three functionsexcludingthe main()function within this file. No function should be longer than about half a screen-full or so of code.Your program should follow the following coding conventions:·constvariable identifiers should be used as much as possible, should be written all in upper case and should be declared before all othervariables;·#defined symbols should be used for constant values if constis inappropriate·global variables should be used sparingly with parameter lists used to pass information in and out offunctions.·local variables should only be defined at the beginning of functions and their identifiers should start with a lower caseletter;·everyifand if-elsestatementshould havea block ofcode (i.e. collectionsoflines surroundedby{and})forboththeifpartand the elsepart (if used)·every do, for, and whileloop should have a block of code (i.e. {}s)·the keyword continueshould not be used;·thekeyword breakshould onlybeusedas part ofaswitchstatement;·opening and closing braces of a block should bealigned;·all code within a block should be aligned and indented 1 tab stop (or 4 spaces) from the braces marking thisblock;·commenting:oThere should be a block of header comment which includes atleast§filename§studentname§student identitynumber§a statement of the purpose of theprogram§dateoEach variable declaration should becommentedoThere should be a comment identifying groups of statements that do various parts of thetaskoComments should describe the strategy of the code and should not simply translate the C intoEnglishWhat and how to submitWhat to submitYou must make both a paper and an electronic submission.Paper submission·A paper cover page (blanks can be collected from the Information and Communications Technology Discipline HelpDesk).·Written answers to parts (a)–(d) above.·A landscape oriented print-out of assig_two218.cand any other program files you have added to the solution. Your assignment will not be fully marked unless these arepresent.Electronic submission·You should submit the entire Visual Studio project folder compressed as a ZIPfile.How to submitPaper submission·Firmly staple together all of the required documents (with the signed cover page on top) and place them in the appropriate submissions box near the ICTHelpDesk.Electronic submission·You should ZIP the Visual Studio project folder and then submit it to the “Assignment 2” assignment drop-box on KIT107’s MyLOsite.Marking scheme

所有的编程代写范围: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++、数据结构代写、代写数据结构、数据结构代做、代做数据结构等留学生编程作业代写服务。