1. Homepage
  2. Programming
  3. [2022] COMP1531 Software Engineering Fundamentals - Lab03 Academics

[2022] COMP1531 Software Engineering Fundamentals - Lab03 Academics

Engage in a Conversation
COMP1531Software Engineering FundamentalsLab03 AcademicsUNSW

Lab03 - Academics CourseNana.COM

Background CourseNana.COM

Rationale CourseNana.COM

As a software engineer, it is important to quickly adapt to changing requirements. Seeing your success from lab01, the university has reached out again for help with redesigning their entire academic-course system. CourseNana.COM

You were presented with a new set of requirements, including the admission of new academics and courses to the system. Any design decisions and inner workings of your software are left to your professional judgement - the university is only interested in the input/output from the interface. CourseNana.COM

However, being the brilliant engineer that you are, you will of course ensure that your software is robust and flexible for future changes. CourseNana.COM

Getting Started CourseNana.COM

Please make sure you have completed lab03_password prior.
Copy the SSH clone link from Gitlab and clone this repository on either VLAB or your local machine.
In your terminal, change your directory (using the
cd command) into the newly cloned lab. To check if you have done this correctly, type ls in this new directory to see if you can see the relevant files (including academics.js). CourseNana.COM

Package Installation CourseNana.COM

1. Open package.json and look under the key "devDependencies" . We have added these development packages from lab03_password for you: CourseNana.COM

2. Use the command below to install all "devDependencies" (and also "dependencies" , although none is needed in this lab): CourseNana.COM

3. Under "scripts" , make the following changes: CourseNana.COM

4. Use git status, add, commit and push your package.json and package-lock.json. CourseNana.COM

Interface: Functions CourseNana.COM

The functions from lab01_academics are no longer a part of the interface. However, you are welcome to copy and repurpose them in your code if you want to. CourseNana.COM

Note CourseNana.COM

For many functions above, the first parameter academicId is only for verifying that the academic that is calling the function is valid. Currently, there is no way for an academic to join a course or become a staff unless they were the creator.
For error cases, you can
CourseNana.COM

Interface: Data Types CourseNana.COM

This is only regarding the input/output of the functions in the Interface: Functions and has no relation to the data object (implementation). Sometimes the implementation data types will very closely align, but there is no expectation they do. CourseNana.COM

Note CourseNana.COM

Array of objects, where each Object is of type academic CourseNana.COM

Object containing keys {courseId, name, description, allMembers, staffMembers} CourseNana.COM

Array of objects, where each object contains the keys {academicId, academicName} CourseNana.COM

Array of objects, where each object contains the keys {courseId, courseName} CourseNana.COM

Some objects have been added or updated from lab01_academics. Pay close attention to the keys as well. All arrays of objects can have items in any order. Your tests need to account for this (see Tips). CourseNana.COM

Task CourseNana.COM

Testing CourseNana.COM

This should be done before designing your database or implementing your functions.
In the file
academic.test.js, write tests for all functions in Interface: Functions. You should expect most of your tests to fail on your implementation initially! CourseNana.COM

IMPORTANT: Your tests should not make assumptions about: CourseNana.COM

how data is stored how IDs are generated CourseNana.COM

For example, one implementation could have the academicId start at id -1000 and decrease by 5 for each new academic, i.e. -1000, -1005,-1010, etc.
another could randomise the ID (while still ensuring uniqueness).
CourseNana.COM

which helper functions (i.e. not in the Interface: Functions) are available.
In your tests, you should only be importing functions from
Interface: Functions and write your tests using only the knowledge of the input CourseNana.COM

parameters, return values and the description of the function. CourseNana.COM

Tips CourseNana.COM

1. Each test should be independent of the other. To achieve this, you can use the clear function at the beginning of every test. Consider using Setup and Teardown to streamline your code. CourseNana.COM

2. When testing/comparing arrays of objects, since we don't know which order they will be in, we could: CourseNana.COM

sort both arrays by IDs before comparing, or
(recommended) convert each array into a
Set before comparing, as order won't matter in sets. The side effect is that duplicated elements are lost, although array objects in this lab exercise are unique by ID so this is fine. CourseNana.COM

Database CourseNana.COM

The database is now black-boxed to us - you can design it however you like! We will have zero knowledge of your data structure when auto-marking. See more details in the Testing section. CourseNana.COM

However, you may want to design your database such that the same information isn't stored/duplicated in multiple places. Consider the case where an academic may want to change their name in the future: CourseNana.COM

will this be easily achieved by changing one data entry (e.g. the value of an object key) in your code, or will you have to find and change their name in multiple places? CourseNana.COM

Implementation CourseNana.COM

1. Open the file academics.js in your preferred text editor. The stub code for each function has been provided for you. CourseNana.COM

2. Complete each function in Interface: Functions.

CourseNana.COM

3. Test your code with your previously-written tests with CourseNana.COM

4. Fix up any errors in your implementation. CourseNana.COM

Submission CourseNana.COM

Use git to add , commit , and push your changes on your master branch.
Check that your code has been uploaded to your Gitlab repository on this website (you may need to refresh the page).
CourseNana.COM

If you have pushed your latest changes to master on Gitlab no further action is required! At the due date and time, we automatically collect your work from what's on your master branch on Gitlab. CourseNana.COM

Additional Information CourseNana.COM

Sample package.json CourseNana.COM

Click to view our sample package.json CourseNana.COM

  CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
COMP1531代写,Software Engineering Fundamentals代写,Lab03 Academics代写,UNSW代写,COMP1531代编,Software Engineering Fundamentals代编,Lab03 Academics代编,UNSW代编,COMP1531代考,Software Engineering Fundamentals代考,Lab03 Academics代考,UNSW代考,COMP1531help,Software Engineering Fundamentalshelp,Lab03 Academicshelp,UNSWhelp,COMP1531作业代写,Software Engineering Fundamentals作业代写,Lab03 Academics作业代写,UNSW作业代写,COMP1531编程代写,Software Engineering Fundamentals编程代写,Lab03 Academics编程代写,UNSW编程代写,COMP1531programming help,Software Engineering Fundamentalsprogramming help,Lab03 Academicsprogramming help,UNSWprogramming help,COMP1531assignment help,Software Engineering Fundamentalsassignment help,Lab03 Academicsassignment help,UNSWassignment help,COMP1531solution,Software Engineering Fundamentalssolution,Lab03 Academicssolution,UNSWsolution,