写作COMP2511语言编程、 辅导C++程序设计

” 写作COMP2511语言编程、 辅导C++程序设计Back in BlackoutForked from an inaccessible projectUpdate README.mdBraedon Wooding authored 3 days ago9d407a6eName Last commit Last updateReady to go back in blackout 2 weeks agoUpdate README.md 3 days agoDue: 8am Tuesday Week 4 (22nd June 2021)Value: 15% of course markCOMP2511 Assignment: Back in BlackoutContents0. Change LogYour Private RepositoryVideo1. Aims2. Preamble and ProblemA simple exampleSimulation3. RequirementsAssumptionsDevicesSatellites and PropertiesVisualisation4. Program Structure5. TasksTask 1 (World State)Task 1 a) Create DeviceTask 1 b) Move DeviceTask 1 b) Remove DeviceTask 1 d) Create SatelliteTask 1 e) Remove SatelliteTask 1 f) Show World StateTask 1 ExampleTask 2 (Simulation)Task 2 a) Schedule Device ActivationTask 2 b) Run the SimulationTask 2 ExampleTask 3 (Specialised Devices)List of Libraries you can use6. Other Requirements7. Design8. Testing and DryrunsAssignment-SpecificationProject ID: 143612 Leave project9 0? README.mdCOMP2511 Assignment: Back in BlackoutContentsimgsREADME.md2021/6/19 COMP2511 / 21T2 / Assignment-Specification GitLab httpss://gitlab.Cse.unsw.edu.au/COMP2511/21T2/assignment-specification 2/179. Style and Documentation10. Tips11. Submission12. Late Penalties13. Marking Criteria ?14. CreditsFri 4 Jun: Clarified List of Libraries that are allowed.Sat 5 Jun:Removed decimal place requirement on positions (just put the doubles as they are)Fixed up a typo in one of the examples(Merged into your repositories): TestHelper now doesnt require an exception message to exist (since some exceptions dont include it)Fixed Test Paths in SpecFixed up velocity for one of the examplesTue 8 Jun:Clarified activation periodsSimplified order of device connectionWed 9 Jun:Submission is now available!Specified that devices should connect based on lexiographical orderThurs 10 Jun:Make Part 3 a little more specific.Sun 13 Jun:Give a bit more Of a hint to the pseudo code for Task2Is located at httpss://gitlab.cse.unsw.edu.au/COMP2511/21T2/students/z555555/21T2-cs2511-assignmentMake sure to replace the zID in the header.Video discussing the assignment / test codePractice applying a systematic approach to object-oriented design processGain experience in implementing an object-oriented program with multiple interacting classesGain hands on experience with Java libraries and JSONSo much of todays technology uses Global Positioning System (GPS) information, for example, tasks such as tagging photographs with thelocation where they were taken, guiding drivers with car navigation systems, and even missile control systems. There are currently 31 active GPSsatellites orbiting the Earth all together providing near-constant GPS coverage. There are many other types of satellites too, such as the newSpaceX satellites aiming to provide internet access.In the far future, society has advanced enough that we have started to occupy the rings of Jupiter. However, to remain connected with the restof the universe they still rely on satellites! Four major corporations exist: SpaceX, Blue Origin, NASA (National Aeronautics and SpaceAdministration), and Soviet Satellites.Firstly, you will set up a very simplified simulation of the ring and its rotating satellites. Then well be running the simulation (causing thesatellites to orbit) and youll be responsible for maintaining connections.You will need to develop, design, and implement an object-oriented approach that utilises concepts such as abstraction, encapsulation,composition, and inheritance as taught in lectures.Lets assume initially there is a Blue Origin Satellite at height 10,000m above the centre of Jupiter and at = 20 (anticlockwise), there are threedevices in a (hollow) ring: DeviceA at = 30 (anticlockwise), DeviceB at = 180 (anticlockwise) and DeviceC at = 330 (anticlockwise).0. Change LogYour Private RepositoryVideo1. Aims2. Preamble and ProblemA simple example2021/6/19 COMP2511 / 21T2 / Assignment-Specification GitLab httpss://gitlab.cse.unsw.edu.au/COMP2511/21T2/assignment-specification 3/17DeviceA and DeviceC are Able to connect to the satellite as they are in view of the satellite. This is indicated by possibleConnections:[DeviceA,DeviceC] in the following world state (in JSON representation). An activation period of a device indicates the period duringwhich that device tries to establish connections to the available satellites. For this example, we initially assume that each device is dormant(inactive), and therefore activation periods for each device is an empty list in the following world state. Later we will define activation periodsand use them in establishing connections.{currentTime: 00:00,devices: [{activationPeriods: [],id: DeviceA,isConnected: false,position: 30,type: HandheldDevice},{activationPeriods: [],id: DeviceB,isConnected: false,position: 180,type: LaptopDevice},{activationPeriods: [],id: DeviceC,isConnected: false,position: 330,type: DesktopDevice}],Satellites: [{connections: [],height: 10000,id: Satellite1,position: 20,possibleConnections: [DeviceA,DeviceC],type: BlueOriginSatellite,velocity: 141.66}]}Now, using the velocity of the satellite (141.66 metres per minute, which at a height of 10,000m makes it have an angular velocity of 141.66 /10,000 = 0.014 degrees per minute), we can calculate the new position of the satellite after a full day, as shown below in the figure (thesatellite has moved 20.4 degrees as per 141.66 / 10000 * 1440, this gives us a new position of 20 + 20.4 = 40.4 ). In this new position,DeviceA and DeviceC are able to connect to the satellite and DeviceB is not able to connect to the satellite, because it is not in view of thesatellite.NOTE: For the sake of this assignment we will not be worrying about radians at all. You can either visualise it as the fact that the linearvelocities already take into account the radian offset (/180 or 180/ dependent on which way you are converting) or you can just saythat we are approximating them to be the same (radians == degrees). It doesnt matter and for this assignment we arent really caringabout the math, we are focusing on your design!2021/6/19 COMP2511 / 21T2 / Assignment-Specification GitLab httpss://gitlab.cse.unsw.edu.au/COMP2511/21T2/assignment-specification 4/17The new world state for this position is{currentTime: 00:00,devices: [{activationPeriods: [],id: DeviceA,isConnected: false,position: 30,type: HandheldDevice},{ActivationPeriods: [],id: DeviceB,isConnected: false,position: 180,type: LaptopDevice},{activationPeriods: [],id: DeviceC,isConnected: false,position: 330,type: DesktopDevice}],satellites: [{connections: [],height: 10000,id: Satellite1,position: 40.40possibleConnections: [DeviceA, DeviceC],type: BlueOriginSatellite,velocity: 141.66}]}Now, lets add the following activation periods:DeviceA – activationPeriods: [{ startTime: 00:00, endTime: 12:00 }]DeviceB – activationPeriods: [{ startTime: 00:00, endTime: 04:00 }]DeviceC – activationPeriods: [{ startTime: 07:00, endTime: 10:40 }]Given the above activation periods, the world state at current time 03:00 will be as shown below. Please note that the following:Device A is active at the current time of 03:00, and also in view of the satellite, so there is a connection between Device A and the satellite,represented by a solid grey line.Device C is not active at the current time of 03:00, and therefore there is no connection between the satellite and Device C.Device B is active but not in a view of the satellite, so there is no connection for Device B.2021/6/19 COMP2511 / 21T2 / Assignment-Specification GitLab httpss://gitlab.cse.unsw.edu.au/COMP2511/21T2/assignment-specification 5/17We then Can go forward to the time 10:00. At this point we have the following:Device A is active at the current time of 10:00, and also in view of the satellite, so there is a connection between Device A and the satellite.Device C is active at the current time of 10:00, and also in view of the satellite, so there is a connection between Device C and the satellite.Device B is not active and not in a view of the satellite, so there is no connection for Device B.Then, lets continue once more, and finish out the full day (so the current time is now 00:00 ). At this point both connections were completed(at different times). The DeviceA connection ended after 12:00 since the device was no longer active. A similar case occurred for DeviceC wherethe connection ended after 10:40 .The world state here is as follows;{currentTime: 00:00,devices: [{activationPeriods: [{ endTime: 12:00, startTime: 00:00 }],id: DeviceA,isConnected: false,position: 30,type: HandheldDevice},{activationPeriods: [{ endTime: 04:00, startTime: 00:00 }],id: DeviceB,isConnected: false,position: 180,type: LaptopDevice},{activationPeriods: [{ endTime: 10:40, startTime: 07:00 }],id: DeviceC,2021/6/19 COMP2511 / 21T2 / Assignment-Specification GitLab httpss://gitlab.cse.unsw.edu.au/COMP2511/21T2/assignment-specification 6/17isConnected: false,position: 330,type: DesktopDevice}],satellites: [{connections: [{deviceId: DeviceA,endTime: 12:01,minutesActive: 719,satelliteId: Satellite1,startTime: 00:00},{deviceId: DeviceC,endTime: 10:41,minutesActive: 215,satelliteId: Satellite1,startTime: 07:00}],height: 10000,id: Satellite1,position: 60.80,possibleConnections: [DeviceA],type: BlueOriginSatellite,velocity: 141.66}]}Notice how DeviceC has only been active for 215 minutes but despite that has a start / end time that has a duration of 220 minutes (3 hrs and40 mins = 180 + 40 = 220)! Even DeviceA has only been alive for 719 minutes despite having a duration of 720 minutes! Why the discrepency?Well, as well find below in section 3, each device/satellite has a series of connection properties (amongst others) and in this case handhelds take1 minute to connect, and desktops take 5 minutes to connect. Satellites can also effect this (for example SpaceX satellites connect instantly todevices, but Can only connect to handhelds).Want to play around with this for a bit? You can use the following link which has this problem entirely setup already for you.Visualising SimulationA simulation is an incremental process starting with an initial world state, say WorldState_00. We add a specified time interval of 1 minute andcalculate the new positions of all the satellites after the minute. We then go and update all the connections accordingly to derive the next worldstate WorldState_01. Similarly, we derive WorldState_02 from WorldState_01, WorldState_03 from WorldState_02, and so on. This act of feeding aworld state into the next forms a sort of state machine, akin to Conways Game of Life in a way.WorldState_00 – WorldState_01 – WorldState_02 – You will not be solving ANY maths here; we will be providing a small library that solves all the mathematical details of this problem.There are three tasks:1. Implement the world state, Youll be adding/moving devices, adding/removing satellites, and printing out where objects are in the world,you WONT be simulating them yet.2. Implement activation periods (where devices try to connect to satellites) and simulating the world state i.e. moving the satellites around,and updating connections accordingly.3. Implement special devices.In this problem, we are going to have to make some assumptions. We will assume that:We will only look at a single ring.The ring is hollow.Its radius is 3000 metres / 3 kilometres ( r ).The ring does not rotate.Simulation3. RequirementsAssumptions2021/6/19 COMP2511 / 21T2 / Assignment-Specification GitLab httpss://gitlab.cse.unsw.edu.au/COMP2511/21T2/assignment-specification 7/17We will represent all positions through their angle .The satellites orbit around the disk in 2D space.HandheldDevice phones, GPS devices, tablets.Handhelds take 1 minute to connectLaptopDevice laptop computers.Laptops take 2 minutes to connectDesktopDevice desktop computers and servers.Desktops take 5 minutes to connectSpaceXSatelliteOrbits at a speed of 3330 metres per hourOnly connect to handheld devicesInfinite number of connectionsDevices connect instantlyBlueOriginSatelliteOrbits at a speed of 8500 metres per hourSupports all devicesMaximum of 5 laptops and 2 desktops at a time with no limit on handheld devices, however the absolute maximum of all devices atany time is 10.请加QQ:99515681 或邮箱:99515681@qq.com WX:codehelp

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导