Contract to produce robust self-verifying software modules

Assignment Help JAVA Programming
Reference no: EM133135857

OOSD LAB:

Introduction

This assessment evaluates the following CLOs

- CLO1: Apply the UML design notation as part of the OO development process.
- CLO2: Apply the process of Refactoring to continuously improve a software product.
- CLO3: Apply Design by Contract to produce robust self-verifying software modules.

The following topics are assessed:

- Week 3: Refactoring (Practical)
- Week 4: Design by Contract
- Week 6: Creational Patterns

Assignment Activities

Task 1: src/main/java/task1

The `StudentEnrol` class is designed to manage the enrolment of students. Students are allowed to take up to five courses made up of cores and electives selected from the list of cores (`coresOffered`) and electives (`electivesOffered`). There is an additional constraint that no student can be enrolled in more electives than core courses at any time.

You are required to:

**1.1.** Write the pre and post-conditions (if applicable) for all methods except `display()`

**1.2.** Write the the class invariants.

**1.3.** Specify invariants, preconditions and post-conditions as comments using the Javdoc annotations `@invariant`, `@pre.condition` and `@post.condition` respectively (in the spaces provided). You may use the notation `OLD.cores` in the post-conditions to refer to the original value for cores.

Task 2: src/main/java/task2

You are required to:

**2.1.** In the code located on `src/main/java/task2` the classes have a number of common features. You are required to apply _extract superclass_ refactoring and write the resulting code. You may use protected instance variables if appropriate.

**2.2.** In the same folder, there is a `Answers.md` file. Write in that file the answers to the following questions:

* 2.2.A: Name at least 3 smells that you identified BEFORE making the change of point 2.1. Is there any specific smell that is solved with the extract superclass? _No less than 300 words_.

* 2.2.B: Mention other refactorings that you did when you _extracted the superclass_. Were these refactorings needed for the _extract superclass_? Why? Could you have used _extract interface_ instead? _No less than 200 words_.

Task 3: src/main/java/task3

Write your answers to the following questions in `task3/Answers.md`:

**3.1.** What creational pattern is being used in `PrintSpooler`? Is it correctly implemented? Why or Why not? Could you implement it differently? Justify accordingly.

**3.2** Not all Builders must construct visual objects. What might you use a Builder to construct? Why? Find a real-world example and explain why it is correct using it there. Your answer your have at least 500 words _without_ the code snippet.

**3.3.** If you are writing a program to track investments (namely: stocks, bonds, metal futures, derivatives, etc.), how might you use an _abstract factory_? Why? Complement your answer with a Class Diagram. You _must_ add it to the Answer file using markdown. Save it inside the `task3` folder.

Attachment:- OO development process.rar

Reference no: EM133135857

Questions Cloud

Explain the impact of globalisation : Explain the impact of globalisation on both large and small businesses. You need to choose by yourselves and then research on different two companies
Final selection decisions : Choice one: Describe each of the four methods or approaches given in the Compensatory model used for final selection decisions. Then, in your own words, de
What is the cost of raw liquid plastic that should charged : Given the above information what is the cost of raw liquid plastic that should be charged to the 2020 (Jan to Dec) Income Statement
What amount wyatt company report on its income statement : Wyatt Company acquired 30% interest in the voting stock of Staples Inc. for $650,000. What amount Wyatt Company report on its income statement
Contract to produce robust self-verifying software modules : Apply the UML design notation as part of the OO development process and Apply Design by Contract to produce robust self-verifying software modules
How much should howdy doody show : The fair value of the Ranger stock owned by Howdy Doody had increased to $90,000. How much should Howdy Doody show in the 2021 income statement
Which do you feel is most useful and practical : Which do you feel is most useful and practical? Why? What, if anything, would you add to the approaches?
Do you consider yourself an engaged employee : Did these questions make you think of anything that can be done at your organization to increase employee engagement and performance?
What amount of gain-loss should the company record : In addition to the trade in of the old machine Davis Company also paid $20,000 cash. What amount of gain/loss should the company record

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd