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

  Software development practices

Agile Development is a blanket term that covers a wide variety of software development practices many of which have been codified and documented.

  Writing and executing an insert statement

Make yourself a student by writing and executing an INSERT statement to insert a row into the STUDENT table with information about you.

  Design context diagram for entering user-s name in system

Design Context diagram, level0 and level1 (if need) for the following: The user submit her/his name to the system, the system will tell the user if he is a boy or a girl or don't know by looking up his name in database

  Draw a flowchart to determine fare

Write an algorithm to find the bus fare based on distance travelled as per the following rates:a. Rs.5.00 for first 2 kms.

  Key drawbacks of the numbered code

Think about the flashlight-messaging (ABC=123); Determine the key drawbacks of the Numbered Code?

  Create flowchart to calculate payroll of employee

Create a flowchart to calculate the payroll of each employee for one pay period. The flowchart should account for overtime as time and a half for any hours greater than 40.

  Use ishikawa diagram to investigate causes of problem

A restaurant is not doing well. It is doing poorly as customer patronage is low. Use Ishikawa diagram to investigate the causes of the problem.

  Define the term software architecture

Define the term software architecture A service is a software component of distinctive functional meaning that typically encapsulates a high-level business concept, and is usually made up of three parts. Describe the three sub-components that m..

  Create erd using entities and attributes for driver-s log

Create a detailed ERD using the Entities and Attributes for Driver's Log document found on the Huffman Trucking Intranet site.

  Formal programming languages and natural languages

As we know that there are problems of understanding natural languages as opposed to formal programming languages. As an illustration of the complexities involved in the case of natural languages,.

  Sketch use-case diagrams to show participants in use-cases

Beginning with 'make a call' and 'end a call', Sketch use-case diagrams to show participants in these use-cases. Then draw other use-cases to say what other significant interactions these participants might have with each other, or with other part..

  Identify several processes and concepts for managing project

Identify several processes and concepts for managing projects. Thinking about these processes and concepts, answer the following questions: Which process or concept do you feel would benefit your current organization the most? Explain.

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