The document describes an assignment to practice operator overloading by creating a ListType class that holds a list of integers. Students are tasked with implementing various member functions and overloading operators like <<, &, |, and + to provide output, appending, prepending, and concatenation capabilities. The assignment involves 7 tasks, including creating getters, a toString method, overloading << for output, and overloading operators for appending, prepending, indexing, and concatenating lists. Completing the tasks for integers earns full credit, while templatizing the class is worth 10 bonus points.
Although people may be very accustomed to reading and understanding .docxmilissaccm
Although people may be very accustomed to reading and understanding calculations like those in the preceding assignments, it is evident they are not very self-evident or obvious in the world of computing. One way to simplify the problem is just to redefine how expressions are represented, to allow for simpler interpretation.
One knows that a plus sign means to add, but typically when a plus sign is encountered in the middle of an expression, there is not yet enough information to know what values are to be added. One has to continue scanning the expression to find the second operand, and also decide if there are other operations of higher precedence that must take place first. How much simpler it would be if a parser could know to add just as soon as the plus sign appears.
This is the motivation for a representation called
postfix
notation, in which all operators
follow
their operands. Here are some illustrations.
Infix Representation
Postfix Representation
Operations
(1 + 2) * 3
1 2 + 3 *
Add 1 and 2, then multiply by 3
1 + (2 * 3)
1 2 3 * +
Multiply 2 and 3, then add to 1
(1+2) * (6-4)
1 2 + 6 4 - *
Add 1 and 2, subtract 4 from 6, multiply
Hewlett Packard has produced a line of calculators that expected all inputs to be in postfix form, so every operation key could compute the moment it was pressed.
The goal of this assignment is to convert an infix expression into a postfix expression. This can be accomplished using the same algorithm as was used to evaluate the infix expression, simply yielding a new expression instead of a computed value. In the last example, instead of adding, it would produce an expression ending with a plus sign. The multiplication function would similarly produce an expression from its operands, followed by the multiplication operator.
Applying a Linked List
One of the purposes of this course is to find the data structures that would assist in producing the best results as efficiently as possible. The linked list is quite serviceable for the needs of this assignment.
A linked list will be useful in the calculation portion of this assignment. As the postfix expression is scanned, values must be saved until an operator is discovered. Each operator would apply to the two values that precede it, and then its result would also be saved. As an extreme example, consider this expression:
1 2 3 4 5 * - + - multiply 4 * 5, subtract from 3, add to 2, subtract from 1
Note this is not at all the same meaning as:
1 2 * 3 - 4 + 5 - or 4 5 * 3 - 2 + 1 -
(If you need to more clearly see the difference, try inserting parentheses around all operations, such that each parentheses consists of two expressions followed by an operator.)
Defining a Linked List
The linked list is a rather simple data structure, and the required operations should be rather simple, so very little will be said here about what to do. Instead, here is a quick highlight of what should appear in your implementation..
CSC8503 Principles of Programming Languages Semester 1, 2015.docxfaithxdunce63732
CSC8503 Principles of Programming Languages Semester 1, 2015
Assignment 2
Due Date: 11:55pm AEST (13:55 UTC/GMT) Monday 10 May 2015
Weighting: 20%
Total marks: 20
Please submit this assignment using the assignment submission facility on the course
Study Desk. Submit a single file, either a ZIP or TAR archive. The archive
should contain (1) for Part A, a Haskell source file containing the function definitions,
and (2) for Part B, your version of all the files that are in the SPL distribution that you
downloaded.
Just add the Haskell file (call it say ass2.hs) to your collection of SPL files and zip or
tar them into an archive that you submit.
Part A – Haskell – 12 marks
Complete the following Haskell function definitions. Unless stated otherwise do not use library
functions that are not in the Haskell standard prelude. This constraint is so that you
gain practice in simple Haskell recursive programming. The Haskell 2010 standard prelude
definition is available at
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
Place all definitions in a single file. Submit just this text file electronically as
directed on the course Study Desk page. Use the specified function name as your
code will be tested by a Haskell function expecting that function name.
The testing program may use many more test cases than the ones shown in the specification.
So, please test your functions extensively to ensure that you maximise your marks.
1. [2 marks]
Write the function insertAt :: Int -> a -> [a] -> [a].
insertAt n x xs will insert the element x into the list xs at position n items from the
beginning of xs. In other words, skip n items in xs, then insert the new element.
You can assume that n will be a non-negative number. If n is greater than the length of
the list xs then add it to the end of the list.
For example
insertAt 3 ’-’ "abcde" ⇒ "abc-de"
insertAt 2 100 [1..5] ⇒ [1,2,100,3,4,5]
Hint: Use standard prelude functions ++ and splitAt.
2. [2 marks] Write a function uniq :: Eq a => [a] -> [a] that removes duplicate entries
from a sorted (in ascending order) list. The resulting list should be sorted, and no value
in it can appear elsewhere in the list.
For example:
1
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
uniq [1,2,2] ⇒ [1,2]
uniq [1,2,3] ⇒ [1,2,3]
3. [1 mark] Write a function
join :: Eq a => [(a,b)] -> [(a,c)] -> [(a,b,c)].
join takes two lists of pairs, and returns a single list of triples. A triple is generated only
when there exists a member of both argument lists that have the same first element. The
list elements are not sorted. This is the same semantics as the relational algebra natural
join operation.
For example:
join [(2,"S"),(1,"J")] [(2,True),(3,False)]
⇒ [(2,"S",True)]
join [(2,"S"),(1,"J")] [(2,1),(2,2),(3,4)]
⇒ [(2,"S",1),(2,"S",2)]
Hint: use list a comprehension.
4. [1 mark] This question extends the join function from question 3. Write the function
ljoin :: Eq a => [(a,b)] -> [(a,c.
This first assignment will focus on coding in Python, applying kno.docxabhi353063
This first assignment will focus on coding in Python, applying knowledge students should already have about programming with functions and arrays. When the assignment is complete, there will in fact be some indirect recursion, but that needs not complicate the assignment, if each function is allowed to assume that all other functions are implemented correctly.
Problem Description
Several years of experience in algebra probably yields a consistent interpretation of the expression
12 - 2 * 5 +3
Most would expect that the multiplication would be the first operation, followed by a subtraction, and then an addition, yielding a value of 5. Performing those three operations in any other order would yield very different results.
When a programmer places such an expression into a program, they would expect it to perform the same series of operations. The interpreter or compiler making sense of the expression then must be able to construct the correct meaning of the input. Often one will hear of this behavior called
parsing
.
Assignment Specifications
The input for this assignment will arrive as an instantiated
Python list
consisting of
tokens
, where each token is either an integer numeral or an operator. An additional symbol (such as a semicolon) will appear at the end of the list to mark the end of the input.
The Python list has a great deal in common with the C++ array, and this assignment will treat it as such. One will be able to use an integer subscript to examine each element of the list, just as one could examine consecutive array elements. The next assignment will use a different approach to visit the elements of the list.
Implementation Hints
One very simple method of parsing input is termed
predictive parsing
in which each function has an idea of what it expects to see next (or what alternatives it will encounter). For example, we would expect a numeric expression like the one above to include a series of values to be added or subtracted. Whether those values are explicit numbers (such as 12 and 3) or the results of other operations (such as 2*5) might sound like a complication, but that can just be addressed by some other function.
The pseudocode for parsing a sum expression would therefore look something like this:
to evaluate a sum expression (series of zero or more additions and subtractions): evaluate a product expression (zero or more multiplications and divisions) while the next token is a + or - operator evaluate the product expression that follows the operator perform the addition or subtraction
For the given example, the first product expression would simply be the value 12. This is followed by a minus sign, so the next product is evaluated to be 10, which is subtracted from 12 to yield 2. Since this is followed by a plus sign, the loop would repeat to evaluate and add the 3. No more operators appear, so the final result is 5.
The above specifications said that some other symbol would appear at the very end of the input. Thi ...
I am Joe L. I am a Programming Assignment Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming from, University of Chicago, USA. I have been helping students with their homework for the past 10 years. I solve assignments related to Programming.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Programming Assignments.
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
The second programming assignment (HW4) is designed to help you ga.docxoreo10
The second programming assignment (HW4) is designed to help you gain
experience with object oriented programming in Java.
The given file for hw4, "hw4.given.tar.gz", is on the class web page.
To untar and unzip the file, execute
tar -xzvf hw4.given.tar.gz
It will expand to create a directory called hw4, which contains sub-
directories part0, ..., part9, one for each part of the assignment.
Each part has a Makefile. Don't modify them.
Main.java, which is different for each part, is used to test your code
by creating objects, invoking methods, etc.
As you did on the previous assignment, you'll be using the tester tool
for testing.
Proceed similarly to what you did on the previous programming
assignment:
cd part0
# add a bunch of code
make
# if make gives errors, fix them and make again.
../tester
# if tester gives errors, fix them and repeat this cycle.
In Part 7 (only), additional tests (in Main.java and correct output
files) check that the iterators' next() methods give an error if
they're invoked when no elements remain in their collection. (In
subsequent parts, such erroneous behavior results in an exception, so
the testing doesn't use these extra tests.)
Similar to the last assignment, each part builds off the last. When
you're finished with one part,
copy all .java files ***EXCEPT Main.java*** to the next part.
Then modify these copies to start your solution for the next part.
***Exception: again, don't copy Main.java from part to part.***
See the documentation on tester (on the class web page) for details on
its use.
As always, get started early to avoid the last minute rush!
ECS140A-F16-06 October 18, 2016
ASSIGNMENT 4: Java object oriented program
Due: October 27, 2016
Overview
The purpose of this assignment is for you to gain experience with object oriented programming in
Java: in particular, the ideas of inheritance, dynamic binding (virtual methods), overriding and
overloading methods, iterators (aka generators). It will also give you some exposure to how some
programming language features are implemented, i.e., what happens "behind the scenes" when
you execute a program. Although no language provides the exact features in this assignment, a
number of languages (e.g., Awk, Icon, LISP, CLU) do provide similar features. (In fact, you
could define a little language, using techniques from first program, that would contain features
like those in this assignment.)
Your program needs to provide several abstractions. The first abstraction is an Element, of which
there are three kinds: EBoolean, EInteger, and EString. The second abstraction is an EList of Ele-
ment; associated with the EList abstraction is EListIt, which iterates over a list. Details of these
are given below in each part of this assignment.
N.B., you are restricted as to how you write your code. See “Details” before you start coding.
1
ECS140A-F16-06 October 18, 20 ...
Although people may be very accustomed to reading and understanding .docxmilissaccm
Although people may be very accustomed to reading and understanding calculations like those in the preceding assignments, it is evident they are not very self-evident or obvious in the world of computing. One way to simplify the problem is just to redefine how expressions are represented, to allow for simpler interpretation.
One knows that a plus sign means to add, but typically when a plus sign is encountered in the middle of an expression, there is not yet enough information to know what values are to be added. One has to continue scanning the expression to find the second operand, and also decide if there are other operations of higher precedence that must take place first. How much simpler it would be if a parser could know to add just as soon as the plus sign appears.
This is the motivation for a representation called
postfix
notation, in which all operators
follow
their operands. Here are some illustrations.
Infix Representation
Postfix Representation
Operations
(1 + 2) * 3
1 2 + 3 *
Add 1 and 2, then multiply by 3
1 + (2 * 3)
1 2 3 * +
Multiply 2 and 3, then add to 1
(1+2) * (6-4)
1 2 + 6 4 - *
Add 1 and 2, subtract 4 from 6, multiply
Hewlett Packard has produced a line of calculators that expected all inputs to be in postfix form, so every operation key could compute the moment it was pressed.
The goal of this assignment is to convert an infix expression into a postfix expression. This can be accomplished using the same algorithm as was used to evaluate the infix expression, simply yielding a new expression instead of a computed value. In the last example, instead of adding, it would produce an expression ending with a plus sign. The multiplication function would similarly produce an expression from its operands, followed by the multiplication operator.
Applying a Linked List
One of the purposes of this course is to find the data structures that would assist in producing the best results as efficiently as possible. The linked list is quite serviceable for the needs of this assignment.
A linked list will be useful in the calculation portion of this assignment. As the postfix expression is scanned, values must be saved until an operator is discovered. Each operator would apply to the two values that precede it, and then its result would also be saved. As an extreme example, consider this expression:
1 2 3 4 5 * - + - multiply 4 * 5, subtract from 3, add to 2, subtract from 1
Note this is not at all the same meaning as:
1 2 * 3 - 4 + 5 - or 4 5 * 3 - 2 + 1 -
(If you need to more clearly see the difference, try inserting parentheses around all operations, such that each parentheses consists of two expressions followed by an operator.)
Defining a Linked List
The linked list is a rather simple data structure, and the required operations should be rather simple, so very little will be said here about what to do. Instead, here is a quick highlight of what should appear in your implementation..
CSC8503 Principles of Programming Languages Semester 1, 2015.docxfaithxdunce63732
CSC8503 Principles of Programming Languages Semester 1, 2015
Assignment 2
Due Date: 11:55pm AEST (13:55 UTC/GMT) Monday 10 May 2015
Weighting: 20%
Total marks: 20
Please submit this assignment using the assignment submission facility on the course
Study Desk. Submit a single file, either a ZIP or TAR archive. The archive
should contain (1) for Part A, a Haskell source file containing the function definitions,
and (2) for Part B, your version of all the files that are in the SPL distribution that you
downloaded.
Just add the Haskell file (call it say ass2.hs) to your collection of SPL files and zip or
tar them into an archive that you submit.
Part A – Haskell – 12 marks
Complete the following Haskell function definitions. Unless stated otherwise do not use library
functions that are not in the Haskell standard prelude. This constraint is so that you
gain practice in simple Haskell recursive programming. The Haskell 2010 standard prelude
definition is available at
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
Place all definitions in a single file. Submit just this text file electronically as
directed on the course Study Desk page. Use the specified function name as your
code will be tested by a Haskell function expecting that function name.
The testing program may use many more test cases than the ones shown in the specification.
So, please test your functions extensively to ensure that you maximise your marks.
1. [2 marks]
Write the function insertAt :: Int -> a -> [a] -> [a].
insertAt n x xs will insert the element x into the list xs at position n items from the
beginning of xs. In other words, skip n items in xs, then insert the new element.
You can assume that n will be a non-negative number. If n is greater than the length of
the list xs then add it to the end of the list.
For example
insertAt 3 ’-’ "abcde" ⇒ "abc-de"
insertAt 2 100 [1..5] ⇒ [1,2,100,3,4,5]
Hint: Use standard prelude functions ++ and splitAt.
2. [2 marks] Write a function uniq :: Eq a => [a] -> [a] that removes duplicate entries
from a sorted (in ascending order) list. The resulting list should be sorted, and no value
in it can appear elsewhere in the list.
For example:
1
https://www.haskell.org/onlinereport/haskell2010/haskellch9.html
uniq [1,2,2] ⇒ [1,2]
uniq [1,2,3] ⇒ [1,2,3]
3. [1 mark] Write a function
join :: Eq a => [(a,b)] -> [(a,c)] -> [(a,b,c)].
join takes two lists of pairs, and returns a single list of triples. A triple is generated only
when there exists a member of both argument lists that have the same first element. The
list elements are not sorted. This is the same semantics as the relational algebra natural
join operation.
For example:
join [(2,"S"),(1,"J")] [(2,True),(3,False)]
⇒ [(2,"S",True)]
join [(2,"S"),(1,"J")] [(2,1),(2,2),(3,4)]
⇒ [(2,"S",1),(2,"S",2)]
Hint: use list a comprehension.
4. [1 mark] This question extends the join function from question 3. Write the function
ljoin :: Eq a => [(a,b)] -> [(a,c.
This first assignment will focus on coding in Python, applying kno.docxabhi353063
This first assignment will focus on coding in Python, applying knowledge students should already have about programming with functions and arrays. When the assignment is complete, there will in fact be some indirect recursion, but that needs not complicate the assignment, if each function is allowed to assume that all other functions are implemented correctly.
Problem Description
Several years of experience in algebra probably yields a consistent interpretation of the expression
12 - 2 * 5 +3
Most would expect that the multiplication would be the first operation, followed by a subtraction, and then an addition, yielding a value of 5. Performing those three operations in any other order would yield very different results.
When a programmer places such an expression into a program, they would expect it to perform the same series of operations. The interpreter or compiler making sense of the expression then must be able to construct the correct meaning of the input. Often one will hear of this behavior called
parsing
.
Assignment Specifications
The input for this assignment will arrive as an instantiated
Python list
consisting of
tokens
, where each token is either an integer numeral or an operator. An additional symbol (such as a semicolon) will appear at the end of the list to mark the end of the input.
The Python list has a great deal in common with the C++ array, and this assignment will treat it as such. One will be able to use an integer subscript to examine each element of the list, just as one could examine consecutive array elements. The next assignment will use a different approach to visit the elements of the list.
Implementation Hints
One very simple method of parsing input is termed
predictive parsing
in which each function has an idea of what it expects to see next (or what alternatives it will encounter). For example, we would expect a numeric expression like the one above to include a series of values to be added or subtracted. Whether those values are explicit numbers (such as 12 and 3) or the results of other operations (such as 2*5) might sound like a complication, but that can just be addressed by some other function.
The pseudocode for parsing a sum expression would therefore look something like this:
to evaluate a sum expression (series of zero or more additions and subtractions): evaluate a product expression (zero or more multiplications and divisions) while the next token is a + or - operator evaluate the product expression that follows the operator perform the addition or subtraction
For the given example, the first product expression would simply be the value 12. This is followed by a minus sign, so the next product is evaluated to be 10, which is subtracted from 12 to yield 2. Since this is followed by a plus sign, the loop would repeat to evaluate and add the 3. No more operators appear, so the final result is 5.
The above specifications said that some other symbol would appear at the very end of the input. Thi ...
I am Joe L. I am a Programming Assignment Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming from, University of Chicago, USA. I have been helping students with their homework for the past 10 years. I solve assignments related to Programming.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Programming Assignments.
This presentation covers a detailed overview of python advanced concepts. it covers the below aspects.
Comprehensions
Lambda with (map, filter and reduce)
Context managers
Iterator, Generators, Decorators
Python GIL and multiprocessing and multithreading
Python WSGI
Python Unittests
The second programming assignment (HW4) is designed to help you ga.docxoreo10
The second programming assignment (HW4) is designed to help you gain
experience with object oriented programming in Java.
The given file for hw4, "hw4.given.tar.gz", is on the class web page.
To untar and unzip the file, execute
tar -xzvf hw4.given.tar.gz
It will expand to create a directory called hw4, which contains sub-
directories part0, ..., part9, one for each part of the assignment.
Each part has a Makefile. Don't modify them.
Main.java, which is different for each part, is used to test your code
by creating objects, invoking methods, etc.
As you did on the previous assignment, you'll be using the tester tool
for testing.
Proceed similarly to what you did on the previous programming
assignment:
cd part0
# add a bunch of code
make
# if make gives errors, fix them and make again.
../tester
# if tester gives errors, fix them and repeat this cycle.
In Part 7 (only), additional tests (in Main.java and correct output
files) check that the iterators' next() methods give an error if
they're invoked when no elements remain in their collection. (In
subsequent parts, such erroneous behavior results in an exception, so
the testing doesn't use these extra tests.)
Similar to the last assignment, each part builds off the last. When
you're finished with one part,
copy all .java files ***EXCEPT Main.java*** to the next part.
Then modify these copies to start your solution for the next part.
***Exception: again, don't copy Main.java from part to part.***
See the documentation on tester (on the class web page) for details on
its use.
As always, get started early to avoid the last minute rush!
ECS140A-F16-06 October 18, 2016
ASSIGNMENT 4: Java object oriented program
Due: October 27, 2016
Overview
The purpose of this assignment is for you to gain experience with object oriented programming in
Java: in particular, the ideas of inheritance, dynamic binding (virtual methods), overriding and
overloading methods, iterators (aka generators). It will also give you some exposure to how some
programming language features are implemented, i.e., what happens "behind the scenes" when
you execute a program. Although no language provides the exact features in this assignment, a
number of languages (e.g., Awk, Icon, LISP, CLU) do provide similar features. (In fact, you
could define a little language, using techniques from first program, that would contain features
like those in this assignment.)
Your program needs to provide several abstractions. The first abstraction is an Element, of which
there are three kinds: EBoolean, EInteger, and EString. The second abstraction is an EList of Ele-
ment; associated with the EList abstraction is EListIt, which iterates over a list. Details of these
are given below in each part of this assignment.
N.B., you are restricted as to how you write your code. See “Details” before you start coding.
1
ECS140A-F16-06 October 18, 20 ...
Objectives Assignment 09 Applications of Stacks COS.docxdunhamadell
Objectives
Assignment 09: Applications of Stacks
COSC 2336: Data Structures and Algorithms Fall 2020
• More practice with recursion.
• Practice writing some template functions.
• Use stack ADT to implement given algorithms.
• Practice using Stack class container given as a library in a separate file. • Look at some common applications of stacks.
Description
In this assignment, you will be using the Stack abstract data type we developed for this unit and discussed in our lectures, to implement 4 functions that use a stack data type to accomplish their algorithms. The functions range from relatively simple, straight forward use of a stack, to a bit more complex. But in all 4 cases, you should only need to use the abstract stack interface functions push(), pop(), top(), and isEmpty() in order to successfully use our Stack type for this assignment and the function you are asked to write.
NOTE
You are to use the Stack ADT abstraction give to you for this assignment. If you are familiar with STL stack containers, you are not to use them for this assignment. Part of the assignment is to look over and learn the Stack ADT implementation we give you here based on our textbook Stack examples.
Setup
For this assignment you will be given the following files:
File Name
assg09-tests.cpp assg09-stackfun.hpp assg09-stackfun.cpp Stack.hpp
Stack.cpp
Description
Unit tests for the member functions
you are to write.
Header file where function prototypes for the functions you write using stacks should go. Implementaiton file, the implementation of the 4 functions you write for this assignment go here. Header file defining a Stack ADT for use in implementing the functions for this assignment. You will not make any modifications in this file, you are only going to be using the given Stack. Implementation file for the Stack ADT
template class. You also do not make any changes in this file either.
Set up a multi-file project to compile the .cpp source files and run them as shown for the class. The Makefile you were given should be usable to create a build project using the Atom editor as required in this class. You will only be adding code to the assg09-stackfun.[hpp|cpp] file in this assignment. The Stack.[hpp|cpp] file contains a Stack container. You are to use this Stack ADT for the 4 functions you are to write for this assignment.
1
The general approach you should take for this assignment, and all assignment is:
Set up your project with the given starting code. The files should compile and run, but either no tests will be run, or tests will run but be failing.
For this project, start by uncommenting the first TEST_CASE in the assg09-tests.cpp file. These are the unit tests to test the functionality of your doParenthesisMatch() function, the member function you are to implement.
AddthecorrectfunctionprototypeforthedoParenthesisMatch()memberfunctionintheassg09-stackfun.hpp header file. The prototyp.
Due November 22 2021 This assignment is worth 20 of your .pdfabibagschennai
Due: November 22, 2021 This assignment is worth 20% of your final grade. Late penalties - up to
1 week late - 10% - 10% per day there after to a maximum of 50% Assignment Completion In
order to for this assignment to be considered completed you must submit: - a completed analysis
of functions listed for (part A) - a successful run for part C (green check for part C in actions) Note:
Assignment completion is the minimum requirements for your assignment. It does not mean you
will receive full marks. Assignment Objectives: In this assignment, you will: - Complete an analysis
of multiple related functions for a class - Implement hash tables Restrictions As this assignment is
about implementing data structures, you are not allowed to make use of any python libraries or
use builtin python data structures and functions unless otherwise stated. Overview In this
assignment you will look at several implementations of a Table. There are three tasks:1. Analyze
the member functions of the class SortedTable (code for this is provided below). This table is
created using a sorted list. It is not necessarily implemented well. You will analyze the listed
functions. 2. Offer suggestions on how to make the SortedTable more efficient. After analyzing the
functions, look at how it is done and come up with some changes that will make the code more
efficient 3. Implement a Hash table - using chaining for collision resolution - using linear probing
for collision resolution Table functions overview We will explore 3 ways to implement a Table.
Each method will have a different internal structure but the functionality will be the same. A table
stores a set of key-value pairs which are also referred to as records The following specification
describes an overview of the general functionalities of the table but it does not specify any
specifics in terms of implementation. In otherwords, it describes what it can do but doesn't specify
any internal data strctures [ text { def _init_(self, capacity }=32 text { ) : } ] The initializer for the
table defaults the initial table capacity to 32. It creates a list with capacity elements all initialized to
None. def insert(self, key, value): This function adds a new key-value pair into the table. If a record
with matching key already exists in the table, the function does not add the new key-value pair and
returns False. Otherwise, function adds the new key-value pair into the table and returns True. If
adding a record will cause the table to be "too small" (defined in each class), the function will grow
to acommodate the new record. def modify(self, key, value): This function modifies an existing
key-value pair into the table. If no record with matching key exists in the table, the function does
nothing and returns False. Otherwise,function modifies the existing value into the one passed into
the function and returns True. def remove(self, key): This function removes the key-value pair with
the matching key. If no record with matchi.
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxfestockton
Assg 14: C++ Standard Template Library (STL)
(Extra Credit Opportunity)
COSC 2336 Fall 2019
Dates:
Due: Sunday December 08, by Midnight
Objectives
ˆ Practice using an enterprise level set of data structures and algorithms
provided by the STL.
ˆ Connect what we learned about things like stacks, queues, lists, dictio-
naries, etc. to their implementations and applications from the C++
STL.
Description
This assignment is a bit di�erent than the previous assignments in the class,
and is being given as an extra credit opportunity. The assignment is open
ended. I have described 7 tasks or items you can perform, involving the
C++ standard template library. I will give up to 5 points for each of the 7
tasks (for a total of up to 35 points), that will be considered extra credit,
and applied to your programming assignment portion of the course grade to
make up some points on past programs in the class.
This assignment is open ended. I have not given you any starting code or
tests/assertions to use for the assignment. To get credit for the assignment,
you should submit a single �le named "assg14-stl.cpp". The �le should be
compilable and runnable using the C++ IDE/compiler environment you and
I have been using this semester for the class assignments. I would prefer that
you create a separate function for each of the tasks you chose to submit work
for, and that your main function simply calls each of the functions for the
1
task. Your functions should be documented and code formatted using the
usual class style guidelines. You can make up some work for the functions
to do, e.g. to pass them in a parameter and return a value, if you wish.
However, it is also su�cient to simply have void functions that take no
parameters. You should, though, add some output and test assertions of
your own to demonstrate your code working on the tasks using the STL
containers and algorithms. Also if you do more than 1 task demonstrating
a container, make sure you always use a di�erent type to be stored in the
container. For example, don't demonstrate all of your containers on <int>
values, use a variety like <double> <string> <char>, or even better, create
your own small structure or class and demonstrate a container of those user
de�ned types you created.
You should use our textbook for reference on using the STL containers
and algorithms. Another good online reference for the C++ STL is:
cplusplus.com: http://www.cplusplus.com/reference/stl/
You may work on any of the following tasks for this extra credit oppor-
tunity:
1. The STL divides up its containers into 4 categories. The simplest are
the sequence containers, which are intended to store data and access
it in a sequential manner. Vectors are like basic arrays in C, but they
are dynamic and have the ability to resize themselves automatically
when an element is inserted or deleted. Vectors really use C arrays
for their implementation. Insertion can be done in O(1) time to the
end, though if the vecto ...
I am Cecily K. I am a Python Assignment Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming from, University of Chicago, USA. I have been helping students with their homework for the past 10 years. I solve assignments related to Python Programming.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Python Programming Assignments.
I am Justin R. I am a Python Homework Expert at pythonhomeworkhelp.com. I hold a Master's in Python Programming from, Durham University, UK. I have been helping students with their homework for the past 12 years. I solve homework related to Python.
Visit pythonhomeworkhelp.com or email support@pythonhomeworkhelp.com.
You can also call on +1 678 648 4277 for any assistance with Python Homework.
MATLAB stands for Matrix Laboratory. MATLAB was written originally
to provide easy access to matrix software developed by the LINPACK (linear system package) and matlab 2012a manual pdf
Python Exam (Questions with Solutions Done By Live Exam Helper Experts)Live Exam Helper
This is done by Python exam experts. This is the sample Python exam paper. If you have any query or doubt, you can visit Live Exam Helper. Our customer support is available 24x7 to assist you. If you need professional python exam help experts for your exam then you are at the right place. We have professional and experienced experts for all subjects. Our experts will help you ace your exams and get you the highest grades.
✅ Services that give priorities to deadlines
✅ Guarantee of money back
✅ The Clock or 24×7 hour services
✅ Security of good grades
I am Susan C. I am an Instant DBMS Homework Expert at databasehomeworkhelp.com. I hold a Master’s Degree in Programming, from Leeds, UK. I have been helping students with their homework for the past 9 years. I solve homework related to Instant DBMS.
Visit databasehomeworkhelp.com or email info@databasehomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with Instant DBMS Homework.
Java is Object Oriented Programming. Java 8 is the latest version of the Java which is used by many companies for the development in many areas. Mobile, Web, Standalone applications.
Learning ResourcesRequired ReadingsToseland, R. W., & Ri.docxfestockton
Learning Resources
Required Readings
Toseland, R. W., & Rivas, R. F. (2017).
An introduction to group work practice
(8th ed.). Boston, MA: Pearson.
Chapter 11, “Task Groups: Foundation Methods” (pp. 336-363)
Chapter 12, “Task Groups: Specialized Methods” (pp. 364–395)
Van Velsor, P. (2009). Task groups in the school setting: Promoting children’s social and emotional learning.
Journal for Specialists in Group Work
,
34
(3), 276–292.
Document:
Group Wiki Project Guidelines (PDF)
Recommended Resources
Holosko, M. J., Dulmus, C. N., & Sowers, K. M. (2013). Social work practice with individuals and families: Evidence-informed assessments and interventions. Hoboken, NJ: John Wiley & Sons, Inc.
Chapter 1 “Assessment of Children”
Chapter 2 “Intervention with Children”
Discussion: Task Groups
Group work is a commonly used method within school settings. Because peer interaction is important in the emotional and social development of children, the task group can serve as a wonderful therapeutic setting and tool; however, many factors should be considered when implementing this type of intervention.
For this Discussion, read the Van Velsor (2009) article.
By Day 3
Post
your understanding of task groups as an intervention for children. Use the model for effective problem solving to compare and contrast (how to identify the problem, develop goals, collect data). How does this model differ from a traditional treatment group? What are the advantages and possible disadvantages of this model? Describe how you might use this model for adults. What populations would most benefit from this model?
.
LeamosEscribamos Completa el párrafo con las formas correctas de lo.docxfestockton
Leamos/Escribamos Completa el párrafo con las formas correctas de los verbos en paréntesis. Usa el pretérito o el imperfecto.
Yo __1__ (criarse) en el campo, pero mi familia __2__
(mudarse) a la ciudad cuando yo tenía doce años. Hablábamos
aymara en mi pueblo, y mi mamá no __3__ (expresarse) bien en
español. Mis hermanos y yo __4__ (comunicarse) sin problema
porque habíamos estudiado español en el colegio. Con dificultad
nosotros __5__ (acostumbrarse) al estilo de vida.Yo __6__
(preocuparse) por todo. No me __7__ (gustar) el ruido de los
carros. Pero poco a poco, nostros __8__ (asimilar) el modo de
ser de la gente de la cuidad.Yo __9__ (graduarse) de la
universidad hace poco, mi hermano mayor ahora es arquitecto, y
mi hermano menor __10__ (casarse) el mes pasado.
.
More Related Content
Similar to Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Objectives Assignment 09 Applications of Stacks COS.docxdunhamadell
Objectives
Assignment 09: Applications of Stacks
COSC 2336: Data Structures and Algorithms Fall 2020
• More practice with recursion.
• Practice writing some template functions.
• Use stack ADT to implement given algorithms.
• Practice using Stack class container given as a library in a separate file. • Look at some common applications of stacks.
Description
In this assignment, you will be using the Stack abstract data type we developed for this unit and discussed in our lectures, to implement 4 functions that use a stack data type to accomplish their algorithms. The functions range from relatively simple, straight forward use of a stack, to a bit more complex. But in all 4 cases, you should only need to use the abstract stack interface functions push(), pop(), top(), and isEmpty() in order to successfully use our Stack type for this assignment and the function you are asked to write.
NOTE
You are to use the Stack ADT abstraction give to you for this assignment. If you are familiar with STL stack containers, you are not to use them for this assignment. Part of the assignment is to look over and learn the Stack ADT implementation we give you here based on our textbook Stack examples.
Setup
For this assignment you will be given the following files:
File Name
assg09-tests.cpp assg09-stackfun.hpp assg09-stackfun.cpp Stack.hpp
Stack.cpp
Description
Unit tests for the member functions
you are to write.
Header file where function prototypes for the functions you write using stacks should go. Implementaiton file, the implementation of the 4 functions you write for this assignment go here. Header file defining a Stack ADT for use in implementing the functions for this assignment. You will not make any modifications in this file, you are only going to be using the given Stack. Implementation file for the Stack ADT
template class. You also do not make any changes in this file either.
Set up a multi-file project to compile the .cpp source files and run them as shown for the class. The Makefile you were given should be usable to create a build project using the Atom editor as required in this class. You will only be adding code to the assg09-stackfun.[hpp|cpp] file in this assignment. The Stack.[hpp|cpp] file contains a Stack container. You are to use this Stack ADT for the 4 functions you are to write for this assignment.
1
The general approach you should take for this assignment, and all assignment is:
Set up your project with the given starting code. The files should compile and run, but either no tests will be run, or tests will run but be failing.
For this project, start by uncommenting the first TEST_CASE in the assg09-tests.cpp file. These are the unit tests to test the functionality of your doParenthesisMatch() function, the member function you are to implement.
AddthecorrectfunctionprototypeforthedoParenthesisMatch()memberfunctionintheassg09-stackfun.hpp header file. The prototyp.
Due November 22 2021 This assignment is worth 20 of your .pdfabibagschennai
Due: November 22, 2021 This assignment is worth 20% of your final grade. Late penalties - up to
1 week late - 10% - 10% per day there after to a maximum of 50% Assignment Completion In
order to for this assignment to be considered completed you must submit: - a completed analysis
of functions listed for (part A) - a successful run for part C (green check for part C in actions) Note:
Assignment completion is the minimum requirements for your assignment. It does not mean you
will receive full marks. Assignment Objectives: In this assignment, you will: - Complete an analysis
of multiple related functions for a class - Implement hash tables Restrictions As this assignment is
about implementing data structures, you are not allowed to make use of any python libraries or
use builtin python data structures and functions unless otherwise stated. Overview In this
assignment you will look at several implementations of a Table. There are three tasks:1. Analyze
the member functions of the class SortedTable (code for this is provided below). This table is
created using a sorted list. It is not necessarily implemented well. You will analyze the listed
functions. 2. Offer suggestions on how to make the SortedTable more efficient. After analyzing the
functions, look at how it is done and come up with some changes that will make the code more
efficient 3. Implement a Hash table - using chaining for collision resolution - using linear probing
for collision resolution Table functions overview We will explore 3 ways to implement a Table.
Each method will have a different internal structure but the functionality will be the same. A table
stores a set of key-value pairs which are also referred to as records The following specification
describes an overview of the general functionalities of the table but it does not specify any
specifics in terms of implementation. In otherwords, it describes what it can do but doesn't specify
any internal data strctures [ text { def _init_(self, capacity }=32 text { ) : } ] The initializer for the
table defaults the initial table capacity to 32. It creates a list with capacity elements all initialized to
None. def insert(self, key, value): This function adds a new key-value pair into the table. If a record
with matching key already exists in the table, the function does not add the new key-value pair and
returns False. Otherwise, function adds the new key-value pair into the table and returns True. If
adding a record will cause the table to be "too small" (defined in each class), the function will grow
to acommodate the new record. def modify(self, key, value): This function modifies an existing
key-value pair into the table. If no record with matching key exists in the table, the function does
nothing and returns False. Otherwise,function modifies the existing value into the one passed into
the function and returns True. def remove(self, key): This function removes the key-value pair with
the matching key. If no record with matchi.
Assg 14 C++ Standard Template Library (STL)(Extra Credit .docxfestockton
Assg 14: C++ Standard Template Library (STL)
(Extra Credit Opportunity)
COSC 2336 Fall 2019
Dates:
Due: Sunday December 08, by Midnight
Objectives
ˆ Practice using an enterprise level set of data structures and algorithms
provided by the STL.
ˆ Connect what we learned about things like stacks, queues, lists, dictio-
naries, etc. to their implementations and applications from the C++
STL.
Description
This assignment is a bit di�erent than the previous assignments in the class,
and is being given as an extra credit opportunity. The assignment is open
ended. I have described 7 tasks or items you can perform, involving the
C++ standard template library. I will give up to 5 points for each of the 7
tasks (for a total of up to 35 points), that will be considered extra credit,
and applied to your programming assignment portion of the course grade to
make up some points on past programs in the class.
This assignment is open ended. I have not given you any starting code or
tests/assertions to use for the assignment. To get credit for the assignment,
you should submit a single �le named "assg14-stl.cpp". The �le should be
compilable and runnable using the C++ IDE/compiler environment you and
I have been using this semester for the class assignments. I would prefer that
you create a separate function for each of the tasks you chose to submit work
for, and that your main function simply calls each of the functions for the
1
task. Your functions should be documented and code formatted using the
usual class style guidelines. You can make up some work for the functions
to do, e.g. to pass them in a parameter and return a value, if you wish.
However, it is also su�cient to simply have void functions that take no
parameters. You should, though, add some output and test assertions of
your own to demonstrate your code working on the tasks using the STL
containers and algorithms. Also if you do more than 1 task demonstrating
a container, make sure you always use a di�erent type to be stored in the
container. For example, don't demonstrate all of your containers on <int>
values, use a variety like <double> <string> <char>, or even better, create
your own small structure or class and demonstrate a container of those user
de�ned types you created.
You should use our textbook for reference on using the STL containers
and algorithms. Another good online reference for the C++ STL is:
cplusplus.com: http://www.cplusplus.com/reference/stl/
You may work on any of the following tasks for this extra credit oppor-
tunity:
1. The STL divides up its containers into 4 categories. The simplest are
the sequence containers, which are intended to store data and access
it in a sequential manner. Vectors are like basic arrays in C, but they
are dynamic and have the ability to resize themselves automatically
when an element is inserted or deleted. Vectors really use C arrays
for their implementation. Insertion can be done in O(1) time to the
end, though if the vecto ...
I am Cecily K. I am a Python Assignment Expert at programminghomeworkhelp.com. I hold a Ph.D. in Programming from, University of Chicago, USA. I have been helping students with their homework for the past 10 years. I solve assignments related to Python Programming.
Visit programminghomeworkhelp.com or email support@programminghomeworkhelp.com.You can also call on +1 678 648 4277 for any assistance with Python Programming Assignments.
I am Justin R. I am a Python Homework Expert at pythonhomeworkhelp.com. I hold a Master's in Python Programming from, Durham University, UK. I have been helping students with their homework for the past 12 years. I solve homework related to Python.
Visit pythonhomeworkhelp.com or email support@pythonhomeworkhelp.com.
You can also call on +1 678 648 4277 for any assistance with Python Homework.
MATLAB stands for Matrix Laboratory. MATLAB was written originally
to provide easy access to matrix software developed by the LINPACK (linear system package) and matlab 2012a manual pdf
Python Exam (Questions with Solutions Done By Live Exam Helper Experts)Live Exam Helper
This is done by Python exam experts. This is the sample Python exam paper. If you have any query or doubt, you can visit Live Exam Helper. Our customer support is available 24x7 to assist you. If you need professional python exam help experts for your exam then you are at the right place. We have professional and experienced experts for all subjects. Our experts will help you ace your exams and get you the highest grades.
✅ Services that give priorities to deadlines
✅ Guarantee of money back
✅ The Clock or 24×7 hour services
✅ Security of good grades
I am Susan C. I am an Instant DBMS Homework Expert at databasehomeworkhelp.com. I hold a Master’s Degree in Programming, from Leeds, UK. I have been helping students with their homework for the past 9 years. I solve homework related to Instant DBMS.
Visit databasehomeworkhelp.com or email info@databasehomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with Instant DBMS Homework.
Java is Object Oriented Programming. Java 8 is the latest version of the Java which is used by many companies for the development in many areas. Mobile, Web, Standalone applications.
Learning ResourcesRequired ReadingsToseland, R. W., & Ri.docxfestockton
Learning Resources
Required Readings
Toseland, R. W., & Rivas, R. F. (2017).
An introduction to group work practice
(8th ed.). Boston, MA: Pearson.
Chapter 11, “Task Groups: Foundation Methods” (pp. 336-363)
Chapter 12, “Task Groups: Specialized Methods” (pp. 364–395)
Van Velsor, P. (2009). Task groups in the school setting: Promoting children’s social and emotional learning.
Journal for Specialists in Group Work
,
34
(3), 276–292.
Document:
Group Wiki Project Guidelines (PDF)
Recommended Resources
Holosko, M. J., Dulmus, C. N., & Sowers, K. M. (2013). Social work practice with individuals and families: Evidence-informed assessments and interventions. Hoboken, NJ: John Wiley & Sons, Inc.
Chapter 1 “Assessment of Children”
Chapter 2 “Intervention with Children”
Discussion: Task Groups
Group work is a commonly used method within school settings. Because peer interaction is important in the emotional and social development of children, the task group can serve as a wonderful therapeutic setting and tool; however, many factors should be considered when implementing this type of intervention.
For this Discussion, read the Van Velsor (2009) article.
By Day 3
Post
your understanding of task groups as an intervention for children. Use the model for effective problem solving to compare and contrast (how to identify the problem, develop goals, collect data). How does this model differ from a traditional treatment group? What are the advantages and possible disadvantages of this model? Describe how you might use this model for adults. What populations would most benefit from this model?
.
LeamosEscribamos Completa el párrafo con las formas correctas de lo.docxfestockton
Leamos/Escribamos Completa el párrafo con las formas correctas de los verbos en paréntesis. Usa el pretérito o el imperfecto.
Yo __1__ (criarse) en el campo, pero mi familia __2__
(mudarse) a la ciudad cuando yo tenía doce años. Hablábamos
aymara en mi pueblo, y mi mamá no __3__ (expresarse) bien en
español. Mis hermanos y yo __4__ (comunicarse) sin problema
porque habíamos estudiado español en el colegio. Con dificultad
nosotros __5__ (acostumbrarse) al estilo de vida.Yo __6__
(preocuparse) por todo. No me __7__ (gustar) el ruido de los
carros. Pero poco a poco, nostros __8__ (asimilar) el modo de
ser de la gente de la cuidad.Yo __9__ (graduarse) de la
universidad hace poco, mi hermano mayor ahora es arquitecto, y
mi hermano menor __10__ (casarse) el mes pasado.
.
Leadership via vision is necessary for success. Discuss in detail .docxfestockton
Leadership via "vision" is necessary for success. Discuss in detail the qualities that a leader must exhibit in order to be considered visionary and, further, how these qualities may be learned and developed. Provide research and share insight on the determination of a specific leadership theory associated with leadership via vision. Cite your posting in proper APA format and ensure that your posting provides a minimum of 5 paragraphs.
.
Learning about Language by Observing and ListeningThe real.docxfestockton
Learning about Language by Observing and Listening
The real voyage of discovery consists not in seeking
new landscapes, but in having new eyes. Marcel Proust
The UCSD experience encompasses academic as well as social learning. Therefore, we learn not only from our courses, but from the people we meet on campus and the experiences we have with them. Life is a journey of self-discovery. As individuals, we are constantly seeking to determine who we are and where we belong in the world. Throughout this process, language is both a bridge and a barrier to communication and human growth.
The general subject matter for this essay is language or language communities. The source of your information will be what you observe and hear by listening to others. The goal is to do a project based on what our own minds can comprehend from diligent observation, note-taking, and reasoning. You should arrive at a reasoned (not emotional) conclusion. The conclusion/result of your experiment is your thesis and should be presented in the opening paragraph in one sentence. Secondary material should not be brought into this essay. Thus, this is not an essay that needs to be the result of academic texts or online sources. The research is what you see and how you interpret what you see and hear. It will be up to you to determine what particular focus your essay will take and wahat meaning you wish to convey to your reader. Do the exploratory writing activities on pages 73-76. These activities will guide you through an analysis of some of the reflections you completed in the first part of your book. Once you determine your focus, you will use the information you have already gathered and additional information you will research to clarify your ideas and provide evidence for the points you wish to make.
If you prefer a more direct prompt, the suggested topics listed below might be helpful to you. Choose one of the following topics to establish a focus and direction.
1) From your observations and conversations, what assumptions and stereotypes do we make about people based on language and behavior? What did you learn from the experiment?
2) You may examine body language as well as verbal language. Explore nonverbal communication in a group. What conclusions can you come to regarding the group based on nonverbal behavior?
3) Did you observe language differences between men and women here at UCSD Notice the ways in which men and women treat one another. Observe the language you hear on campus.
How do women greet one another? How do men greet each other? Do not just note the similarities or differences. Explain and interpret the information.
4) Observe and identify a code language on campus, on your job, or in your personal arena. How is language used? Is it effective? Analyze.
5) Have you become keenly aware of code switching? Who utilizes this language? In your observations and conversations, did you find code switching to be an acceptable form of lang.
Learning Accomplishment Profile-Diagnostic Spanish Language Edit.docxfestockton
Learning Accomplishment Profile-Diagnostic Spanish Language Edition
The Ages and Stages Questionnaires-Social Emotional (ASQ-SE)
Learning Accomplishment Profile-3 (LAP-3)
Mullen Scales of Early Learning
Purpose of the screening-what can an early childhood professional do with the results? What should happen next?
.
Learning about Language by Observing and ListeningThe real voy.docxfestockton
Learning about Language by Observing and Listening
The real voyage of discovery consists not in seeking
new landscapes, but in having new eyes. Marcel Proust
The UCSD experience encompasses academic as well as social learning. Therefore, we learn not only from our courses, but from the people we meet on campus and the experiences we have with them. Life is a journey of self-discovery. As individuals, we are constantly seeking to determine who we are and where we belong in the world. Throughout this process, language is both a bridge and a barrier to communication and human growth.
The general subject matter for this essay is language or language communities. The source of your information will be what you observe and hear by listening to others. The goal is to do a project based on what our own minds can comprehend from diligent observation, note-taking, and reasoning. You should arrive at a reasoned (not emotional) conclusion. The conclusion/result of your experiment is your thesis and should be presented in the opening paragraph in one sentence. Secondary material should not be brought into this essay. Thus, this is not an essay that needs to be the result of academic texts or online sources. The research is what you see and how you interpret what you see and hear. It will be up to you to determine what particular focus your essay will take and wahat meaning you wish to convey to your reader. Do the exploratory writing activities on pages 73-76. These activities will guide you through an analysis of some of the reflections you completed in the first part of your book. Once you determine your focus, you will use the information you have already gathered and additional information you will research to clarify your ideas and provide evidence for the points you wish to make.
If you prefer a more direct prompt, the suggested topics listed below might be helpful to you. Choose one of the following topics to establish a focus and direction.
1) From your observations and conversations, what assumptions and stereotypes do we make about people based on language and behavior? What did you learn from the experiment?
2) You may examine body language as well as verbal language. Explore nonverbal communication in a group. What conclusions can you come to regarding the group based on nonverbal behavior?
3) Did you observe language differences between men and women here at UCSD Notice the ways in which men and women treat one another. Observe the language you hear on campus.
How do women greet one another? How do men greet each other? Do not just note the similarities or differences. Explain and interpret the information.
4) Observe and identify a code language on campus, on your job, or in your personal arena. How is language used? Is it effective? Analyze.
5) Have you become keenly aware of code switching? Who utilizes this language? In your observations and conversations, did you find code switching to be an accepta.
LEARNING OUTCOMES1. Have knowledge and understanding of the pri.docxfestockton
LEARNING OUTCOMES:
1. Have knowledge and understanding of the principles of Constitutional and Administrative Law, and of the way in which these principles have developed.
2. Deal with issues relating to Constitutional and Administrative Law both systematically and creatively, recognising potential alternative conclusions for particular situations and providing supporting reasons for such conclusions.
3. Demonstrate self-direction and originality in tackling and solving problems relating to Constitutional and Administrative Law.
4. Research primary and secondary sources of Constitutional and Administrative Law.
5. Communicate thoughts and ideas in writing and/or orally, using the English language and legal terminology with care, clarity and accuracy.
6. Manage time effectively.
QUESTION:
A recently elected Government, concerned about rising gun crime by drug dealers, has introduced a Bill into Parliament to bring back the death penalty for any person convicted of causing death by the use of a firearm and which is also related to an illegal drug trade.
Human Rights UK (HRUK), part of a worldwide protest organisation called ‘Global Human Rights’ is opposed to the death penalty in any circumstances. HRUK has many thousands of members across the UK. The organisation is split into county groups and there is a thriving branch of over 1200 members in Penfield.
Sam Jones, the leader of the Penfield branch, has proposed a local demonstration against the Bill to take place on the 1
st
May 2014. The demonstration includes a march from the Town Hall in Penfield City Centre to the local War Memorial followed by speeches from senior members of the organisation.
The Chief Constable of Penfield Police, having been informed of the proposed protest is concerned about rumours that a small counter protest has been organised to disrupt the protest by a far right group opposed to human rights. He has issued a Notice to HRUK and Sam Jones under the Public Order Act 1986 which imposes the following conditions on the HRUK demonstration planned for 1
st
May 2014:-
Notice from the Chief Constable of Penfield Police:
1) any demonstration to be held by the HRUK between 1st March 2014 and 1
st
October 2014 should be held in Penfield Country Park, at least 25 miles from Penfield City Centre;
2) the maximum number of demonstrators shall be 25;
3) the maximum duration of the demonstration shall be 2 hours;
4) there should be no public speeches and;
5) that in the event of any counter demonstration or hostility shown towards HRUK members, the Penfield Police reserve the right to cancel the demonstration immediately
Advise, giving reasons, whether Sam Jones and/or HRUK can use the Human Rights Act 1998 to challenge the decision of the Chief Constable.
.
Leadership Style What do people do when they are leadingAssignme.docxfestockton
Leadership Style: What do people do when they are leading?
Assignment: Leadership Style: What Do People Do When They Are Leading?
Due Week 9 and worth 100 points
Choose one (1) of the following CEOs for this assignment: Ursula Burns (Xerox). Use the Internet to investigate the leadership style and effectiveness of the selected CEO.
Write a five to six (5-6) page paper in which you:
Provide a brief (one [1] paragraph) background of the CEO.
Analyze the CEO’s leadership style and philosophy, and how the CEO’s leadership style aligns with the culture.
Examine the CEO’s personal and organizational values.
Evaluate how the values of the CEO are likely to influence ethical behavior within the organization.
Determine the CEO’s three (3) greatest strengths and three (3) greatest weaknesses.
Select the quality that you believe contributes most to this leader’s success. Support your reasoning.
Assess how communication and collaboration, and power and politics influence group (i.e., the organization’s) dynamics.
Use at least five (5) quality academic resources in this assignment. Note: Wikipedia and other Websites do not qualify as academic resources.
Your assignment must follow these formatting requirements:
Be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides; citations and references must follow APA or school-specific format. Check with your professor for any additional instructions.
Include a cover page containing the title of the assignment, the student’s name, the professor’s name, the course title, and the date. The cover page and the reference page are not included in the required assignment page length.
The specific course learning outcomes associated with this assignment are:
Analyze the formation and dynamics of group behavior and work teams, including the application of power in groups.
Outline various individual and group decision-making processes and key factors affecting these processes.
Examine the primary conflict levels within organization and the process for negotiating resolutions.
Examine how power and influence empower and affect office politics, political interpretations, and political behavior.
Use technology and information resources to research issues in organizational behavior.
Write clearly and concisely about organizational behavior using proper writing me
.
Leadership Throughout HistoryHistory is filled with tales of leade.docxfestockton
Leadership Throughout History
History is filled with tales of leaders who were brave, selfless, and achieved glorious accomplishments. Your text discusses how leadership theory has been categorized throughout time, from the culture of ancient Egypt thousands of years ago, to the “toolbox” style of today.
The first category, known as the “Great Man” phase, focused on the traits that make an effective leader. This period ranges from circa 450 B.C. to the 1940s, and includes classic examples such as the aforementioned Egyptian period and the expansive influence of the Roman Empire.
The second category, known as the Behavior phase, spanned the 1940s to the 1960s, and focused on determining the types of behavior that leaders utilized to influence and affect others.
The final category is the Situational phase. This line of research began in the 1970s and is still present today. It suggests that leaders have a broad understanding of the various types of leadership styles, and can choose the appropriate one to handle a given situation.
I
n this Journal, discuss each phase, do research and provide examples of influential leaders from each phase, and explain how and why they were so influential.
Your Journal entry should be at least 500 words, and cite appropriate references in APA format.
.
Lean Inventory Management1. Why do you think lean inventory manage.docxfestockton
Lean Inventory Management
1. Why do you think lean inventory management can decrease transportation, capital expenses, and inventory storage?
2. List some products in your personal or family "inventory." How do you manage them? (For instance, do you constantly run to the store for milk? Do you throw out a lot of milk because of spoilage?) How can lean inventory change your way of managing these SKUs?
3. Identify a goods-producing or service-providing organization and discuss how it might make aggregate planning decisions.
4. Provide an argument for or against adopting a chase strategy for a major airline call center.
.
Leadership varies widely by culture and personality. An internationa.docxfestockton
Leadership varies widely by culture and personality. An international organization with locations in several countries must balance the local customs and cultures with those of the primary culture of the organizations’ headquarters. Using the Germany as the headquarters of an international Internet retail organization serving the USA and Canada research and discuss the differences that leaders would have to navigate in approach and adapting to different standards of behavior and culture within the countries.
.
Leadership is the ability to influence people toward the attainment .docxfestockton
Leadership is the ability to influence people toward the attainment of goals. The changing of the environment in which most organizations are operating has significantly influenced leadership systems in recent years, and has contributed to a shift in how we think about and practice leadership.
Analyze how leadership is changing in today’s organizations, including Level 5 leadership, servant leadership, and transformational leadership. Please discuss in 200-250 words.
.
Lawday. Court of Brightwaltham holden on Monday next after Ascension.docxfestockton
Lawday. Court of Brightwaltham holden on Monday next after Ascension Day in the twenty-first year of King Edward (A.D. 1293).
The tithingman of Conholt with his whole tithing present that all is well save that William of Mescombe has stopped up a . . . [the word is indecipherable in the manuscript, but Maitland thinks it is a watercourse] wrongfully. Therefore he is in mercy (12 d.). Also they say that Edith of Upton has cut down trees in the enclosure and the seisin of the lord contrary to a prohibition, and they say that she has no property and has fled into foreign parts, (amercement, 12 d.).
Adam Scot is made tithingman and sworn to a faithful exercise of his office.
John son of Hugh Poleyn enters on the land which Randolph Tailor held saving the right of everyone and gives for entry-money 4 marks and will pay 1 mark at Michaelmas in the twenty-second year of King Edward, 1 mark at Christmas next following, 1 mark at Easter, and 1 mark at Michaelmas next following, and for the due making of all these payments the said Hugh Poleyn finds sureties, to wit, Adam Scot, John Gosselyn, William of Mescombe, John Gyote. And because the said John is a minor the wardship of the said lands and tenements is delivered to his father the said Hugh Poleyn until he be of full age, on the terms of his performing the services due and accustomed for the same. Also there is granted to the said Hugh the crop now growing on the sown land, and the heriot due on this entry, for a half-mark payable at Michaelmas next on the security of the above-named sureties.
(a) Hugh Poleyn gives the lord 2 s. that he may have the judgment of the court as to his right in a certain tenement in Upton which J. son of Randolph Tailor claims as his right. And upon this the whole township of Brightwaltham sworn along with the whole township of Conholt say upon their oath that Hugh Poleyn has better right to hold the said tenement than anyone else has, and that he is the next heir by right of blood.
(The Conholt case as to the tenure of Edith wife of Robert Tailor according to the inquest made by the jurors. One Alan Poleyn held a tenement in Conholt upon servile terms and had a wife Cristina by name. The said Alan died when Richard was the farmer [of the manor]. Thereupon came the friends of the said Cristina and procured for her a part of the land by way of dower making a false suggestion and as though [the land] were of free condition, and this was to the great prejudice of the lord Abbot. Upon this came one Richard Aleyn and espoused the said Cristina and begot upon her one Randolph. Then Richard died, and the said Cristina of her own motion enfeoffed Randolph her son of the said tenement. Then Cristina died, and Randolph being in seisin of the said tenement espoused Edith the present demanding; and after Randolph's death Edith married Robert Tailor. Now you can see and give your counsel about the right of the said Edith. And know this, that if I had at hand the court-rolls of the.
Leaders face many hurdles when leading in multiple countries. There .docxfestockton
Leaders face many hurdles when leading in multiple countries. There are several examples of disastrous public relations fallout that have occurred when companies have outsourced work to other nations. When determining where to move offshore as a company, the leaders of the organization must make several decisions.
Using course theories and current multinational organizations that have locations in several countries, convey your own thoughts on the subject and address the following:
What leadership considerations must an organization weigh in selecting another country to open a location such as a manufacturing plant?
How might leaders need to change leadership styles to manage multinational locations?
What public relations issues might arise from such a decision?
How would you recommend such a company to demonstrate their social responsibility to their headquarters country as well as any offshore locations?
.
Last year Angelina Jolie had a double mastectomy because of re.docxfestockton
Last year Angelina Jolie had a double mastectomy because of results from a genetic test. Describe the science of the test and the reason for her decision. Do you agree with her choice, and do you agree with her decision to go public about her choice?
1 page essay with at least 1 reference
.
Leaders face many hurdles when leading in multiple countries. Ther.docxfestockton
Leaders face many hurdles when leading in multiple countries. There are several examples of disastrous public relations fallout that have occurred when companies have outsourced work to other nations. When determining where to move offshore as a company, the leaders of the organization must make several decisions.
Using course theories and current multinational organizations that have locations in several countries, convey your own thoughts on the subject and address the following:
What leadership considerations must an organization weigh in selecting another country to open a location such as a manufacturing plant?
How might leaders need to change leadership styles to manage multinational locations?
What public relations issues might arise from such a decision?
How would you recommend such a company to demonstrate their social responsibility to their headquarters country as well as any offshore locations?
Please submit your assignment.
This assignment will be assessed using the rubric provided
here
.
For assistance with your assignment, please use your text, Web resources, and all course materials.
.
Leaders today must be able to create a compelling vision for the org.docxfestockton
Leaders today must be able to create a compelling vision for the organization. They also must be able to create an aligned strategy and then execute it. Visions have two parts, the envisioned future and the core values that support that vision of the future. The ability to create a compelling vision is the primary distinction between leadership and management. Leaders need to create a vision that will frame the decisions and behavior of the organization and keep it focused on the future while also delivering on the short-term goals.
Respond to the following:
Assess your current leaders. These leaders could be those at your current or previous organizations or your educational institutions.
How effective are they at creating and communicating the organization vision?
How effective are they at developing a strategy and communicating it throughout the organization?
How effective are they at upholding the values of the organization?
Support your positions with specific examples or by citing credible sources.
.
Law enforcement professionals and investigators use digital fore.docxfestockton
Law enforcement professionals and investigators use digital forensic methods to solve crimes every day. Locate one current news article that explains how investigators may have used these techniques to solve a crime. Explain the crime that was solved, and the methods used to determine how the crime was committed. Some examples of crimes solved may include locating missing children, finding criminals who have fled the scene of a crime, or unsolved crimes from the past that have been solved due to the use of new techniques (such as DNA testing).
Your written assignment should be 3-4 paragraphs in your own words and should include a reference citation for your source of information.
.
LAW and Economics 4 questionsLaw And EconomicsTextsCoote.docxfestockton
LAW and Economics 4 questions
Law And Economics
Texts
Cooter, Robert and Thomas Ulen. 2011. Law and Economics. Sixth Edition. Boston: Pearson Addison Wesley
(Chapter 1-4)
Polinksky, A. Mitchell. 2011. An Introduction to Law and Economics. Fourth Edition. New York: Aspen Publishers.
(Chapters 1-2)
Posner, Richard A. 2007. Economic Analysis of Law. Seventh Edition. Boston: Little, Brown and Company.
(Chapter 1)
2.) Discuss the adverse impacts of monopoly upon market outcomes. Discuss the impact of government’s monopoly power over coercion.
6.) Suppose the local government determines that the price of food is too high and imposes a ceiling on the market price of food that is below the equilibrium price in that locality. Predict some of the consequences of the ceiling.
10.) Consider the right to smoke or to be free from smoke in the following situations:
1. smoking in a public area.
2. smoking in hotel rooms.
3. smoking in a private residence.
4. smoking on commercial airline flights.
In which situations do you think the transaction costs are so high that they
preclude private bargaining. In what cases are they low enough to allow private
bargains to occur? Explain your answer
14.)From an economic point of view, why is stare decisis an important rule of
decision making for the courts?
.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Chapter 3 - Islamic Banking Products and Services.pptx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
1. Assg 07: Templates and Operator Overloading
COSC 2336 Spring 2019
Dates:
Due: Thursday March 07, by Midnight (note the di�erent due
date)
Objectives
� Practice creating a more realistic abstract data type ADT
� Using operator overloading to do output, insertion and access
into a
list.
� Use templates so our ADT can hold objects of any type
Description
In this assignment you will be practicing operator overloading. I
will also,
for extra credit, give an additional task to convert your class
into a class
template, so that it will work as a container for any type.
In this assignment you will be expanding on / creating a new
version of
the ListType data type we have seen examples of before in
class. Your task is
to create a ListType that holds a list of integers. You will be
2. asked to create
several member functions, and then to create several overloaded
operators
for your list of integers. Your basic task is to user operator
overloading to
support appending and prepending to a list, outputting the list
as a string
and to an output stream, accessing the list (using the indexing
operator[]),
and concatenating lists together (using operator+).
I have given you a starting template for your ListType that
already
contains 3 versions of the class constructor. I have also already
provided you
the operator= implementation, to provide the copy operator for
your class.
You should �rst get your class to work as a simple ListType
that holds a
list of integers. If you get your class working for integers and
submit it, you
1
can then turn your class into a template class, so that your list
can work on
objects of any type. I will give up to 10 bonus points for
implementations of
working class templates, if you �rst mostly have your basic
ListType working
for simple integers. As usual I have also given a �le with a
main function
and a lot of commented out tests. You should implement the
class member
3. functions in the order speci�ed next, commenting out each test
one at a time,
to incrementally develop and test your ListType class
implementation.
For this assignment you need to perform the following tasks.
1. As mentioned in the starting template I have given you a
starting class
de�nition, some class constructors and the destructor, and the
copy
operator=. You �rst need to write two simple getter methods in
order
to access the size and allocSize class member values. These
should be
called getSize() and getAllocSize() respectively. These
functions
should be class const functions (you guarantee that calling them
will
not cause the class to be modi�ed. These functions take no
parameters
as input. They both return an int value, because the size and
allocSize
member parameters are both integer values.
2. Write a function called tostring(). This function will be a
const class
function (the class is not modi�ed when it is called). This
function
takes no parameters as input, and it returns a string. We use this
function in our testing, so you need to get it correct, but you
have
implemented versions of this type of function in previous
assignments.
The function should only create a string of the items currently
in the
4. list. So it will return a string like "[3, 5, 4, 2]" if those are the 4
items
currently in the list. See the test code for speci�cs.
3. Overload the operator<<() to provide the ability for the
ListType
class to be output to a stream. This will be a friend function,
and again
it will be pretty similar to several examples we have seen of
overloading
the output stream operator. You should use the tostring()
method
in this function, but it outputs additional information, such as
the id,
size and allocSize of the list to the output stream.
4. Create a function named appendItem(). This function takes an
int
value as its only parameter, and it does not return a value. The
indi-
cated integer value should be appended to the end of your list
when
this function is called. You need to correctly handle causing the
size of
your memory allocation to grow if needed in this function, if
your list
is currently using all of the allocated memory. Once this is
working,
2
overload the operator&() operator. We will de�ne the &
operator to
mean list appending. For example, if you do list & 5 it will
5. cause 5
to be appended to the end of the list (assuming list is a variable
of List-
Type). This function will simply call appendItem() to do the
work,
the only di�culty is getting the syntax correct to declare you
are over-
loading the operator. This is not a friend function, like
operator<<().
Read our textbook about binary operators to see examples of
how to
overload a binary operator like this as a member function of a
class.
5. Create a function name prependItem(). This works the same
as the
append, but it prepends the indicated integer parameter to the
front
of the list instead of to the end. However, you still need to
check and
grow your allocated memory before prepending if your list is
currently
full. Also prepend is a bit more complicated, because since we
are
implementing an array based list, you need to shift all of the
current
items 1 index up in your items before you can prepend to the
beginning
of the list. We will also overload the operator|() for our class to
represent prepending an item. Thus if you do list | 5 this will
cause
5 to be prepended to the beginning of the list.
6. Overload the operator+() to implement concatenation of two
lists.
This operator is probably the trickiest I have given you to
6. implement.
This operator should take a const reference to another ListType
as
its parameter for input. This is the list on the right hand side of
the + operation. This function should return a reference to a
new
ListType as its result. It is important that both the input
parameter
and the return type be both reference parameters for this
function.
This function should be a const function, as it does not cause
the
original list to change. Instead you should dynamically allocate
a new
ListType in this function, �ll it with the items from the two
lists being
concatenated, and then return it as the result from this
overloaded
function. You should read our textbook example of overloading
the
operator+() and try and follow that pattern for implementing
this
function.
7. Overload the operator[] indexing operator. This is NOT a
const
member function, your list can change as a result of calling this
func-
tion. This function takes an int value as its input parameter.
This
function should return an int& reference. Again it is very
important
that this overloaded operator return a reference. If this operator
cor-
rectly returns an int&, it can actually be used as a setter to
set/change
7. 3
the values in the list. This operator works to index your
ListType like
an array. You should perform bounds checking in this function.
If the
given input index is not valid (it is bigger than the end of your
list, or
it is < 0), you should display an error message and simply exit.
If you get all of these 7 steps and member functions mostly
working, you
should save/submit your work at that point. However, I am also
o�ering
the opportunity to earn 10 bonus points on this assignment,
which may be
helpful for many of you to make up for some previous program
grades. As
demonstrated in our video for this week, it is usually better if
you want
to create a class template to start from a non-template working
version of
the class. As I showed in the video this week, I usually
templatize each
member function 1 at a time, starting with the class de�nition
and the class
constructors. I will give up to 10 bonus points for a partial or
complete
templatized ListType that supports appending, prepending,
indexing, and
output to streams using the overloaded operators, but for any
type, not just
the int type.
8. You will again be given 3 starting template �les as usual, an
assg-07.cpp
�le of tests of your code, and a ListType.hpp and ListType.cpp
header and
implementation �le. As before, you should practice incremental
develop-
ment, and uncomment the tests in the assg-07.cpp �le one at a
time, and
implement the functions in the order speci�ed. If you
implement your code
correctly and uncomment all of the tests, you should get the
following correct
output:
--------- Test constructors and getters -------------------------
l1 size: 0 allocSize: 0
l2 size: 0 allocSize: 7
l3 size: 5 allocSize: 5
--------- Test output stream operator ---------------------------
l2 items: []
ListType <id=2>
size = 0
allocSize = 7
items : []
l3 items: [3, 9, 2, 7, 5]
9. 4
ListType <id=3>
size = 5
allocSize = 5
items : [3, 9, 2, 7, 5]
--------- Test append and operator& -----------------------------
<ListType::growListIfNeeded()> LOG: grow list current alloc 0
new alloc 10
append to empty l1:
ListType <id=1>
size = 1
allocSize = 10
items : [1]
<ListType::growListIfNeeded()> LOG: grow list current alloc 5
new alloc 15
append to nonempty l3:
ListType <id=3>
size = 6
14. l2[3] == 5
l2[4] == 7
l2[5] == 8
l2[6] == 11
l2[7] == 9
ListType setter using operator[] l2[0] == 8
ListType setter using operator[] l2[4] == -7
ListType setter using operator[] l2[7] == 42
--------- main exiting scope, destructors should be invoked -----
ListType: <id=9> out of scope, size: 5 allocSize: 5
ListType: <id=8> out of scope, size: 8 allocSize: 8
ListType: <id=7> out of scope, size: 0 allocSize: 0
7
ListType: <id=6> out of scope, size: 24 allocSize: 24
ListType: <id=4> out of scope, size: 19 allocSize: 19
ListType: <id=3> out of scope, size: 11 allocSize: 15
ListType: <id=2> out of scope, size: 8 allocSize: 17
15. ListType: <id=1> out of scope, size: 5 allocSize: 10
If you templatize your ListType class, submit this in the second
submis-
sion folder. You should add tests to try out your list with things
other than
ints, like double and string lists.
Assignment Submission
A MyLeoOnline submission folder has been created for this
assignment. You
should attach and upload your completed .cpp source �les to
the submission
folder to complete this assignment. You really do not need to
give me the
assg-07.cpp �le again, as I will have my own �le with
additional tests of
your functions. However, please leave the names of the other
two �les as
QuickSort.hpp and QuickSort.cpp when you submit them.
Requirements and Grading Rubrics
Program Execution, Output and Functional Requirements
1. Your program must compile, run and produce some sort of
output to
be graded. 0 if not satis�ed.
2. (5 pts.) The getter methods getSize() and getAllocSize() are
im-
plemented and working.
3. (10 pts.) tostring() works and only creates a string with the
16. items
of the list and returns it. opeator<<() works, displays the
additional
information on the output stream, and uses tostring() in its
imple-
mentation.
4. (15 pts.) Got list appending working correctly. The
appendItem()
member function is implemented correctly, and the operator&()
is
overloaded as a member function, and it uses appendItem() to
do the
actual work of appending. Memory is grown if needed by this
function.
5. (15 pts.) Go list prepending working correctly. The
prependItem()
member function is implemented correctly, and the operator|()
is
8
overloaded as a member function, and it uses prependItem() to
do
the actual work of prepending. Items are shifted up which is
necessary
in the array implemented for prepending. Memory is correctly
grown
if needed by this function.
6. (25 pts) operator+() is correctly overloaded. The operator
correctly
supports concatentation of two lists. The operator is de�ned as
17. a class
const method. The operator correctly dynamically allocates a
new
list and puts the items of the two lists into it, and returns this
newly
allocated object as its result. A reference to the other list is
given as
input, and this function returns a refereunce to a list as the
result.
7. (20 pts) operator[] is correctly overloaded. The operator
returns an
int reference as its result. The operator correctly checks for
bounds
access errors, for indexes to big or less than 0. The operator
correctly
works as a setter method, so that values can be
modi�ed/assigned in
the list.
8. (5 pts.) All output is correct and matches the correct example
output.
9. (5 pts.) Followed class style guidelines, especially those
mentioned
below.
10. (10 bonus pts.) You may templatize your class and submit it
(complete
or partial) for up to 10 bonus points. Your templatized class
must
support all of the overloaded operations (append, prepend,
indexing,
output stream), and work with any class, like string, double, etc.
Program Style
18. Your programs must conform to the style and formatting
guidelines given
for this class. The following is a list of the guidelines that are
required for
the assignment to be submitted this week.
1. Most importantly, make sure you �gure out how to set your
indentation
settings correctly. All programs must use 2 spaces for all
indentation
levels, and all indentation levels must be correctly indented.
Also all
tabs must be removed from �les, and only 2 spaces used for
indentation.
2. A function header must be present for member functions you
de�ne.
You must give a short description of the function, and document
all of
the input parameters to the function, as well as the return value
and
9
data type of the function if it returns a value for the member
functions,
just like for regular functions. However, setter and getter
methods do
not require function headers.
3. You should have a document header for your class. The class
header
document should give a description of the class. Also you
19. should doc-
ument all private member variables that the class manages in
the class
document header.
4. Do not include any statements (such as system("pause") or
inputting
a key from the user to continue) that are meant to keep the
terminal
from going away. Do not include any code that is speci�c to a
single
operating system, such as the system("pause") which is
Microsoft
Windows speci�c.
10
/**
* @author Jane Programmer
* @cwid 123 45 678
* @class COSC 2336, Spring 2019
* @ide Visual Studio Community 2017
* @date February 15, 2019
* @assg Assignment 07 Templates and Operator Overloading
*
* @description Assignment 07 part 01, practice with operator
overloading.
* In this first part of assignment, you need to define a
ListType class
* and overload the indicated operators. This version of your
class
* will only support list of int values. You will turn this into a
* class template in part 2 of the assignment.
*/
#include <iostream>
20. #include <string>
#include <cassert>
#include "ListType.hpp"
using namespace std;
/** main
* The main entry point for this program. Execution of this
program
* will begin with this main function.
*
* @param argc The command line argument count which is the
number of
* command line arguments provided by user when they
started
* the program.
* @param argv The command line arguments, an array of
character
* arrays.
*
* @returns An int value indicating program exit status.
Usually 0
* is returned to indicate normal exit and a non-zero value
* is returned to indicate an error condition.
*/
int main(int argc, char** argv)
{
//-----------------------------------------------------------------------
-
// test constructors and getters
cout << "--------- Test constructors and getters ------------------
-------" << endl;
ListType l1;
//cout << "l1 size: " << l1.getSize()
// << " allocSize: " << l1.getAllocSize() << endl;
26. //cout << endl;
//l2[0] = 8;
//cout << "ListType setter using operator[] l2[0] == " << l2[0]
<< endl;
//assert(l2[0] == 8);
//l2[4] = -7;
//cout << "ListType setter using operator[] l2[4] == " << l2[4]
<< endl;
//assert(l2[4] == -7);
//l2[7] = 42;
//cout << "ListType setter using operator[] l2[7] == " << l2[7]
<< endl;
//assert(l2[7] == 42);
// test bounds checking on operator[]
// you should uncomment these to test, but you shouldn't leave
them uncommented
// should cause exit and error message
//cout << l2[-5];
// should cause exit and error message
//cout << l2[8];
cout << endl << endl;
//-----------------------------------------------------------------------
-
// test out of scope, destructors should be called
cout << "--------- main exiting scope, destructors should be
invoked -----" << endl;
27. // return 0 to indicate successful completion
return 0;
}
/**
* @author Jane Programmer
* @cwid 123 45 678
* @class COSC 2336, Spring 2019
* @ide Visual Studio Community 2017
* @date February 15, 2019
* @assg Assignment 07 Operator Overloading
*
* @description Assignment 07 part 01, practice with operator
overloading.
* In this first part of assignment, you need to define a
ListType class
* and overload the indicated operators. This version of your
class
* will only support list of int values. You will turn this into a
* class template in part 2 of the assignment.
*/
#include "ListType.hpp"
// static member variables have to be initialized like this
int ListType::nextListId = 1;
/** default constructor
* Initialize as an empty list. Initially we have no memory
* allocated, and the size (and allocation size) are 0.
*/
ListType::ListType()
{
id = nextListId++;
28. size = allocSize = 0;
item = NULL;
}
/** constructor (empty)
* Initialize as an empty list with indicated iniaial
* size of memory allocated.
*
* @param allocSize The initialze size for the empty list.
*/
ListType::ListType(int allocSize)
{
id = nextListId++;
size = 0;
this->allocSize = allocSize;
item = new int[this->allocSize];
}
/** constructor (array)
* Initialize a list using an array of items for the initial values
* in the list.
*
* @param size The number of items in the array given for
initialization.
* @param items An array (pointer to base address) of items to
initialize
* this list with.
*/
ListType::ListType(int size, int* initItem)
{
id = nextListId++;
this->size = size;
this->allocSize = size;
item = new int[this->size];
29. // copy the items into this list
for (int index = 0; index < this->size; index++)
{
item[index] = initItem[index];
}
}
/** destructor
* The class destructor. Be good stewards of memory and make
* sure that we free up memory allocated to hold our list items
* by this object when it goes out of scope. We display some
* information for debugging/tracking ListType destruction.
*/
ListType::~ListType()
{
cout << "ListType: <id=" << id << "> out of scope, size: "
<< size
<< " allocSize: " << allocSize << endl;
// be a good memory manager, free up memory we have
allocated
if (item != NULL)
{
delete [] item;
}
}
/** overload operator=
* Overload the operator= assignment operator. Whenever one
list
* variable is assigned to another this operator is invoked.
*
* @param rhs The list on the right hand side of the assignment,
30. the
* contents of which is to be (deep) copied to this list contents.
*
* @returns ListType Returns a reference to this list, after
contents
* have been copied/assigned.
*/
const ListType& ListType::operator=(const ListType& rhs)
{
// only assign if not doing a self-assignment
if (this != &rhs)
{
// copy the values from rightList into this list
int newAllocSize = rhs.size;
// if not enough space, grow our list
if (this->allocSize < newAllocSize)
{
int* newItem = new int[newAllocSize];
delete [] item;
item = newItem;
this->allocSize = newAllocSize;
}
// copy the items from righ hand side into this list
for (int index = 0; index < rhs.size; index++)
{
this->item[index] = rhs.item[index];
}
this->size = rhs.size;
}
// return the object assigned
return *this;
}
31. /**
* @author Jane Programmer
* @cwid 123 45 678
* @class COSC 2336, Spring 2019
* @ide Visual Studio Community 2017
* @date February 15, 2019
* @assg Assignment 07 Operator Overloading
*
* @description Assignment 07 part 01, practice with operator
overloading.
* In this first part of assignment, you need to define a
ListType class
* and overload the indicated operators. This version of your
class
* will only support list of int values. You will turn this into a
* class template in part 2 of the assignment.
*/
#include <iostream>
#include <sstream>
using namespace std;
#ifndef _LISTTYPE_H_
#define _LISTTYPE_H_
/** ListType abstract data type
* This list type is "templatized" to support creating concrete
lists of
* any type of object. This list supports dynamic shrinking and
growing
* of its size as items are appended and removed from the list.
* In addition, several operators are overloaded for convenience
of
* inserting, accessing and outputting the list to a stream.
32. *
* @value id A unique id, each list is assigned its own unique id
* upon creation.
* @value size The current size (an int) or number of items
currently
* contained in the list.
* @value allocSize The actual amount of memory we currently
* have allocated.
* @value item A (pointer to an) array of items of our templated
* <Type> we are holding in our list.
*/
class ListType
{
private:
// initial allocSize, unless overridden in construction
const int ALLOCATION_INCREMENT = 10;
static int nextListId; // class variable, assign unique listid
int id;
int size;
int allocSize;
int* item;
public:
ListType(); // default constructor
ListType(int allocSize); // empty constructor
ListType(int size, int* items); // construct from array
~ListType(); // class destructor
// getters
// member functions
// overloaded operators
const ListType& operator=(const ListType& rightList); // I
also gave you the copy operator
};
33. // need to include the template implementations here, if/when
you templatize
//#include "ListType.cpp"
#endif // _LISTTYPE_H_