Below are three Sequence diagrams: One for the Main() method in washing machine and two that describe the Spin() method. Use the code you created in the previous Week 4 Performance Assessment and add...

1 answer below »
can someone help?


Below are three Sequence diagrams: One for the Main() method in washing machine and two that describe the Spin() method.  Use the code you created in the previous Week 4 Performance Assessment and add the following: 1. In the main method add code represented in the sequence diagram Sequence for Main() method 2. In the body of the Spin() method add the code represented Sequence for Spin() method 3. Add the code for the reference fragment period. 4. Add necessary print statements to show that the sequences work, remember to label and comment any code you write. Sequence for Main() method:   Sequence for Spin() method:   Period Reference Sequence: Performance Assessment Guidance – Class Diagram Implementation 1. Introduction Below you have a UML class diagram for a washing machine software control application. It is an object model that represents the system. It contains the class diagrams and the class relationships necessary to operate the washing machine. Its purpose is for general conceptual modeling of the structure of the application, and for detailed modeling translating the models into programming code. This diagram is what a development team might have created and something that might be given to you or your implementation team to translate into code. Figure 1. Washing Machine class diagram 2. Guidance information Class diagrams Each class diagram will show the three parts of the class notation. A class notation consists of three parts: · Class Name · The name of the class appears in the first partition. · Class Attributes · Attributes are shown in the second partition. · The attribute type is shown after the colon. · Attributes map onto member variables (data members) in code. · Class Operations (Methods) · Operations are shown in the third partition. They are services the class provides. · The return type of a method is shown after the colon at the end of the method signature. · The return type of method parameters is shown after the colon following the parameter name. · Operations map onto class methods in code Figure 2. Example Class Digram The graphical representation of the class - MyClass as shown above: · MyClass has 3 attributes and 3 operations · Parameter p3 of op2 is of type int · op2 returns a float · op3 returns a pointer (denoted by a *) to Class6 The +, -, # and ~ symbols before an attribute and operation name in a class denote the visibility of the attribute and operation. · + denotes public attributes or operations · - denotes private attributes or operations · # denotes protected attributes or operations · ~ denotes package attributes or operations Class Relationships A class may be involved in one or more relationships with other classes. A relationship can be one of the following types: (Refer to the figure on the right for the graphical representation of relationships). Relationship Type: Inheritance (or Generalization): Graphical Representation Figure 3. Inheritance or Generalization Relationship Represents an "is-a" relationship. An abstract class name is shown in italics. SubClass1 and SubClass2 are specializations of Super Class. A solid line with a hollow arrowhead that point from the child to the parent class. Relationship Type: Simple Association: Graphical Representation Figure 4. Association Relationship A structural link between two peer classes. There is an association between Class1 and Class2. A solid line connecting two classes. Relationship Type: Aggregation: Graphical Representation Figure 5. Aggregation Relationship A special type of association. It represents a "part of" relationship. Class2 is part of Class1. Many instances (denoted by the *) of Class2 can be associated with Class1. Objects of Class1 and Class2 have separate lifetimes. A solid line with an unfilled diamond at the association end connected to the class of composite. Relationship Type: Composition: Graphical Representation Figure 6. Composition Relationship A special type of aggregation where parts are destroyed when the whole is destroyed. Objects of Class2 live and die with Class1. Class2 cannot stand by itself. A solid line with a filled diamond at the association connected to the class of composite. Relationship Type: Dependency: Graphical Representation Figure 7. Dependency Relationship Exists between two classes if the changes to the definition of one may cause changes to the other (but not the other way around). Class1 depends on Class2. A dashed line with an open arrow. Relationship Names Names of relationships are written in the middle of the association line. Good relation names make sense when you read them out loud: "Every spreadsheet contains some number of cells", "an expression evaluates to a value" They often have a small arrowhead to show the direction in which direction to read the relationship, e.g., expressions evaluate to values, but values do not evaluate to expressions. Figure 8. Class Diagram with Direction of Relationships Relationship - Roles A role is a directional purpose of an association. Roles are written at the ends of an association line and describe the purpose played by that class in the relationship. E.g., A cell is related to an expression. The nature of the relationship is that the expression is the formula of the cell. Navigability The arrows indicate whether, given one instance participating in a relationship, it is possible to determine the instances of the other class that are related to it. The diagram above suggests that, Given a spreadsheet, we can locate all of the cells that it contains, but that we cannot determine from a cell in what spreadsheet it is contained. Given a cell, we can obtain the related expression and value, but given a value (or expression) we cannot find the cell of which those are attributes. Visibility of Class attributes and Operations In object-oriented design, there is a notation of visibility for attributes and operations. UML identifies four types of visibility: public, protected, private, and package. 3. Class Diagram - Diagram Tool Example A class diagram may also have notes attached to classes or relationships. Figure 9. Example diagram with explanation of the connections and parts. In the example above: · We can interpret the meaning of the above class diagram by reading through the points as following. · Shape is an abstract class. It is shown in Italics. · Shape is a superclass. Circle, Rectangle and Polygon are derived from Shape. In other words, a Circle is-a Shape. This is a generalization / inheritance relationship. · There is an association between DialogBox and DataController. · Shape is part-of Window. This is an aggregation relationship. Shape can exist without Window. · Point is part-of Circle. This is a composition relationship. Point cannot exist without a Circle. · Window is dependent on Event. However, Event is not dependent on Window. · The attributes of Circle are radius and center. This is an entity class. · The method names of Circle are area(), circum(), setCenter() and setRadius(). · The parameter radius in Circle is an in parameter of type float. · The method area() of class Circle returns a value of type double. · The attributes and method names of Rectangle are hidden. Some other classes in the diagram also have their attributes and method names hidden. 4. Moving a class diagram into code Below is a class diagram showing three classes Person, Company and Job. Figure 10. Example class digram Here is the implementation codes for the class diagram Class Person { Private String name, ssn, addr; Job job; Person boss; Public String getName(){ } Public void setName(string Name){ } Public String getSsn(){ } Public String getAdress(){ } } Class Company { String name, addr; } Class Job { Company co; int salary; String title; } Note that the code is not complete. You only have the initial skeleton of the static model. You would still need to consult the sequence diagrams and any activity diagrams created through your system analysis. A university offers a number of courses via the internet. A common requirement among these courses is for a system of an online assessment. An assessment is any form of graded question-and-answer activity. Examples include exams, quizzes, exercises, and self-assessments. In preparation for automating such a system, our group has undertaken a study of assessment techniques in traditional classrooms. An assessment can contain a number of questions. Questions come in many forms, including true/false, single-choice from among multiple alternatives, multiple choices, fill-in-the-blank, and essay. There may be other forms as well. Students take assessments that are administered by instructors. The students’ responses to each question are collected by the instructor, who grades them by comparison to a rubric for each question. The instructor may also elect to provide feedback (written comments), particularly about incorrect responses. A total score for the assessment is computed by the instructor. If this is a self-assessment, the score is for informational purposes only. For other kinds of assessments, the instructor records the score in his/her grade book. Information is returned to the student about their performance. At a minimum, the student would learn of their score and any instructor-provided feedback. Depending upon the instructor, students may also receive the questions, a copy of their own responses, and the instructor’s correct answer. · Identify classes and objects for the problem statement. · Develop data dictionary for the described system. · Identify association between classes. · Identify attributes of classes and association classes. · Structure objects using inheritance. · Create a class diagram that represent the system model you have defined. Students shall turn in the data dictionary, a list of classes with all necessary attributes, and a class diagram based on the system analysis. Week 3 Performance Assessment Guidance - Domain Modeling and Class Diagram OBJECTIVES · Use the UML notation to represent objects as classes and their properties. · Perform domain analysis to develop domain class models. · Model the structural aspects of problems with the class model. INTRODUCTION Definition of Object · An object is a self-contained entity with well-defined characteristics (properties or attributes) and behaviors (operations). · Example of real-life objects include: School, Teacher, Client, Course, Account, etc. Object Modeling Class Structure · A class is a specification of a set of objects, not the actual object. · In UML, a class is represented by a rectangle divided into three compartments (from top to bottom): the class name, a list of attributes and a list of operations. · Only attributes and operations relevant to the current context will be shown in a diagram. “-“denotes an attribute while “+” denotes an operation within that class. Attributes Attributes refer to properties that define the class. For example, a class Client will have attributes
Answered 1 days AfterNov 07, 2021

Answer To: Below are three Sequence diagrams: One for the Main() method in washing machine and two that...

Neha answered on Nov 08 2021
125 Votes
95673 - class diagrams/number 1/classes and objects.png
95673 - class diagrams/number 1/report.docx
Classes and Objects
Data Dictionary
Student
        Attribute
        Data Type
        Size
        Example
        StudentId
        Int
        
        11
        Name
        string
        50
        Roy
        Address
        String
        100
        Australia
        Phone
        String
        10
        2435435
        Age
        int
        
        13
        Date of birth
        Date
        
        02-02-1998
Assessment
        Attribute
        Data Type
        Size
        Example
        AssessmentId
        Int
        
        11
        Type
        string
        50
        Exam
        Question
        String
        1000
        What is ….
Question
        Attribute
        Data Type
        Size
        Example
        QuestionId
        Int
        
        11
        Type
        string
        50
        Multiple Choice
        Question
        String
        1000
        What is ….
Instructor
        Attribute
        Data Type
        Size
        Example
        InstructorId
        Int
        
        11
        Name
        string
        50
        Roy
        Address
        String
        100
        Australia
        Phone
        String
        10
        2435435
        Age
        int
        
        13
        Date of birth
        Date
        
        02-02-1998
GradedResponse
        Attribute
        Data Type
        Size
        Example
        Id
        Int
        
        11
        AssessmentId
        Int
        
        1
        QuestionId
        Int
        
        13
        Grades
        String
        10
        2435435
Association between classes
Class Diagram
95673 - class diagrams/number 2/Engine.java
95673 - class diagrams/number 2/Engine.java
public class Engine
{
    int Rotation;
}
95673 - class diagrams/number 2/sensor.java
95673 - class diagrams/number 2/sensor.java
public class Sensor
{
    public boolean check()
    {
        System.out.println("check method");
    }
}
95673 - class diagrams/number 2/Timer.java
95673 - class diagrams/number 2/Timer.java
public class Timer
{
    int value,duration,count;
    public void getDuration()
    {
        return duration;
    }
    public void setDuration(int duration)
    {
        this.Duration = duration;
    }
    public void getValue()
    {
        return time;
    }
    public void setValue(int value)
    {
        this.Value = value;
    }
    public void getCount()
    {
        return count;
    }
    public void setCount(int count)
    {
        this.Count = count;
    }
    public void start()
    {
        System.out.println("Get start method");
    }
    public void time()
    {
        System.out.println("get time method");
    }
}
95673 - class diagrams/number 2/WashingMachine.java
95673 - class diagrams/number...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here