讲解:CMPUT 29C/C++、C/C++、C/C++

2018/11/4 CMPUT 291 (Fall 2018 LAB LEC): Mini-Project 1https://eclass.srv.ualberta.ca/mod/page/view.php?id=3273240 1/5Dashboard/ My courses/ CMPUT 291 (Fall 2018 LAB LEC)/ 8 October - 14 October/ Mini-Project 1CMPUT 291 - File and DatabaseManagement (Fall 2018)Mini-Project 1CMPUT291 - Fall 2018 Mini Project I(group project)g2Ag5Bg4Bg20g3g34g55g5Cg3g1Bg3g47g5Ag3g1Bg56g53g3Clarifications:You are responsible for monitoring the course news and discussion forums in eclass and thissection of the project specification for more details and clarifications. No clarification will beposted after g1Bg56g53g3g55g54g3g34g55g5Cg3g1A.Oct 26. To get the timestamp in sqlite, you will need datetime(now). The function date(now)will give date but not time.Oct 31. At demo time, you will be given a database file name (that has our test data) and youwill be passing it to your application as a command line argument. Dont hard-code thedatabase name in your application since you cannot change your code at demo time.Oct 31. Member A can book member B only on the rides offered by member A (i.e. member Ais the driver of the ride).Oct 31. All string matches are case-insensitive except when matching the password. Youcannot make any assumption on the case of the strings in the database. The database canhave strings in uppercase, lowercase or any mixed format.Oct 31. When booking a member on a ride, the pickup and the drop off locations can be anylocations from the locations table. They dont have to match the pickup, drop off or theenroute locations of the ride.2018/11/4 CMPUT 291 (Fall 2018 LAB LEC): Mini-Project 1https://eclass.srv.ualberta.ca/mod/page/view.php?id=3273240 2/5Nov 2. Regarding error checking, every good programmer should do some basic errorchecking to make sure the data entered is correct. We cannot say how much error checkingyou should or should not do, or detail out all possible checkings. We wont be trying to breakdown your system but your system also should not break down when the user makes amistake.IntroductionThe goal of this assignment is twofolds: (1) to teach the use of SQL in a host programminglanguage, and (2) to demonstrate some of the functionalities that result from combining SQLwith a host programming language.Your job in this project is to build a system that keeps the enterprise data in a database and to provideservices to users. You will be storing data in a SQLite database and will be writing code in Python (orsimilarly Java/JDBC, C, etc.) to access it. Your code will implement a simple command line interface.You are free to implement a GUI interface instead but there will be no support nor bonus for doing that.You are also free to write your code in Python, Java, C, C++, Perl or any other language that is suitedfor the task. If you decide to use any language other than Python, discuss it with the instructor first.Your project will be evaluated on the basis of 84% of the mark for implementing the functionalities listedin this specification; this component will be assessed in a demo session. Another 12% of the mark willbe assigned for both the documentation and the quality of your source code. 4% of the mark is assignedfor the quality of your group coordination and the project break-down between partners.Group work policyYou will be doing this project with g55g54g4Bg3g55g58g3g5Ag5Dg55g3g55g5Ag4Eg4Bg58g3g56g47g58g5Ag54g4Bg58g59g3from the 291 class. Register yourgroup at the group registration page. It is assumed that all group members contributesomewhat equally to the project, hence they would receive the same mark. In case of difficultieswithin a group and when a partner is not lifting his/her weight, make sure to document all yourcontributions. If there is a break-up, each group member will get credit only for his/her portionof the work completed.Database SpecificationYou are given the following relational schema.members(email, name, phone, pwd)cars(cno, make, model, year, seats, owner)locations(lcode, city, prov, address)rides(rno, price, rdate, seats, lugDesc, src, dst, driver, cno)bookings(bno, email, rno, cost, seats, pickup, dropoff)enroute(rno, lcode)requests(rid, email, rdate, pickup, dropoff, amount)inbox(email, msgTimestamp, sender, content, rno, seen)Tables are derived from the specification of Assignment 1 and are identical to those in Assignment 2except (1) the field pwd which is added to members, and (2) table inbox which is new. The table inboxwill keep the messages exchanged between members. For example, the tuple in inboxindicates that member m1 has a message from member m2 with a timestamp t (this is of type date andincludes date and time) and content c, and the message is regarding ride r. The last column indicates2018/11/4 CMPUT 291 (Fall 2018 LAB LEC): Mini-Project 1https://eclass.srv.ualberta.ca/mod/page/view.php?id=3273240 3/5whether the message is seen or not and can take one of the values y and n. Each time a message issent, the timestamp is set by your system to current date and time (i.e. date(now) in sqlite), rno is set tothe current ride number and seen is set to n. The SQL commands to create the tables of the systemare given here (right click to save as a file). Use the given schema in your project and do not changeany table/column names.Login ScreenThe first screen of your system should provide options for members to login and for new members toregister. Existing members should be able to login using a valid email and password, denotedwith email and pwd in table members. After a login, all unseen messages of the member will bedisplayed, and the status of the messages will be set to seen (i.e, the seen column is set to y).Unregistered members should be able to sign up by providing a unique email, a name, a phone, and apassword. Proper messages should be given if the provided email is not unique. After a successful loginor signup, members should be able to perform. the subsequent operations (possibly chosen from amenu) as discussed next.Members should be able to logout and there must be also an option to exit the program.System FunctionalitiesMembers should be able to perform. all of the following tasks. All string matches must be case-insensitive (e.g., edmonton will match Edmonton, EDMONTON, edmontoN and edmonton).1. g35g4Cg4Cg4Bg58g3g47g3g58g4Fg4Ag4Bg14The member should be able to offer rides by providing a date, the number ofseats offered, the price per seat, a luggage description, a source location, and adestination location. The member should have the option of adding a car number and anyset of enroute locations. For locations (including source, destination and enroute), themember should be able to provide a keyword, which can be a location code. If thekeyword is not a location code, your system should return all locations that have thekeyword as a substring in city, province or address fields. If there are more than 5matching locations, at most 5 matches will be shown at a time, letting the member selecta location or see more matches. If a car number is entered, your system must ensure thatthe car belongs to the member. Your system should automatically assign a unique ridenumber (rno) to the ride and set the member as the driver of the ride.2. g39g4Bg47g58g49g4Eg3g4Cg55g58g3g58g4Fg4Ag4Bg59g14The member should be able to enter 1-3 location keywords and retrie代做CMPUT 29C/C++实验作业、C/C++课程设计代写留学生、代写留学生C/C++课程设计veall rides that match all keywords. A ride matches a keyword if the keyword matches one ofthe locations source, destination, or enroute. Also a location matches a keyword if thekeyword is either the location code or a substring of the city, the province, or the addressfields of the location. For each matching ride, all information about the ride (from therides table) and car details (if any) will be displayed. If there are more than 5 matches, atmost 5 will be shown at a time, and the member is provided an option to see more. Themember should be able to select a ride and message the member posting the ride thath/she wants to book seats on that ride.3. g28g55g55g51g3g53g4Bg53g48g4Bg58g59g3g55g58g3g49g47g54g49g4Bg52g3g48g55g55g51g4Fg54g4Dg59g14The member should be able to list all bookings onrides s/he offers and cancel any booking. For any booking that is cancelled (i.e. beingdeleted from the booking table), a proper message should be sent to the member whosebooking is cancelled. Also the member should be able to book other members on therides they offer. Your system should list all rides the member offers with the number of2018/11/4 CMPUT 291 (Fall 2018 LAB LEC): Mini-Project 1https://eclass.srv.ualberta.ca/mod/page/view.php?id=3273240 4/5available seats for each ride (i.e., seats that are not booked). If there are more than 5matching rides, at most 5 will be shown at a time, and the member will have the option tosee more. The member should be able to select a ride and book a member for that ride byentering the member email, the number of seats booked, the cost per seat, and pickupand drop off location codes. Your system should assign a unique booking number (bno)to the booking. Your system should give a warning if a ride is being overbooked (i.e. thenumber of seats booked exceeds the number of seats offered), but will allow overbookingif the member confirms it. After a successful booking, a proper message should be sent tothe other member that s/he is booked on the ride.4. g36g55g59g5Ag3g58g4Fg4Ag4Bg3g58g4Bg57g5Bg4Bg59g5Ag59g14The member should be able to post a ride request by providing a date,a pick up location code, a drop off location code, and the amount willing to pay per seat.The request rid is set by your system to a unique number and the email is set to the emailaddress of the member.5. g39g4Bg47g58g49g4Eg3g47g54g4Ag3g4Ag4Bg52g4Bg5Ag4Bg3g58g4Fg4Ag4Bg3g58g4Bg57g5Bg4Bg59g5Ag59g14The member should be able to see all his/her riderequests and be able to delete any of them. Also the member should be able to provide alocation code or a city and see a listing of all requests with a pickup location matching thelocation code or the city entered. If there are more than 5 matches, at most 5 matches willbe shown at a time. The member should be able to select a request and message theposting member, for example asking the member to check out a ride.Groups of size 3 must counter SQL injection attacks and make the password non-visible at the time oftyping.TestingAt development time, you will be testing your programs with your own data sets (butconforming to the project specification). At demo time, we will be creating the databaseusing these SQL statements (right click to save as a file) and will be populating it with our owntest data set. Your application will be tested under a TA account.The demo will be run using the source code submitted and nothing else. It is essential to includeevery file that is needed to compile and run your code including all source code and any makefile orscript. that you may use to compile or run your code. You will neither be able to change your code, noruse any file other than those submitted. This policy can be altered only in exceptional cases at theinstructors discretion and for a hefty penalty. As a test drill, you should be able to set up your applicationunder someone elses account (in case of testing, this would be under a TA account) within 3 minutes atmost.Every group will book a time slot convenient to all group members to demo their projects. At demotime, all group members must be present.The TA will be using a script. to both create and populatethe tables. The TA will be asking you to perform. various tasks and show how your application ishandling each task. A mark will be assigned to your demo immediately after the testing.Instructions for SubmissionsYour submission includes (1) the application source code, (2) README.txt, and (3) your designdocument Report.pdf.Create a single gzipped tar file with all your source code, additional files you may need foryour demo, README.txt and Report.pdf. Name the file g56g58g50g49g55g4Ag4Bg14g5Ag4Dg60.2018/11/4 CMPUT 291 (Fall 2018 LAB LEC): Mini-Project 1https://eclass.srv.ualberta.ca/mod/page/view.php?id=3273240 5/5You are logged in as Dongheng Li (Log out)CMPUT 291 (Fall 2018 LAB LEC)HelpEmailSubmit your project tarfile in the project submission site.All partners in a group must submit their own copies (even though the copies may beidentical).The file README.txt is a text file that lists the names and ccids of all group members. This file must alsoinclude the names of anyone you collaborated with (as much as it is allowed within the course policy) ora line saying that you did not collaborate with anyone else. This is also the place to acknowledge theuse of any source of information besides the course textbook and/or class notes.Your design document must be type-written and is saved as a PDF and be included in your submission.Your design document cannot exceed 4 pages.The design document should include (a) a general overview of your system with a small user guide, (b)a detailed design of your software with a focus on the components required to deliver the majorfunctions of your application, (c) your testing strategy, and (d) your group work break-down strategy. Thegeneral overview of the system gives a high level introduction and may include a diagram showing theflow of data between different components; this can be useful for both users and developers of yourapplication. The detailed design of your software should describe the responsibility and interface of eachprimary function or class (not secondary utility functions/classes) and the structure and relationshipsamong them. Depending on the programming language being used, you may have methods, functionsor classes. The testing strategy discusses your general strategy for testing, with the scenarios beingtested, the coverage of your test cases and (if applicable) some statistics on the number of bugs foundand the nature of those bugs. The group work strategy must list the break-down of the work itemsamong partners, both the time spent (an estimate) and the progress made by each partner, and yourmethod of coordination to keep the project on track. The design document should also include adocumentation of any decision you have made which is not in the project specification or any coding youhave done beyond or different from what is required.Your design document will not include the source code. However your source code will be inspected forsource code quality (whether the code is easy to read and if data processing is all done in SQL and notin the application) and self-documentation (whether the code is properly commented).Last modified: Friday, 2 November 2018, 6:07 PM◄ Mini-Project 1 groups Jump to...Introduction to Python bsddb3 ►转自:http://ass.3daixie.com/2018110618113584.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,911评论 5 460
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 82,014评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 142,129评论 0 320
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,283评论 1 264
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,159评论 4 357
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,161评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,565评论 3 382
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,251评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,531评论 1 292
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,619评论 2 310
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,383评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,255评论 3 313
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,624评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,916评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,199评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,553评论 2 342
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,756评论 2 335

推荐阅读更多精彩内容