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

  Research report on software design

Write a Research Report on software design and answer diffrent type of questions related to design. Report contain diffrent basic questions related to software design.

  A case study in c to java conversion and extensibility

A Case Study in C to Java Conversion and Extensibility

  Create a structural model

Structural modeling is a different view of the same system that you analyzed from a functional perspective. This model shows how data is organized within the system.

  Write an report on a significant software security

Write an report on a significant software security

  Development of a small software system

Analysis, design and development of a small software system.

  Systems analysis and design requirements

Systems Analysis and Design requirements

  Create a complete limited entry decision table

Create a complete limited entry decision table

  Explain flow boundaries map

Explain flow boundaries map the dfd into a software architecture using transform mapping.

  Frame diagrams

Prepare a frame diagram for the software systems.

  Identified systems and elements of the sap system

Identify computing devices, which could be used to support Your Improved Process

  Design a wireframe prototype

Design a wireframe prototype to meet the needs of the personas and requirements.

  Explain the characteristics of visual studio 2005

Explain the characteristics of Visual Studio 2005.

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