1. Homepage
  2. Programming
  3. CSSE7023 Advanced Software Engineering Assignment 2: Extend SheeP Spreadsheet

CSSE7023 Advanced Software Engineering Assignment 2: Extend SheeP Spreadsheet

Engage in a Conversation
UQCSSE7023Advanced Software EngineeringJavaSheeP

Advanced Software Engineering (CSSE7023) Assignment 2 — Semester 1, 2024
CourseNana.COM

Overview This assignment builds on Assignment 1 and will extend your practical experience developing a Java program, including a GUI. Additionally, you must develop and submit JUnit tests for some of the classes in the implementation. You are encouraged to write tests for all your classes and for the GUI part of your implementation as well, but you do not have to submit these. You will be assessed on your ability to
CourseNana.COM

• implement a program that complies with the specification,
• develop JUnit tests that can detect bugs in class implementations,
• and develop code that conforms to the style conventions of the course.
CourseNana.COM

Task In this assignment, you will modify and extend the SheeP spreadsheet application from Assignment 1. You will be provided with an extended version of a working implementation of SheeP in which the GUI is implemented using the Java Swing library. For the first part of this assignment, you will have to implement a new GUI that uses the JavaFX library, without altering the look and feel of the user interface. You then have to extend the functionality of SheeP in two ways: (1) provide support for two built-in functions MEAN and MEDIAN that calculate the arithmetic mean and median of a list of expressions, including an updated parser, and (2) provide a menu with options to Save the current spreadsheet in a pre-defined format to a file and Open a previously saved spreadsheet. In addition, you will be required to develop JUnit test cases for the classes that implement the MEAN and MEDIAN functionality and for the ComplexScanner class that has been provided to you. CourseNana.COM

Common Mistakes Please carefully read Appendix A. It outlines common and critical mistakes which you must avoid to prevent a loss of grades. If at any point you are even slightly unsure, please check as soon as possible with course staff. CourseNana.COM

Plagiarism All work on this assignment is to be your own individual work. By submitting the assignment you are claiming it is entirely your own work. You may discuss the overall general design of the application with other students. Describing details of how you implement your design with another student is considered to be collusion and will be counted as plagiarism. CourseNana.COM

You may not copy fragments of code that you find on the Internet to use in your assignment. Code supplied by course staff (from this semester) is acceptable, but must be clearly acknowledged as described in the next paragraph. CourseNana.COM

You may find ideas of how to solve problems in the assignment through external resources (e.g. StackOverflow, textbooks, ...). If you use these ideas in designing your solution you must cite them. To cite a resource, provide the full bibliographic reference for the resource in file called refs.md. The refs.md file must be in the root folder of your project. For example: CourseNana.COM

> cat refs.md
[1] E. W. Dijkstra,
"Go To Statement Considered Harmful," _Communications of the ACM_, CourseNana.COM

    vol 11 no. 3, pp 147-148, Mar. 1968. Accessed: Mar. 6, 2024. [Online]. Available:

https://www.cs.utexas.edu/users/EWD/transcriptions/EWD02xx/EWD215.html
[2] B. Liskov and J. V. Guttag, Boston: _Program development
in Java: abstraction, CourseNana.COM

    specification, and object-oriented design_. Boston: Addison-Wesley, 2001.
[3] T. Hawtin, "String concatenation: concat() vs '+' operator," stackoverflow.com,
    Sep. 6, 2008. Accessed: Mar. 8, 2024. Available:
    https://stackoverflow.com/questions/47605/string-concatenation-concat-vs-operator
>

I hear and I forget, I see and I remember, I do and I understand. — Confucian Aphorism
CourseNana.COM

Revision 1.0.1 CourseNana.COM

1 2 3 4 5 6 CourseNana.COM

8 CourseNana.COM

9 10 11 12 13 CourseNana.COM

In the code where you use the idea, cite the reference in a comment. For example: CourseNana.COM

/**
 * What method1 does.
 * [1] Used a method to avoid gotos in my logic.
 * [2] Algorithm based on section 6.4.
 */

public void method1() ... CourseNana.COM

/**
 * What method2 does.
 */

public void method2() { CourseNana.COM

   System.out.println("Some " + "content."); // [3] String concatenation using + operator.
}

Specification CourseNana.COM

Specification documents of classes that you must implement are provided in the form of JavaDocs. CourseNana.COM

  • Implement the classes and interfaces exactly as described in the JavaDocs. CourseNana.COM

  • Read the JavaDocs carefully and understand the specification before programming. CourseNana.COM

  • Do not change the public specification of any required class in any way, including changing the names of, or adding additional public: inner classes, inner interfaces, methods, or fields. CourseNana.COM

  • You are encouraged to add additional private members, classes, or interfaces as you see fit. CourseNana.COM

  • You are encouraged to add additional non-inner classes or interfaces as you see fit to the sheep.parsing and CourseNana.COM

    sheep.ui.graphical.javafx packages. CourseNana.COM

  • JUnit 4 test cases that you submit must only test the public and protected methods as specified in the JavaDocs. They must not rely on any other members, classes, or interfaces you may have added to the classes being tested. You may create private members and other classes in your test code. CourseNana.COM

    You can download the working SheeP implementation and the JavaDoc specifications for Assignment 2 from BlackBoard (Assessment Assignment Two). You can also access the JavaDoc for Assignment 2 at the link below. CourseNana.COM

    Getting Started CourseNana.COM

    To get started, download the provided code from BlackBoard. This archive includes a working version of the solution to Assignment 1 as a Swing application. Create a new IntelliJ project following the JavaFX Guide on BlackBoard. Extract the archive in a directory and move it into the newly created project. CourseNana.COM

    Project Overview CourseNana.COM

    The design of the application is essentially the same as for Assignment 1, but some classes have been added to the implementation as described below. CourseNana.COM

    sheep.core CourseNana.COM

    sheep.sheets Updated from Assignment 1. You must implement Sheet::encode() and SheetBuilder::load(). sheep.expression Provided, as for Assignment 1. CourseNana.COM

sheep.expression.basic Provided, as for Assignment 1. CourseNana.COM

sheep.expression.arithmetic Updated from Assignment 1. Note that the Arithmetic class is now a subclass of Operation (rather than Expression) and a sibling class of Function. You must implement the Mean and Median classes. CourseNana.COM

sheep.parsing Updated from Assignment 1. You must implement the ComplexParser class. A new class ComplexScanner has been provided to assist you in writing this class. CourseNana.COM

sheep.fun Provided, as for Assignment 1. CourseNana.COM

sheep.ui Provided application constraints for the ui. CourseNana.COM

sheep.ui.graphical Provided application constraints for just GUIs. CourseNana.COM

sheep.ui.graphical.swing Provided version of Assignment 1’s GUI implemented using Swing. CourseNana.COM

sheep.ui.graphical.javafx You must implement a new GUI using JavaFX that has the same look and feel as sheep.ui.graphical.swing. CourseNana.COM

Stages CourseNana.COM

As for Assignment 1, this assignment will be implemented in stages to encourage incremental development. You should finish each stage before moving on to the next one. At each stage, ensure that you thoroughly test your implementation. CourseNana.COM

Stage 0 Organisations sometimes decide that they want to move over from one platform (such as hard- ware or software) to another. In the first stage of this assignment, we will mimic such a scenario and you need to change the SheeP implementation to use the JavaFX library instead of the Java Swing library. To provide backward compatibility, the program should continue to work with the Java Swing library, but any new functionality will only be implemented using the JavaFX library. A command-line argument is used in the main method to control which particular library is used. If the program is executed with the single argument “legacy”, then the implementation will use the old GUI. If there are no arguments or any unrecognised arguments, the implementation will use new JavaFX version. After completing this stage, and with the appropriate data loaded into the spreadsheet, the SheeP implementation should display as below, irrespective of which GUI library is used. CourseNana.COM

Stage 1 Extend the SheeP implementation to support the two built-in spreadsheet functions MEAN and MEDIAN. This will require changes to the parser. A new class ComplexScanner has been provided to assist you with this. To become familiar with the ComplexScanner class, you must implement JUnit test cases for this class. These will form part of the assessment for this assignment. You must then implement the following classes:
CourseNana.COM

sheep.parsing.ComplexParser
sheep.expression.arithmetic.Mean
sheep.expression.arithmetic.Median
Your JUnit test cases should test all the public and protected methods specified in the JavaDoc of the classes ComplexScanner, Mean and Median. You must submit these tests and they must be located in the following files: CourseNana.COM

test/sheep/parsing/ComplexScannerTest.java test/sheep/expression/arithmetic/MeanTest.java test/sheep/expression/arithmetic/MedianTest.java
After completing this stage, and with the appropriate data loaded into the spreadsheet, the SheeP imple- mentation should display as below. CourseNana.COM

Stage 2 Extend the implementation to support a File menu with Save As and Open options to save the content of a spreadsheet to a file and to load a previously saved spreadsheet from a file. First you must implement Sheet::encode() and SheetBuilder::load(). Then design an appropriate menu bar for your UI to expose the features provided by sheep.ui.UI::addFeature(), ensuring that you provide an appropriate implementation of the Prompt interface. Hint: Consider using the javafx.stage.FileChooser class to help implement the Prompt interface. After completing this, your implementation of the File menu should behave as shown in the following screenshots. Note that the exact look and feel may vary depending on the operating system used to implement the functionality (the screenshots below were generated on a Mac). This is acceptable. The critical aspect is that the Save As and Open menu options should allow the user to save the current spreadsheet and open a previously saved spreadsheet to/from any file. CourseNana.COM

File: The menu bar. CourseNana.COM

Save As: The save dialog. CourseNana.COM

Open: The open dialog. CourseNana.COM

Grading CourseNana.COM

Five aspects of your solution will be considered in grading your submission: CourseNana.COM

  1. Automated functionality test: the following classes that you must implement will have JUnit unit tests associated with them that we will use to test your implementation: sheep/expression/arithmetic/Mean
    sheep/expression/arithmetic/Median
    CourseNana.COM

    sheep/parsing/ComplexParser
    sheep/sheets/Sheet
    sheep/sheets/SheetBuilder
    The percentage of test cases that pass will be used as part of your grade calculation. CourseNana.COM

  2. JUnit test cases: your JUnit test cases will be assessed by testing both correct and faulty implemen- tations of the ComplexScanner, Mean, and Median classes. The percentage of implementations that are appropriately identified as correct or faulty will be used as part of your grade calculation. CourseNana.COM

  3. Manual functionality test: to ensure that the look and feel of your GUI implementation is the same as the original implementation, and to ensure that the Save As and Open menu options are properly invoked by the GUI, a small scenario with a number of steps in it will be manually executed by course staff. The faults identified during these steps will be used as part of your grade calculation. CourseNana.COM

  4. Automated style check: as for Assignment 1, style checking on your code will be performed using the Checkstyle tool1. The number of style violations identified by the Checkstyle tool will be used as part of your grade calculation. Note: There is a plug-in available for IntelliJ that will highlight style violations in your code. Instructions for installing this plug-in are available in the Java Programming Style Guide on BlackBoard (Learning Resources Guides). If you correctly use the plug-in and follow the style requirements, it should be relatively straightforward to do well for this part of the assessment. CourseNana.COM

  5. Manal style check: as for Assignment 1, the style and structure of your code will also be assessed by course staff. However, in this case, your performance on these criteria will also be used as part of your grade CourseNana.COM

calculation. It is therefore critically important that you read and understand the feedback for this part on Assignment 1, so that you can address any issues in this assignment. See Appendix B for criteria that will be used to assess the readability of your code. CourseNana.COM

Appendix B shows how the above are combined to determine your grade for the assignment. CourseNana.COM

Automated aspects of the assessment CourseNana.COM

Three aspects of assessment will performed automatically in a Linux environment: execution of JUnit test cases, running your JUnit test cases on correct and faulty implementations, and automated style check using Checkstyle. The environment will not be running Windows, and neither IntelliJ nor Eclipse (or any other IDE) will be involved. OpenJDK 21 with the JUnit 4 library will be used to compile and execute your code and tests. To prevent infinite loops, or malicious code, from slowing down Gradescope, any test that takes longer than 10 seconds to execute will be killed and identified as failing. All tests should execute in a small fraction of a second. Any test taking longer than a second to execute indicates faulty logic or malicious code. Similarly, any of your JUnit test cases that take longer than 20 seconds to execute on one of the correct/faulty implementations, or that consume more memory than is reasonable, will be stopped. CourseNana.COM

IDEs like IntelliJ provide code completion hints. When importing Java libraries they may suggest libraries that are not part of the standard library. These will not be available in the test environment and your code will not compile. When uploading your assignment to Gradescope, ensure that Gradescope says that your submission was compiled successfully. CourseNana.COM

Your code must compile.
If your submission does not compile,
you will receive a grade of one. CourseNana.COM

Submission CourseNana.COM

Submission is via Gradescope. Submit your code to Gradescope early and often. Gradescope will give you some feedback on your code, but it is not a substitute for testing your code yourself. CourseNana.COM

What to Submit Your submission must have the following internal structure: CourseNana.COM

src/ Folders (packages) and .java files for classes that you modified or created for this assignment. test/ Folders (packages) and .java files for the JUnit classes that you created for this assignment. refs.md File containing the references for any citations in your code. CourseNana.COM

Included in the root directory of the provided code are the files bundle.sh and bundle.bat. For MacOS and Unix users, double-click the bundle.sh file to execute it. For Windows users, double-click the bundle.bat file to execute it. This will create a submission.zip file for you to upload to Gradescope. CourseNana.COM

You can create the submission zip file yourself using a zip utility. If you do this, you must ensure that you do not miss any files or directories and that you do not add any extra files. We recommend using the provided bundle scripts. CourseNana.COM

A complete submission would contain the following files in their specified directories. CourseNana.COM

   src/sheep/expression/arithmetic/Mean.java
   src/sheep/expression/arithmetic/Median.java
   src/sheep/parsing/ComplexParser.java
   src/sheep/parsing/*
   src/sheep/ui/graphical/javafx/SheepApplication.java
   src/sheep/ui/graphical/javafx/*
   test/sheep/expression/arithmetic/MeanTest.java
   test/sheep/expression/arithmetic/MedianTest.java
   test/sheep/parsing/ComplexScannerTest.java

refs.md
*
Any number of files other than the ones specified in the JavaDoc CourseNana.COM

Ensure that your classes and interfaces correctly declare the package they are within. For example, Mean.java should declare package sheep.expression.arithmetic;. CourseNana.COM

Only submit the src and test folders and the refs.md file in the root directory of your project. Do not submit any other files (e.g. no .class files, IDE files, or Mac .filename files). CourseNana.COM

Provided Files A small number of the unit tests used for assessing functionality will be provided in Grade- scope. These will be used to test your submission, each time you upload it. CourseNana.COM

These are meant to provide you with an opportunity to receive feedback on whether the basic functionality of your classes works correctly or not. Passing all the provided unit tests does not guarantee that you will pass all the tests used for functionality grading. CourseNana.COM

Similarly, correct implementations for the ComplexScanner, Mean, and Median classes are used to run the JUnit tests that you submit, to ensure that tests do not fail on a correct implementation. Note that for assessing your JUnit tests we will also use faulty implementations of these classes. CourseNana.COM

The provided code on BlackBoard contains a resources directory. In this directory is a handful of sample spreadsheets in the correct format to be loaded by the application. Each sheet should load correctly except for broken.sheep which is used to demonstrate an example of a file which should fail to load. hard.sheep is an example of a sheet that should load correctly, but if saved will generate a different file. hard-fixed.sheep demonstrates what hard.sheep would look like if it were saved. You can use these files to check your implemen- tation of loading and saving spreadsheet files. You should test your implementation using other spreadsheets as well. CourseNana.COM

Assessment Policy CourseNana.COM

Late Submission You must submit your code before the deadline. Code that is submitted after the deadline will receive a late penalty as described in section 5.3 of the course profile. The submission time is determined by the time recorded on the Gradescope server. A submission is not recorded as being received until uploading your files completes. Attempting to submit at the last minute may result in a late submission. CourseNana.COM

You may submit your assignment to Gradescope as many times as you wish before the due date. There will be two submission links on Gradescope, one for “on-time” submissions and one for “late” submissions. If you have an extension for the assignment, you will submit your assignment via the “late” submissions link. Your last submission made to the “on-time” submission link, before the due date, will be the one that is graded, unless you make a submission to the “late” submission link. If a misconduct case is raised about your submission, a history of regular submissions to Gradescope, which demonstrate progress on your solution, could support your argument that the work was your own. CourseNana.COM

You are strongly encouraged to submit your assignment on time, or by the revised deadline if you have an extension. Experience has demonstrated that most students who submit their assignments late lose more grades due to the late penalties than they gain by making improvements to their work. CourseNana.COM

Extensions If an unavoidable disruption occurs (e.g. illness, family crisis, etc.) you should consider applying for an extension. Please refer to the following page for further information. CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
UQ代写,CSSE7023代写,Advanced Software Engineering代写,Java代写,SheeP代写,UQ代编,CSSE7023代编,Advanced Software Engineering代编,Java代编,SheeP代编,UQ代考,CSSE7023代考,Advanced Software Engineering代考,Java代考,SheeP代考,UQhelp,CSSE7023help,Advanced Software Engineeringhelp,Javahelp,SheePhelp,UQ作业代写,CSSE7023作业代写,Advanced Software Engineering作业代写,Java作业代写,SheeP作业代写,UQ编程代写,CSSE7023编程代写,Advanced Software Engineering编程代写,Java编程代写,SheeP编程代写,UQprogramming help,CSSE7023programming help,Advanced Software Engineeringprogramming help,Javaprogramming help,SheePprogramming help,UQassignment help,CSSE7023assignment help,Advanced Software Engineeringassignment help,Javaassignment help,SheePassignment help,UQsolution,CSSE7023solution,Advanced Software Engineeringsolution,Javasolution,SheePsolution,