Object Orientated Analysis and Design with UML
Lecture 01

Learn object-oriented design principles & analysis with UML
The idea of an object extends
Class diagram
The idea of an object extends
•Structural diagrams help us see the static view of the system in terms of its components
•For example, class diagram is a structural diagram because it shows a static view of all the classes that will be created over the system
•Structural diagrams help us see the static view of the system in terms of its components
•Structural diagrams help us see the static view of the system in terms of its components
•Structural diagrams help us see the static view of the system in terms of its components
•Structural diagrams help us see the static view of the system in terms of its components
•Structural diagrams help us see the static view of the system in terms of its components
•Structural diagrams help us see the static view of the system in terms of its components
•Structural diagrams help us see the static view of the system in terms of its components
Week |
---|
PARAGRAGHS
Auto-Animate
reveal.js can automatically animate elements across slides. All you need to do is add data-auto-animate to two adjacent slide <section> elements and Auto-Animate will animate all matching elements between the two.
Here's a simple example to give you a better idea of how it can be used.
1
Save images in
the right format
Websites mainly use images in
jpeg, gif, or png format. If you
choose the wrong image
format then your image might
not look as sharp as it should
and can make the web page
slower to load.
Save images at
the right size
You should save the image at
the same width and height it will
appear on the website. If
the image is smaller than the
width or height that you have
specified, the image can be
distorted and stretched. If the
image is larger than the width
and height if you have specified,
the image will take longer to
display on the page.
2
Save images at
the right size
You should save the image at
the same width and height it will
appear on the website. If
the image is smaller than the
width or height that you have
specified, the image can be
distorted and stretched. If the
image is larger than the width
and height if you have specified,
the image will take longer to
display on the page.
3
3
LISTS
Numbered lists
Bullet lists
Definition lists
In the browser window you can see a web page that features exactly
the same content as the Word document you met on the page 18. To
describe the structure of a web page, we add code to the words we want
to appear on the page.
You can see the HTML code for this page below. Don't worry about what
the code means yet. We start to look at it in more detail on the next
page. Note that the HTML code is in blue, and the text you see on screen
is in black.
Number 12
Learn object-oriented design principles & analysis with UML



OBJECT TYPE: HOTEL
Large Heading
Slides

<form action="http://www.example.com/login/"
method="post">
<label for="username">Username:</label>
<input type="text" name="username"
required="required" /></title><br />
<label for="password">Password:</label>
<input type="password" name="password"
required="required" />
<input type="submit" value="Submit" />
</form>





Figure 3.19 A Completed P E R T Diagram for the Analysis Phase of a Systems Project
Advantages |
Disadvantages |
|
---|---|---|
Creating Custom Software |
Specific response to specialized business needs Innovation may give firm a competitive advantage In-house staff available to maintain software Pride of ownership |
May be significantly higher initial cost compared to C O T S software or A S P Necessity of hiring or working with a development team Ongoing maintenance |
Purchasing C O T S Packages |
Refined in the commercial world Increased reliability Increased functionality Often lower initial cost Already in use by other firms Help and training comes with software |
Programming focused; not business focused Must live with the existing features Limited customization Uncertain financial future of vendor Less ownership and commitment |
Using S a a S |
Organizations that do not specialize in information systems can focus on what they do best (their strategic mission) There is no need to hire, train, or retain a large I T staff There is no expenditure of employee time on nonessential I T tasks |
Loss of control of data, systems, I T employees, and schedules Concern over the financial viability and long-run stability of the S a a S provider Security, confidentiality, and privacy concerns Loss of potential strategic corporate advantage regarding innovativeness of applications |
Figure 3.8 Software Alternatives
Identifying Benefits and Costs
•Tangible benefits are advantages measurable in dollars through the use of the information system
•Intangible benefits are difficult to measure
•Tangible costs are accurately projected by the systems analyst and accounting personnel
•Intangible costs are difficult to estimate and may not be known
Accessing object properties
Accessing an entire object is useful in some cases, but in other cases you need access to individual properties and methods within that object. There are two ways of accessing object properties, dot notation and bracket notation. Let's look at dot notation first. I want to output the value of just the pocket number property. To do that, I'll first console logout, the pocketNum value:, then I'll use dot notation by first accessing the backpack object, then adding a dot, and then adding the property I want, in this case pocket number. And you can see when I add the dot, VS Code automatically says, "Hey I see you're using dot notation. What is it you want?" And it suggests to me pocket number.
So when you see a string like this with dots, you know you're accessing properties inside an object. However, in some cases you need more control, either because you want to use a variable as the property name, or because the property name is non-standard for some reason. For this, we have bracket notation. Let's look at how that works. So I'll copy this line here and then paste it in down here. Then to use bracket notation, I need to wrap the property name in quotation marks, because it's a string, and then square brackets. So if I highlight it, I can do quotation marks, and then I'll take the dot away, and put in the square bracket and whoops, put in a square bracket in its place like this.
Save, check it in the console, and you see now we have the full object, and then we have just a pocket number value. Dot notation is called dot notation because you literally use a dot to separate the different properties. So here we're digging one level in. So we're grabbing the backpack object, and then saying dot, just the property name. We can also use it to dig further into the object. If you look at the object here, you'll see the strapLength property has its own object inside it. with the values left and right. So if I wanted to output just the left strapLength value I can console logout, let's say, Strap length :L and then I say backpack, that's the object, then I want the strapLength property, and then inside the strapLength property, I want the left property. Save. And now we have that value as well, Strap length L: 26. Dot notation is the preferred way of accessing object properties because it's easy to read and understand. When I look at this, I immediately see, Oh, it's an object. And I'm looking for the strapLength property inside that object, and then the left property inside the strapLength property.
Accessing object properties
So as again see, the bracket notation is more clunky, but it also gives us more control. Save this output in the browser, and we have the pocketNum value again here. Now like I said, bracket notation allows us to do more advanced things. So let's say for example you want to pass the property value as a variable. You may have a function that outputs a specific value, and then you want to use that value. So for now, let's just say we want to set up a variable called query, and then we set that query to one of these values. We can set it to pocket number. Then, inside this bracket notation, I can use that query variable instead of a string. So what I'm doing now is saying, go and find the query variable, and then put the value of this variable inside here. So I need to put this in a string so that it works correctly. Save that, check it in the console, and it works the same way as before. What you see here can't be done using dot notation. If you place a variable inside dot notation, the script will simply break, because you're doing something incorrect. That's why we have this bracket notation. It gives us more control and allows us to do more things. There's also one additional situation where you might need to use bracket notation. In JavaScript, the standard states that a property name can only contain letters, digits, dollar signs, and underscores. However, nothing actively prevents you or a piece of software from creating property names that break these conventions. So in theory, we could encounter a property name that starts with a digit, or it contains quotation marks or something else. When using dot notation, you can't access that property if it starts with a number, or uses a hyphen, or otherwise breaks the standard, because everything will break. In this circumstance, bracket notation comes to the rescue, because you are passing a quoted string that can be literally anything. So why would you ever come across properties with non-standard names? You'd never write them yourself, right? Well in JavaScript, we often work with generated data that has been transformed into JavaScripts and a JavaScript object from somewhere else. And these generators of that data do not always conform to JavaScript specifications, but thanks to bracket notation, JavaScript allows us to parse data even when it doesn't follow the rules. So for example, so if I have a property that breaks convention, let's say I have a property that has a hyphen in it, I can access that property using bracket notation, and nothing will break. So, in most cases, use dot notation because it's easy to understand. If you need to pass a variable into the property name, or you need to access a property that is somehow breaking convention, use bracket notation.
Computers create models of the world using data.
The models use objects to represent physical things.
Objects can have: properties that tell us about
the object; methods that perform tasks using the properties of that object; events which are triggered when a user interacts with the computer.
Programmers can write code to say "When this event occurs, run that code."
Web browsers use HTML markup to create a model of the web page. Each element creates its own node (which is a kind of object).
To make web pages interactive, you write code that uses the browser's model of the web page.











Object-Oriented Thinking
•Fuels business and can be the critical factor in determining the success or failure of a business
•Needs to be managed correctly
•Managing computer-generated information differs from handling manually produced data
Manuals and specifications
This book is a tutorial. It aims to help you gradually learn the language. But once you’re familiar with the basics, you’ll need other sources.
Specification
The ECMA-262 specification contains the most in-depth, detailed and formalized information about JavaScript. It defines the language.
But being that formalized, it’s difficult to understand at first. So if you need the most trustworthy source of information about the language details, the specification is the right place. But it’s not for everyday use.
A new specification version is released every year. In-between these releases, the latest specification draft is at https://tc39.es/ecma262/.
To read about new bleeding-edge features, including those that are “almost standard” (so-called “stage 3”), see proposals at https://github.com/tc39/proposals.
Programming languages are very useful for rapidly completing repetitive tasks, from multiple basic calculations to just about any other situation where you've got a lot of similar items of work to complete. Here we'll look at the loop structures available in JavaScript that handle such needs.
Prerequisites:Objective:
Basic computer literacy, a basic understanding of HTML and CSS, JavaScript first steps. |
To understand how to use loops in JavaScript. |
Keep me in the loop
Loops, loops, loops. As well as being associated with popular breakfast cereals, roller coasters, and musical production, they are also a critical concept in programming. Programming loops are all to do with doing the same thing over and over again, which is termed iteration in programming speak.
Let's consider the case of a farmer who is making sure he has enough food to feed his family for the week. He might use the following loop to achieve this:
A loop usually has one or more of the following features:
- A counter, which is initialized with a certain value — this is the starting point of the loop ("Start: I have no food", above).
- A condition, which is a true/false test to determine whether the loop continues to run, or stops — usually when the counter reaches a certain value. This is illustrated by "Have I got enough food?" above. Let's say he needs 10 portions of food to feed his family.
- An iterator, which generally increments the counter by a small amount on each successive loop until the condition is no longer true. We haven't explicitly illustrated this above, but we could think about the farmer being able to collect say 2 portions of food per hour. After each hour, the amount of food he has collected is incremented by two, and he checks whether he has enough food. If he has reached 10 portions (the point where the condition is no longer true, so the loop exits), he can stop collecting and go home.
Code structure
The first thing we’ll study is the building blocks of code.
Statements
Statements are syntax constructs and commands that perform actions.
We’ve already seen a statement, alert('Hello, world!'), which shows the message “Hello, world!”.
We can have as many statements in our code as we want. Statements can be separated with a semicolon.
For example, here we split “Hello World” into two alerts:
alert('Hello'); alert('World');
Usually, statements are written on separate lines to make the code more readable:
alert('Hello'); alert('World');
Text
Semicolons
A semicolon may be omitted in most cases when a line break exists.
This would also work:
alert('Hello')
alert('World')
Here, JavaScript interprets the line break as an “implicit” semicolon. This is called an automatic semicolon insertion.
In most cases, a newline implies a semicolon. But “in most cases” does not mean “always”!
There are cases when a newline does not mean a semicolon. For example:
alert(3 +
1
+ 2);
The code outputs 6 because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus "+", then it is an “incomplete expression”, so a semicolon there would be incorrect. And in this case, that works as intended.
But there are situations where JavaScript “fails” to assume a semicolon where it is really needed.
Errors which occur in such cases are quite hard to find and fix.
Making a bootable macOS Big Sur 11.5.2 USB drive is a quick way to install a fresh copy of macOS on your Mac! I will show you how to make a bootable Big Sur USB Installer in under 5 minutes! You can use this USB flash drive to reinstall macOS Big Sur on your Mac by holding down the option key then selecting the installer disk. This will save you a ton of time since you don't have to download the full 12GB full installer from Apple. Full command sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume Download macOS Big Sur Full Installers here - https://mrmacintosh.com/macos-big-sur... How to download macOS full installers - Big Sur, Catalina, Mojave, High Sierra, Sierra & El Captain article. (Go to section #6 for the quickest way to download) https://mrmacintosh.com/how-to-downlo...
- Schema
- Fields
Back-end languages
- When users visit websites, each receives a slightly different experience depending on the data stored by those websites. Web developers, especially backend specialists, need to be able to work with databases. To do this they'll need to know data languages like Structured Query Language which is also called SQL. And this is a popular way to store and retrieve information. Now you may hear SQL pronounced as sequel. There are many variants but they're pretty similar. There's another important category of databases that you should be familiar with. They're called NoSQL, and you can tell by the name that they're very different than SQL. Now sequel databases have clearly defined structures which is sometimes referred to as the schema. In contrast, NoSQL databases are the hippies of databases. They have like no pre-defined structure and store information in dynamic schemas. I know if you're an organized person like me, you're probably thinking how can all this disorder be any good?
Title Text
NoSQL databases can actually be faster and more efficient because some of that structure in sequel ends up as overhead and makes them run slower. Now on the other side of databases, you need a language that can take the data and merge it with templates to display customized info. They are languages like PHP, Node.js, .NET and Ruby on Rails that combine templates with data and build custom pages for each user.
The set of tools that each company uses is often called the Stack and it varies sometimes even between different projects. Some stacks can become their own specialized platforms. The most famous of these is WordPress. Which started out as a blogging platform but has grown to let you build full website infrastructures. New web developers need to study at least one structured database language. One NoSQL language and at least one language for merging that with templates. Now this is one place where your choices can affect where they work. I suggest starting with PHP and then explore some of the other options like Node.js, .NET, or Ruby on Rails. Also WordPress is so popular that it powers 30% of the web. So you should at least know how to set it up. Now entire businesses are built around the WordPress stack. It pays to be flexible when you're starting out but once you make some decisions it will pay even more to develop deep knowledge in one environment.
Underscore:
first_name, last_name, master_card, inter_city.
Upper Camel Case (Pascal Case):
FirstName, LastName, MasterCard, InterCity.
Lower Camel Case:
JavaScript programmers tend to use camel case that starts with a lowercase letter:
firstName, lastName, masterCard, interCity.
JavaScript Character Set
JavaScript uses the Unicode character set.
Unicode covers (almost) all the characters, punctuations, and symbols in the world.
Copy of full strcuture 1
By deskeiher
Copy of full strcuture 1
Base Deck
- 119