[PDF] CSE 2221 - Sequence OSU CSE. 23. Page 24.





Previous PDF Next PDF



CSE 2221 - Stack

25 мар. 2021 г. OSU CSE. 32. Code. State s1 = < 18 6



CSE 2221 - Output Strings

http://web.cse.ohio-state.edu/software/2221/web-sw1/extras/slides/03.Output-Strings-Input.pdf



CSE 2221 - Map

25 мар. 2021 г. ... loop). Page 66. Resources. • OSU CSE Components API: Map. – http://web.cse.ohio-state.edu/software/common/doc/. 25 March 2021. OSU CSE. 66.



CSE 2221 - Contracts

Contracts in the APIs for OSU CSE components include these important features: – Parameter modes. – Two stipulations: • Parameter names in requires and 



CSE 2221 - Queue

22 мар. 2021 г. OSU CSE. 67. Code. State qi = < 8 6



CSE 2231 - Course Introduction

15 авг. 2021 г. • Online OSU CSE components API. – http://cse.osu.edu/software/common/doc/. • Online Java libraries API. – http://docs.oracle.com/javase/8/docs/ ...



CSE 2231 - Iterators

OSU CSE. 14. Page 15. The Iterator<T> Interface. • For the iterator method the kernel class returns a reference to an instance api/. 18 October 2021. OSU CSE.



CSE 2221 - Set

22 мар. 2021 г. OSU CSE. 72. Page 73. Resources. • OSU CSE Components API: Set. – http://web.cse.ohio-state.edu/software/common/doc/. • Java Libraries API: ...



CSE 2221 - Design by Contract

26 янв. 2021 г. • The API for the OSU CSE components is at: http://web.cse.ohio-state.edu/software/common/doc/. 26 January 2021. OSU CSE. 19. Page 20. APIs. • ...



CSE 2221 - Output Strings

http://web.cse.ohio-state.edu/software/2221/web-sw1/extras/slides/03.Output-Strings-Input.pdf



CSE 2221 - Map

25 mars 2021 The Map component family allows you to ... OSU CSE. 3. Map1L implements implements ... OSU CSE Components API: Map.



CSE 2221 - Stack

25 mars 2021 The Stack component family allows you ... OSU CSE. 3. Stack. Stack1L. Stack2 implements implements ... OSU CSE Components API: Stack.



CSE 2221 - Sequence

25 mars 2021 The Sequence component family allows ... OSU CSE. 3. Sequence. Sequence1L implements implements ... OSU CSE Components API: Sequence.



CSE 2231 - BinaryTree

1 oct. 2020 Standard extends. 1 October 2020. OSU CSE. 3. BinaryTree implements. BinaryTree1. Iterable extends ... OSU CSE Components API: BinaryTree.



08.Array.pdf - CSE 2231

CSE components to the built-in Java array. (more like built-in arrays than Sequence is). 8 February 2019. OSU CSE OSU CSE Components API: Array.



CSE 2221 - Course Introduction

22 août 2022 CSE 2221 Software I: Software. Components ... principles for component-based object-oriented ... Online OSU CSE components API.



CSE 2221 - Set

22 mars 2021 The Set component family allows you to manipulate finite sets of elements of any. (arbitrary) type ... OSU CSE Components API: Set.



CSE 2221 - Queue

22 mars 2021 The Queue component family allows you ... OSU CSE. 3. Queue. Queue1L. Queue2 implements implements ... OSU CSE Components API: Queue.



CSE 2231 - Tree

27 févr. 2019 The Tree component family allows you to ... OSU CSE. 3. Tree implements. Tree1. Iterable extends ... OSU CSE Components API: Tree.



CSE 2221 - Design by Contract

• The API for the OSU CSE components is at: http://web cse ohio-state edu/software/common/doc/ 26 January 2021 OSU CSE 20 The word interface has two related but distinct meanings: • a unit of Java code that contains Javadoc comments used to produce documentation • the resulting documentation



CSE 2221 - Sequence

One possible best practice alternative to the built-in Java array from the OSU CSE components Standard extends Sequence-Kernel extends implements Sequence Sequence1LSequence2L implements Sequence3 Standard extendsStandardhas contracts for three methods:Sequence-KernelclearnewInstanceextends transferFrom Sequence implements Sequence1LSequence2L



CSE 2221 - Stack

25 March 2021 OSU CSE 3 Stack Stack1L Stack2 implements implements StackKernel extends Standard extends Interfaces and Classes • OSU CSE Components API



Output Strings Input - webcseohio-stateedu

containing OSU CSE components; its simplewriterpackage offers a few advantages over using built- in System out; details later 7 January 2019 OSU CSE 9 Another Version (sans Comments) import components simplewriter SimpleWriter; import components simplewriter SimpleWriter1L; public final classHelloWorld { private HelloWorld() { public static void



CSE 2231 - BinaryTree

1 October 2020 OSU CSE 6 BinaryTree implements BinaryTree1 Iterable extends There is really an abstract class as usual in the chain here but it is not shown because these slides describe the client view and a client needs only interface BinaryTreeand class BinaryTree1



CSE 2221 Software I: Software Components and

CSE 2221 Software I: Software Components and CSE 2231Software II: Software Development and Design Restated Learning Outcomes Theme 1: software engineering concepts Be familiar with sound software engineering principles for component-based object-oriented software design Software Engineering Concepts Component-based software engineering



Searches related to osu cse components api filetype:pdf

CSE 3903 Project: Design Development and Documentation of System Software 4 Choose one of the following: CSE 5911 Capstone Design: Software Applications 4 CSE 5912 Capstone Design: Game Design and Development 4 CSE 5913 Capstone Design: Computer Animation 4 CSE 5914 Capstone Design: Knowledge-Based Systems 4

Sequence

25 March 2021OSU CSE1

Sequence

•The Sequencecomponent family allows

you to manipulate strings of entries of any (arbitrary) type through direct access by position, similar to an array -Another generic type like Queueand Set -One possible best practice alternative to the built -in Java array, from the OSU CSE components

25 March 2021OSU CSE2

Interfaces and Classes

Sequence

Kernel

extends

Standard

extends

25 March 2021OSU CSE3

Sequence

Sequence1L

implements implements

Sequence2L

Sequence3

Interfaces and Classes

Sequence

Kernel

extends

Standard

extends

25 March 2021OSU CSE4

Sequence

Sequence1L

implements implements

Sequence2L

Sequence3

Standardhas contracts

for three methods: clear newInstance transferFrom

Interfaces and Classes

Sequence

Kernel

extends

Standard

extends

25 March 2021OSU CSE5

Sequence

Sequence1L

implements implements

Sequence2L

Sequence3

SequenceKernelhas

contracts for three methods: add remove length

Interfaces and Classes

Sequence

Kernel

extends

Standard

extends

25 March 2021OSU CSE6

Sequence

Sequence1L

implements implements

Sequence2L

Sequence3

Sequence

has contracts for six other methods: entry replaceEntry append flip insert extract

Mathematical Model

•The value of a Sequencevariable is modeled as a string of entries of type T •Formally: typeSequence is modeled by string ofT

25 March 2021OSU CSE7

No-argument Constructor

•Ensures: this= < >

25 March 2021OSU CSE8

Example

25 March 2021OSU CSE9

CodeState

Sequence

si= newSequence1L<>();

Example

25 March 2021OSU CSE10

CodeState

Sequence

si= newSequence1L<>(); si= < > add voidadd(intpos, T x)

•Adds xat position posof this.

•Aliases: reference x

•Updates: this

•Requires:

0 <= posandpos<= |this|

•Ensures:

this= #this[0, pos) * * #this[pos, |#this|)

25 March 2021OSU CSE11

Example

25 March 2021OSU CSE12

CodeState

si= < 49, 3 > z= 70 si.add (1, z);

Example

25 March 2021OSU CSE13

CodeState

si= < 49, 3 > z= 70 si.add (1, z); si= < 49, 70, 3 > z= 70

Example

25 March 2021OSU CSE14

CodeState

si= < 49, 3 > z= 70 si.add (1, z); si= < 49, 70, 3 > z= 70

Note the alias created

here, which you cannot see in the tracing table; you should be able to draw the appropriate diagram showing it. remove

T remove(

intpos)

•Removes and returns the entry at position pos

of this. •Updates: this

•Requires:

0 <= posandpos< |this|

•Ensures:

this= #this[0, pos) * #this[pos+1, |#this|) and = # this[pos, pos+1)

25 March 2021OSU CSE15

Example

25 March 2021OSU CSE16

CodeState

si= < 49, 3, 70 > z= -584 z= si.remove(1);

Example

25 March 2021OSU CSE17

CodeState

si= < 49, 3, 70 > z= -584 z= si.remove(1); si= < 49, 70 > z= 3 length intlength()

•Reports the length of this.

•Ensures: length = |this|

25 March 2021OSU CSE18

entry

T entry(

intpos)

•Reports the entry at position posof this.

•Aliases: reference returned by entry

•Requires:

0 <= posandpos< |this|

•Ensures:

= this[pos, pos+1)

25 March 2021OSU CSE19

Example

25 March 2021OSU CSE20

CodeState

si= < 49, 3, 70 > z= -584 z= si.entry(1);

Example

25 March 2021OSU CSE21

CodeState

si= < 49, 3, 70 > z= -584 z= si.entry(1); si= < 49, 3, 70 > z= 3

Example

25 March 2021OSU CSE22

CodeState

si= < 49, 3, 70 > z= -584 z= si.entryAt(1); si= < 49, 3, 70 > z= 3

Note the alias created

here, which you cannot see in the tracing table; you should be able to draw the appropriate diagram showing it. replaceEntry

T replaceEntry(intpos, T x)

•Replaces the entry at position posof thiswith x, and returns the old entry at that position. •Aliases: reference x

•Updates: this

•Requires:

0 <= posandpos< |this|

•Ensures:

this= #this[0, pos) * * #this[pos+1, |#this|) and = #this[pos, pos+1)

25 March 2021OSU CSE23

Example

25 March 2021OSU CSE24

CodeState

si= < 49, 70 > z= -8 w = -584 w= si.replaceEntry(1, z);

Example

25 March 2021OSU CSE25

CodeState

si= < 49, 70 > z= -8 w = -584 w= si.replaceEntry(1, z); si= < 49, -8 > z= -8 w = 70

Example

25 March 2021OSU CSE26

CodeState

si= < 49, 70 > z= -8 w = -584 w= si.replaceEntryAt(1, z); si= < 49, -8 > z= -8 w = 70

Note the alias created

here, which you cannot see in the tracing table; you should be able to draw the appropriate diagram showing it.

Another Example

25 March 2021OSU CSE27

CodeState

si= < 49, 70 > z= -8 z= si.replaceEntry(1, z);

Another Example

25 March 2021OSU CSE28

CodeState

si= < 49, 70 > z= -8 z= si.replaceEntry(1, z); si= < 49, -8 > z= 70

Another Example

25 March 2021OSU CSE29

CodeState

si= < 49, 70 > z= -8 z= si.replaceEntry(1, z); si= < 49, -8 > z= 70

This use of the method

avoids creating an alias: it swapszwith the entry previously at position 1. append voidappend(Sequence s)

•Concatenates ("appends") sto the end of

this •Updates: this

•Clears: s

•Ensures:

this= #this* #s

25 March 2021OSU CSE30

flip voidflip()

•Reverses ("flips") this.

•Updates: this

•Ensures:

this= rev(#this)

25 March 2021OSU CSE31

insert voidinsert(intpos, Sequence s) •Inserts sat position posof this, and clears s. •Updates: this

•Clears: s

•Requires:

0 <= posandpos<= |this|

•Ensures:

this= #this[0, pos) * #s * this pos this

25 March 2021OSU CSE32

Example

25 March 2021OSU CSE33

CodeState

si1 = < 8, 6, 92 > si2 = < 1,-7 > si1.insert(2, si2);

Example

25 March 2021OSU CSE34

CodeState

si1 = < 8, 6, 92 > si2 = < 1,-7 > si1.insert(2, si2); si1 = < 8, 6, 1, -7, 92 > si2 = < extract voidextract(intpos1, intpos2, Sequence s) •Removes the substring of thisstarting at position pos1and ending at position pos2 -1, and puts it in s. •Updates: this

•Replaces: s

•Requires:

0 <= pos1

andpos1 <= pos2 andpos2 <= |this|

•Ensures:

this= #this[0, pos1) * #this[pos2, |#this|) and s = # this [pos1, pos2)

25 March 2021OSU CSE35

Example

25 March 2021OSU CSE36

CodeState

si1 = < 8, 6, 92, 27, 0 > si2 = < 1,-7, 562 > si1.extract(1, 3, si2);

Example

25 March 2021OSU CSE37

CodeState

si1 = < 8, 6, 92, 27, 0 > si2 = < 1,-7, 562 > si1.extract(1, 3, si2); si1 = < 8, 27, 0 > si2 = < 6, 92>

Resources

•OSU CSE Components API: Sequence

25 March 2021OSU CSE38

quotesdbs_dbs14.pdfusesText_20
[PDF] osu cse components binary tree

[PDF] osu cse components stack

[PDF] osu cse documentation

[PDF] oswego ny newspapers online

[PDF] osxpmem

[PDF] other names for seven deadly sins

[PDF] otis 12 gauge shotgun cleaning kit

[PDF] otpf 3rd edition pdf

[PDF] ott business model pdf

[PDF] ottawa application login

[PDF] ottawa catholic school board calendar 2019 2020

[PDF] ottawa catholic school board strike

[PDF] ottawa county flu deaths 2019

[PDF] otto blockly

[PDF] otube oracle