Object oriented designing class

Assignment Help Software Engineering
Reference no: EM1379002

Question: Object oriented design is making classes with both characteristics and behavior wrapped together (called encapsulation). Taking data (characteristics) and the functions (behavior) that operate on that data and storing them as one programming unit (called a class) is extremely powerful. When completing a class design it is critical to ask two very important questions: 1- What does it (the class) know (characteristics)? and 2- What can it (the class) do (behavior)? In chapter 3, fig 3.9 (p. 99) is the UML (Unified Modeling Language) class diagram for the GradeBook class in fig 3.7 (p. 95). This diagram answers the two questions above:
1. What does it know? It knows its course name (courseName).
2. What can it do?
a. It can set its course name if it's given a name (setCourseName(name : String))
b. It can get and return its course name (getCourseName() : String)
c. It can display a message (displayMessage())

Looking for another example, I just picked up the stapler on my desk. The following is a design for a stapler class by answering the two questions "What does it know?" and "What can it do?" Following that is the UML class diagram.

Stapler class:
1. What does it know?
a. It knows how many staples it has
b. It knows if its jammed
c. It knows its weight
2. What can it do?
a. It can reload, fill its staples to capacity
b. It can get an return whether it is jammed
c. It can staple, which decreases its number of staples by one
d. It can get and return its weight

Stapler
--------------------------
- totalStaples : integer
- jammed : Boolean
- weight: float
--------------------------
+ reload()
+ isJammed() : boolean
+ staple()
+ getWeight() : float

THE ABOVE IS JUST AN EXAMPLE:

Details of assignment: Choose an object from everyday life and design a class for it by answering the two questions and providing a UML class diagram. The subject of your post must be the name of your class. Mine would be Stapler. Your class must have a minimum of three characteristics and five behaviors.

Reference no: EM1379002

Questions Cloud

Classification of symbols : In few programming languages a comment can be enclosed either in braces {} or in the symbols (* *). Discuss how do you think a scanner would group the four symbols {, }, (*, *) for purposes of classification.
Java examples to validate input : Create an algorithm that prompts the user to enter a secret word. The secret word should be at least eight characters long. Validate the input.
Role of it management in organizations : Write a statement of what you perceive the role of IT management in organizations and address the IT management challenges that e-business brings.
Evaluate the intended audience : Question: In order for technical communication to be effective, the writer must evaluate the intended audience, its characteristics, knowledge base, expectations, and needs.
Object oriented designing class : Object oriented design is making classes with both characteristics and behavior wrapped together. Taking data and the functions that operate on that information and storing them as one programming unit is extremely powerful.
Fdtd evaluation of the sar distribution : Finite Difference Time Domain (FDTD) numerical method to develop for me a software program that simulates - evaluates Specific Absorption Rate (SAR) Distribution in a Human Head Near a Mobile Cellular Phone as a student project.
Path and editor variables in linux login : Login to Linux environment and construct start-up shell script. Whether you write the scripts as .profile or .cshrc, include the following options:
Determine the greatest magnitude negative number : Determine the greatest magnitude negative number one can represent in an 8-bit 2's complement code? Write your result in binary and decimal.
Linux commands : Project Linux commands. Please record all commands on a Microsoft Word Doc.

Reviews

Write a Review

Software Engineering Questions & Answers

  Explain the action of the function

Explain the action of the function. Determine the function in the library that performs a similar calculation?

  Frame diagrams

Prepare a frame diagram for the software systems.

  Draw an ie crow-s foot e-r diagram for entities

Draw an IE Crow's Foot E-R diagram for the entities DEPARTMENT and EMPLOYEE and the 1:N relationship between them. Assume that a DEPARTMENT.

  Designing flowchart for wholesale company

Design a flowchart to depict each situation. An individual from a wholesale company needs to prepare five copies of sales.

  Context level dfd to level 0 dfd to illustrate sub-systems

Explode Context level DFD to Level 0 DFD to illustrate sub-systems (processes). Level 0 DFD illustrates internal data stores and how data flows through processes.

  Systems analysis and design methodologies

difference between "Requirements Determination" and "Requirements Structuring", deliverables on or after coding, testing and installation, distinction flanked by system documentation and user documentation, pertinent classes, attributes, operations

  Draw er diagram to situation implied in student assistant

Draw an ER diagram (with a reasonable number of attributes) to represent the situation implied in the student assistant scenario of the previous question.

  Process of modeling using entity-relationship diagrams

Process of starting with world objects and modeling by using entity-relationship diagrams is referred to as top-down process.

  Sketch diagram displaying how message-application-layer

Sketch a diagram displaying how message gets from Alice's host to Bob's host. Ensure to list series of application-layer protocols which are used to move message between two hosts.

  Compute student grades via linux shell script

Construct a shell script to run on Knoppix or Linux, that will compute and display the letter grades for the students based on the average of four test scores.

  Information flow complexity

Cyclomatic complexity, monitoring devices, wireless dial-out device with controller, Request for Proposals (RFPs), Weighted IFC

  Architecture tradeoff analysis method

what is the methods for according to specific quality attribute like (performance, reliability  ...etc.)?Is it possible to use  Architecture Tradeoff Analysis Method  ( ATAM )  for optimization ?

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