159.272留学生作业代写、代做Programming Par

2019-04-09  本文已影响0人  lachichan

159.272 Programming ParadigmsAssignment 1Object-oriented Programming in JavaTotal marks: 15 marksDue: 8pm Friday 12 April 2019Important: this is an individual assignment. You must not share your code with others,or use other’s code (this will be plagiarism!). If we find two assignments that are copiedfrom each other, both assignments will receive Zero marks!Submit your work on Stream by 8pm (Beijing time) Friday 12th April 2019. You mustsubmit your final work using the stream submission system before the deadline (seestream for details).There is a penalty for late submissions. The penalty is 10% deducted from the totalpossible mark for every day delay in submission (one day late – 90%, two days – 80% etc).You are expected to manage your source code, this includes making frequent backups.“The cat ate my source code” is not a valid excuse for late or missing submissions.Consider managing your code in a private repository (github, gitlab, bitbucket or similar).Set you repository to private (this is essential here to avoid plagiarism), we reserve theright to deduct marks from your submission if the repository is public.Assignment 1 ObjectivesApply the concepts learnt in part 1 of this course, in particular:1. core OO concepts (inheritance, encapsulation, object identity and equality)2. explore and use an API from the standard library (such as java.io)3. exception handling4. unit testing5. building user interfaces with swingTasksWork individually to create the following program in Java using Eclipse. Create an Eclipse projectassignment1- , where is replaced by your student id. Within this project, create apackage nz.ac.massey.cs159272.ass1.id. In this package, create the following classes (asexplained in part 1-part 4).Part 1 Domain Model [5 marks]1. Create the following classes in your package:i. Course, with properties for number and name (both String)ii. Address, with properties for town (String), street (String), post code number(int) and house number (int)iii. Activity, with properties name and type (both String) (i.e., activities is for socialand sport activities that students enrolled in)iv. Student, with properties for name, first name, id (all String), dob (for“dateOfBirth”, of type java.util.Date), course (of type Course), activity (of typeActivity) and address (of type Address).2. All properties should be implemented using getters and setters, those can begenerated from your IDE.3. All classes should override equals(Object), and hashCode(), these methods mustadhere to the usual contract between equals and hashCode, all those can begenerated from your IDE.4. All classes should override toString(), these methods to return the string informationfrom these classes (e.g., for class Student, this will return first name, ID and dob(converted to string)).5. Student should have a clone() method that is a combination of deep and shallowclone: deep clone should be used for the address and dob, a shallow clone should beused for course and activity.Part 2 Persistency [4 marks]1. Create a class StudentStorage with the following three static methods:? void save(java.util.Collection,java.io.File file) throwsIOException – saves a list of students to a binary file and to CSV file,depending on what file format a user choose (see part 4). Note that thedata of referenced objects (address and course) should be saved as well.Please also read the hints at the end of the document! void save(java.util.Collection,String fileName) throwsIOException – saves a list of students to a binary file file with a givenname. No code should be replicated (copied & pasted) between the twoversions of save(..). java.util.Collection load(java.io.File file) throws IOException– reads student data from a binary file.2. save(..)/load (..) should preserve referential integrity: for instance, if two instances ofStudent share the same (==) course, then this should be preserved. I.e., whenloading these two instances from a file, they should reference the same Courseinstance.Part 3 Testing [3 marks]1. write a class TestCloningStudents with JUnit test(s) to test the clone() method inStudent.2. write a class TestPersistency with JUnit tests to test the save(..) and load (..) methodsin StudentStorage. In particular, write tests that “round-trip” data: create a list ofStudent instances list1, save it, then load it from the file as list2, and compare list1and list2.3. the roundtrip test should test whether save(..) and load (..) preserve referentialintegrity4. write tests to check whether the exception declared by load(..) work as expectedwhen an invalid file name is usedPart 4 Graphical User Interface(GUI) [3 marks]1. write a user interface StudentListEditor to edit lists of students, this is an executableclass (a class with a main method) that when executed opens a window2. the user interface must show all instances of students represented in a file, and aform that can be used to edit a selected instance3. for instance, this user interface could look as follows:Note : you don’t have to implement the publish or delete buttons !4. a table (using JTable) based “spreadsheet-like” user interface is also acceptable. Thesave / load functions in the toolbar should save / load data to/from files that areselected using file selection dialogs that pop up when the respective buttons arepressed. You can use the class javax.swing.JFileChooser for this purpose.5. Export the results to a file, you may choose a file format to save (.txt , .csv or .html).Feel free to implement this in multiple file formats if you wish.javax.swing.JFileChooser can be helpful here.Part 5 Bonus question: [1 mark]Create an executable java application studenteditor.jar with StudentListEditor as themain class.Hints1. you can use code and ideas from tutorials for the first three parts2. for part 2, have a look at the following classes:java.io.ObjectOutputStreamjava.io.ObjectInputStream3. plan how much time you want to invest to answer each question: 4 and 5 can take a lot oftime, but will only give you 3-4 marks, it might be better to focus on 1-3.4. see http://docs.oracle.com/javase/tutorial/deployment/jar/appman.html for instructions howto create executable jars (for the bonus questions).How to submit1. export the Eclipse project to a file assign1-.zip, where is replaced byyour student id2. check that your zip file contains all project files and java sources by unzipping the fileand inspecting its content before you submit , it is also recommended to re-import thisas a project into an Eclipse workspace to check this (in Eclipse, use File > Import >General > Existing Projects into Workspace)3. if you decide to do the bonus question (part 5), also include studenteditor.jar in theroot (top) folder of this zip fileUpload this file to Stream. Once completed, make sure that you click Submit (don’tjust save your work as a draft!!).本团队核心人员组成主要包括BAT一线工程师,精通德英语!我们主要业务范围是代做编程大作业、课程设计等等。我们的方向领域:window编程 数值算法 AI人工智能 金融统计 计量分析 大数据 网络编程 WEB编程 通讯编程 游戏编程多媒体linux 外挂编程 程序API图像处理 嵌入式/单片机 数据库编程 控制台 进程与线程 网络安全 汇编语言 硬件编程 软件设计 工程标准规等。其中代写编程、代写程序、代写留学生程序作业语言或工具包括但不限于以下范围:C/C++/C#代写Java代写IT代写Python代写辅导编程作业Matlab代写Haskell代写Processing代写Linux环境搭建Rust代写Data Structure Assginment 数据结构代写MIPS代写Machine Learning 作业 代写Oracle/SQL/PostgreSQL/Pig 数据库代写/代做/辅导Web开发、网站开发、网站作业ASP.NET网站开发Finance Insurace Statistics统计、回归、迭代Prolog代写Computer Computational method代做因为专业,所以值得信赖。如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

上一篇 下一篇

猜你喜欢

热点阅读