程序代写 CSIT314 Software Development Methodologies

CSIT314 Software Development Methodologies
Using a UML tool of your choice, develop an UML class diagram to express the structural relationships in the following program and draw an UML sequence diagram and communication diagram to express the dynamic behaviour. Make sure all the diagrams be consistent with each other and the code.
import java.util.Vector;

Copyright By PowCoder代写 加微信 powcoder

public class App {
    public static void main(String[] args){
        Driver d = new Driver();

public class Driver {
    private StringContainer b = null;

    public void run() {
        b = new StringContainer();
        b.add(“One”);
        b.add(“Two”);
        b.remove(“One”);
class StringContainer {
    private Vector v = null;

    public void add(String s) {

    public boolean remove(String s) {
        return v.remove(s);

    private void init() {
        if (v == null)
            v = new Vector();

Use a UML tool of your choice to draw a state diagram of the following watch:
Consider a watch with two buttons. Setting the time on the watch requires the actor to first press both buttons simultaneously, after which the watch enters the set time mode. In the set time mode, the watch blinks the number being changed (e.g., the hours, minutes, seconds, day, month, or year). Initially, when the actor enters the set time mode, the hours blink. If the actor presses the first button, the next number blinks (e.g, if the hours are blinking and the actor presses the first button, the hours stop blinking and the minutes start blinking). If the actor presses the second button, the blinking number is incremented by one unit. If the blinking number reaches the end of its range, it is reset to the beginning of its range (e.g., assume the minutes are blinking and its current value is 59, its new value is set to 0 if the actor presses the second button). The actor exits the set time mode by pressing both buttons simultaneously.
Use a UML tool of your choice to draw a state diagram showing the states and transitions for a landline telephone. Include the states hung-up, off-hook, dialing, connected, and ringing. Include the events pick up, hang up, and dial.

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com