2. {
// Perform a deep copy... maybe the _add_ method can help...
for (auto *itr: src.allPolyhedra)
{
allPolyhedra.puch_back(itr->clone());
}
/*for (const Polyhedron* p: src.allPolyhedra){
allPolyhedra.push_back(p->clone());
}*/
}
//-------------------------------------------------------------------------
-----
/**
* @todo write this function
*/
Composite::~Composite()
{
3. // Delete each component polyhedra
/*for (Polyhedron* p: this->allPolyhedra)
{
delete p;
}*/
for ( auto *itr: this->allPolyhedra)
{
delete itr;
}
}
//-------------------------------------------------------------------------
-----
void Composite::read(std::istream& ins){
int numPolyhedra;
ins >> numPolyhedra;
4. allPolyhedra.resize(numPolyhedra);
for (int i = 0; i < numPolyhedra; i++) {
ins >> allPolyhedra[i];
boundingBox.merge(allPolyhedra[i]->getBoundingBox());
}//---------------------------------------------------------------------
---------
/**
* @todo write this function
*/
void Composite::display(std::ostream& outs) const
{
Polyhedron::display(outs);
outs << allPolyhedra.size() << " polyhedra" << "n";
for(auto &itr: this->allPolyhedra)
{
5. outs << *itr << "n";
/* for ( const Polyhedron* p : this->allPolyhedra)
{
outs << *p <<" n ";
}*/
// Loop through all component polyhedra and
// print (display) them
}
//-------------------------------------------------------------------------
-----
/**
* @todo write this function
*/
void Composite::scale(double scalingFactor)
{
// Loop through all polyhedra and scale them
6. // Do not forget the bounding box... after the loop
}
//-------------------------------------------------------------------------
-----
Composite& Composite::operator=(Composite rhs)
{
swap(*this, rhs);
return *this;
}
Composite::iterator Composite::begin()
{
return allPolyhedra.begin();
}
//-------------------------------------------------------------------------
-----
Composite::iterator Composite::end()
8. * @todo write this function
*/
void Composite::add(const Polyhedron* toAdd)
{
// Add one new polyhedra and _merge_ its boundingBox with
_this->boundingBox
/* assert(toAdd !=nullptr);
allPolyhedra.push_back(toAdd);
boundingBox.merge(allPolyhedra, getBoundingBox());
Polyhedron.merge(allPolyhedra, getBoundingBox());*/
}
//-------------------------------------------------------------------------
-----
void swap(Composite& lhs, Composite& rhs)
{
using std::swap;
std::swap(lhs.allPolyhedra, rhs.allPolyhedra);
9. swap(lhs.boundingBox, rhs.boundingBox);
}
CHAPTER II: LITERATURE REVIEW
Introduction
The review of the literature indicates that there are several
causes for the lack of social skills in elementary students.
Negative behavior that interferes with learning is on the rise
(Elisa & Weissberg, 2003). Beland (2007) points out there are
behavior and school situations such as stress and anxiety that
divide or exclude students from receiving positive feedback on
their daily behavior log. Off-task behaviors can be caused by
students who engage in conversation with others when given
directions or during teacher-directed instructions. Many of the
behavioral problems stem from what is going on at home.
Poverty, divorce, bad role models, and neglect can cause
children to become disruptive in class (Atici, 2007).
According to Meier et al. (2006), teachers have expectations of
social behavior that are sometimes inconsistent. If teachers view
students as incapable of acting or thinking on their own,
students give up their independence, individuality, and
initiative forming a self-fulfilling prophecy (Metzger, 2004).
Warger and Rutherfod (1997) state that teaching respect and
responsibility is not enough; teachers need to break each down
and teach the distinct skills and behaviors of each. Each should
be taught as social skills.
Elias and Weissberg (2003) note that a person who is lacking in
social and emotional learning may not be successful in school
10. and the workplace. They may also have trouble maintaining
healthy relationships with family and friends. If a student has
trouble saying what they really mean, controlling their
impulsive actions, and making reasonable decisions, they may
not be truly aware of their feelings. Students who have trouble
expressing their feelings may find themselves in risky or grown-
up situations that can cause anxiety, fear, and excitement but
children who have positive relationships with teachers have
better social-emotional adjustment (Wang, Hatzignianni,
Shahaeian, Murray & Harrison, 2016).
Furthermore, the students who are anxious, angry, or sad have a
more difficult time solving problems and concentrating. These
students are impressionable and they can often be swayed by
their own need to be liked by others and to belong. Their
actions and judgments affect relationships as well as their
health. Children need the prompts to deal with the real-life
situations before they occur so they have the ability to make
difficult choices (Elias & Weissberg, 2003).
According to Bru (2006), elementary students are more
vulnerable to social comparison and place emphasis on
competition. Beland (2007) agrees that labeling, stereotyping,
isolation, facial expressions, and negative actions are all actions
that set children apart. Children are expected to possess these
critical social skills which are crucial to school success.
According to Meier, et al. (2006), children need to get along
with people who are different and need to respond respectfully
in various situations. Yet, elementary school students are
particularly sensitive to the emotional aspects of their peers,
including their connections with trusted adults, which is critical
to their responsiveness to behavioral expectations. These
relationships can be accurate predictors of student achievement
as early as the elementary years (Pianta & Nimetz, 1991) and
continuing into the middle school grades (den Brok et al., 2005;
O’Conner & McCartney, 2007).
Shechtman and Leichtentritt (2004) wrote that children’s
behavioral problems are triggered by distorted thoughts and
11. poorly-controlled emotional responses to stress. Wentzel (2003)
found that in contrast to high-achieving students, the lowest
achieving students choose other types of social goals, such as to
have fun and to make and keep friendships, and generally are
unwilling to try to conform to the social standards of the
classroom.
Disruptive student behavior can be caused by divorce, substance
abuse, frequent relocation, and other problems facing our
society (Rathvon, 1990). Utay and Utay (2005) state that
parents should make sure their children have the skills to
effectively interact when they are negatively confronted, or
when the rules suddenly change. Without these skills, children
are more likely to experience negative emotionality in these
situations, which could lead to impulsive altercations.
Elementary students are more concerned with social issues than
learning. Sometimes children need help with making friends.
They may be lonely, depressed, have low self-esteem, or other
health issues. They may show their frustration through anger
instead of sadness. Teaching social skills to a child who is
feeling rejected is vital (Utay & Utay, 2005).
Students need to develop better social skills in school (Kidron
& Fleischman, 2006).
Meyer, et al. (2006), feel that these critical social skills are
crucial to school success. They need to get along with people
who are different. They need to be able to spend free time
appropriately, and respond in an appropriate fashion when they
are bullied or teased by a peer. According to Denham, et al.
(2006), social skill interventions need to be taught to children
with interpersonal and adjustment problems. Even with limited
resources, schools are responsible for the improvement of their
students’ academic and social behavior. Schools are lacking the
expertise to resolve these problems. Student behavioral
problems ranged from verbal interruptions of teacher or student
directions, to causing injury to oneself or another individual
(Fairbanks, S., Guardino, D., Lathrop, M., and Sugai, G., 2007).
Putting this into perspective, what drives the necessity and
12. pursuit of more effective options for discipline, other than out-
of-school suspension? Removing students from their
educational setting has many negative effects including
increasing the likelihood that students will enter the juvenile
justice system or end up in prison (Maynard & Weinstein,
2019). According to the Civil Rights Data Collection of the 49
million students enrolled in public schools in 2011-2012, 3.45
million were suspended out-of-school (Maynard & Weinstein,
2019). Notwithstanding the fact that black students were
suspended three times as much as their white counterparts, and
disabled students twice as many as their non-disabled peers: a
matter of disproportionality to be studied in specific detail in
the future.
Hence, the significance of this work in avoiding such outcomes,
and the pursuit of alternative and/or preventative programs.
Proactive and preventive behavioral interventions reduce
discipline incidents and protect students from suspension and
expulsion (Gregory, Allen, Mikami, Hafen, &Pianta, 2013).
This is where the focus needs to shift: preventative options
and/or programs. High quality prevention programs that aim to
increase students’ social and emotional learning skills have
demonstrated reductions in student behavior problems and
suspension rates (Durlak, Weissberg, Dymnicki, Taylor &
Schellinger, 2011). In recent years, schools have begun to
approach these issues with the use of programs like Multi -
Tiered Systems of Supports, or MTSS.
Multi-tiered System of Supports (MTSS)
Ongoing research shows that some students struggle with
academics while others struggle with behavioral challenges.
Still others struggle with both. The MTSS framework has come
to lend support.
The Multi-tiered System of Supports (MTSS) is a framework
that many schools are using to give targeted support to
struggling students. It is also called the MTSS framework, the
MTSS process, or the MTSS model. MTSS uses a cohesive
continuum of data driven practices that give support to
15. all students at various levels. These three tiers include:
Tier 1 – Universal or primary – Majority of students (75-90%)
As the largest tier, and the foundation for the entire framework,
Tier 1 encompasses the entire school with core instructions and
basic interventions. This structure helps to build positive
relationships between staff and students. It includes proactive
classroom management strategies aimed at creating a supportive
atmosphere. Students who do not respond to these interventions
may move into Tier 2.
Tier 2 – Secondary – Small groups of students (10-25%)
Some students need a little extra assistance in meeting academic
and behavioral goals, and it is in Tier 2 that these individuals
receive that help. Often these interventions and supports are
delivered in small group settings, such as reading
groups. Check-In/Check-Out (CICO) interventions are often a
part of Tier 2, as well. This targeted support allows students to
work toward catching up with their peers.
Tier 3 – Tertiary – Individual students (< 10%)
A subset of students has significant challenges that do not
respond to the interventions and supports in Tier 1 or Tier 2.
Tier 3 gives these students individualized supports and can
include assistance from outside agencies such as behavioral
counselors or family therapists.
MTSS tiers help schools to organize levels of supports based on
intensity so that students receive necessary instruction, support,
and interventions based on need. As such, student identities are
not based on tier levels. Instead, individuals are identified as
students in need of supports. This helps educators to respond
appropriately and provide students with the assistance they need
to prosper in the classroom.
Employing the MTSS Framework
Schools using MTSS seek successful educational and behavioral
outcomes for all students, regardless of challenges. This may
involve significant interventions for a segment of the student
population, with the goal of moving these individuals into
16. reduced interventions as they progress. The flexibility of this
framework allows students to move from tier to tier as needed,
without prescribed timelines. The elements of MTSS include:
· Multiple tiers of instruction, intervention, and support
. Includes learning standards and behavioral expectations
. Increasing levels of intensity
· Problem-solving process
. Collaborative and team-based decision making to determine
which students need interventions
· Data evaluation
. Interpretation of data to determine student progress and action
steps
· Communication and collaboration
. Teamwork focused on building relationships and using data to
improve those relationships
· Capacity building infrastructure
. Professional development and coaching along with written
plans
· Leadership
. Active involvement and administration of practices
School Climate and MTSS
MTSS creates a positive environment for all students which in
turn impacts school climate. Positive school climate is the
leading indicator for such outcomes as increased academic
achievement, increased teacher retention, and reduced discipline
referrals.
The interventions and supports found in MTSS help in
relationship building, which is a key factor in student
success. Additionally, a supportive school environment allows
each student to work through their challenges and catch up with
their peers. Defined tiers of intervention for both academic and
behavioral challenges enables educators to address student
needs, both as a group and individually.
It’s important to note that MTSS tiers may look quite different
from school to school. MTSS focuses on the overall needs of
17. individual students, and what may be a Tier 2 intervention in
one school might be a Tier 1 in another. It is up to each school
to develop an MTSS framework that addresses challenges
specific to that school community.
PBIS as a Part of MTSS
As part of an MTSS framework, PBIS can help educators build
an awesome school culture and address behavioral challenges in
a positive way. These interventions, when paired w ith the
academic assistance found in RtI, can help students to improve
in all areas. The tiered structure of a PBIS initiative helps
educators to provide students with the help they need to develop
the behavioral skills necessary for success. This social-
emotional learning coincides with academics, and each can help
strengthen the other.
Schoolwide expectations, tiered systems of supports, and
consistent data analysis are all hallmarks of PBIS. These factors
are critical to the success of MTSS, as well. Employing the
MTSS framework helps to focus educators and students alike on
positive interactions, creating a school climate focused on
student success.
Behavior Interventions
https://www.vtnea.org/uploads/files/Behavior%20Intervention%
20Guide-9.13.pdf
Although there are some significant differences in behavioral
interventions across age groups, aligning an intervention with
the function of a child’s behavior applies to all age groups. For
younger students, it is important to make sure that behavior
expectations are developmentally appropriate.
Current Behavior Interventions
http://www.cc76.k12.il.us/uploads/2/6/7/0/26707673/pdfsamtmp
bufferkeqhh1.pdf
Introduction
Changes in federal and state laws have directed schools to focus
more on helping all children learn by addressing problems
earlier within the general education setting. These new laws
19. may receive assistance quickly.
MTSS is increasingly being used as a framework for supporting
the needs of all learners through strong core instruction while
simultaneously allowing for supplementary supports for some
students as needed.
However, despite the increasing prevalence of MTSS, students
with disabilities continue to experience persistently poor
academic and behavioral outcomes (Danielson & Rosenquist,
2014).
Research also shows that 3–5% of the general school population
does not respond to the core and supplementary interventions
that are typically delivered through MTSS (D. Fuchs, Fuchs, &
Compton, 2012; Wanzek & Vaughn, 2009).
These students are those who exhibit the most severe and
persistent learning and behavioral needs and who require
intensive intervention
MTSS framework is comprised of five major components.
Curriculum and instruction that is evidence-based must be
administered to students at a universal level. Students must be
individually screened for academic, social, and emotional
needs. Evidence-based, instructional interventions must be
implemented at the targeted audience and at the appropriate
intensive level of rigor. These instructional interventions must
be differentiated based upon individualized student needs.
Students that receive targeted instruction must be continually
monitored to ensure that best practice is being conducted.
Finally, it is vita that all decisions are data-based and best serve
the need of the students (Iowa Department of Education, 2016).
https://nwcommons.nwciowa.edu/cgi/viewcontent.cgi?article=10
29&context=education_masters
There is also little disagreement that MTSS frameworks have
great promise for meeting the needs of students with, or at risk
for, reading disabilities (Gersten et al., 2009; Samuels &
Farstrup, 2011). Yet many times, when schools adopt an MTSS
framework, they underestimate the work that it takes to
coordinate and align MTSS practices, and overestimate the
20. degree to which MTSS practices are implemented fully and with
fidelity (Arden, Gandhi, Zumeta, & Danielson, 2017; Coyne,
Oldham, Leonard, Burns, & Gage, 2016)
What is MTSS? MTSS is a process designed to help schools
focus on high quality instruction and interventions that are
matched to student needs and monitored on a frequent basis.
The information gained from an MTSS process is used by
school personnel and parents to adapt instruction and to make
decisions regarding the student’s educational program. What
Are the Benefits of MTSS? Perhaps the greatest benefit of an
MTSS approach is that it eliminates a “wait to fail” situation
because students get help promptly within the general education
setting. As soon as assessment data indicates a problem area for
a student or a group of students, interventions are put into place
to address these concerns. While the interventions are taking
place, school staff monitors any progress that these students are
making in their problem areas.
These progress monitoring techniques used within the MTSS
process provide information that allows teachers to better
evaluate student needs and match instruction, resources and
interventions appropriately. What is the MTSS Process? Most
MTSS systems are divided into a three-tier intervention model
as illustrated below: 1-5% Of all Students 5-10% 5-10% Of all
Students Of all Students 80-90% 80-90% Of all Students Of all
Students Tier 1: -Core Curriculum – 80-90% -Whole
Group/Core Instruction -For All Students in the Class Tier 2: -
Small Group Interventions 5-10% -For Some Students (At-Risk)
-Done in Addition to Tier 1 Tier 3: -Intense Interventions – 1-
5% -Customized Interventions -For a Very Small # of Students -
Done in Addition to Tier 1 & Tier 2
MTSS Process
Step 1: Screen all students three times a year. Step 2.:Use
screening data and teacher input, identify at -risk students, and
determine interventions. Step 3: Implement appropriate
interventions Step 4: Monitor progress Step 5: Evaluate the
21. intervention to determine whether student has made sufficient
progress. Step 6: Increase or decrease interventions based on
student need
What If My Child is recommended to the School’s “Problem
Solving Team”? Attend team meetings. Remember, you are the
expert of your child! Help plan interventions for academic
and/or behavioral problems. Implement or reinforce any
strategies or interventions at home. Always ask questions w
when things are not clear!
How can Parents Be Involved? Frequently communicate with
your child’s teacher(s). Attend school functions such as parent -
teacher conferences. Monitor and assist with your child’s
homework assignments.
https://nceo.umn.edu/docs/OnlinePubs/NCEOBriefMTSS.pdf
MTSS has the potential to meet the academic and behavioral
needs of all students. Unfortunately, students with the most
significant cognitive disabilities often are not included in this
framework even though they should be. When a group of
students with disabilities is not included in an MTSS
framework, the foundational concept of all students being
general education students first, with special education services
supplementary, is eroded.
As this concept of a continuum of tiered instruction and
interventions has evolved, its value as a framework that is
beneficial for all students, including those identified as students
with disabilities, has emerged. Even with this evolution, MTSS
typically has not explicitly included students with the most
significant cognitive disabilities. This omission may be due to
the assumption that students with the most significant cognitive
disabilities already are identified as needing special educati on
services that are individualized. Of course, this would not
preclude them from being included in an MTSS framework.
Despite the lack of application to students with the most
significant cognitive disabilities, a number of states indicate
that they will use an MTSS framework to reduce the numbers of
22. students participating in the alternate assessment based on
alternate academic achievement standards (AA-AAAS). States
also are seeking to align inclusive services for students with the
most significant cognitive disabilities with MTSS
implementation
Advantages
Equally important, the impact of the MTSS initiative on the
reading achievement of students identified as at risk for reading
disabilities was also statistically significant and educationally
meaningful (Coyne et al., 2018). Effects of intensive Tier 2
intervention were evaluated using a regression discontinuity
design, which demonstrated accelerated student reading growth
of students with and at risk for reading disabilities beyond what
would be expected if they had only received Tier 1 reading
instruction. Results from both analyses suggest that when these
schools were able to implement coordinated and sustained
MTSS practices and systems, their students - including students
with, and at risk for, reading disabilities - demonstrated
accelerated reading achievement that was evident across grades
K-3, and that these gains increased across years of
implementation (Coyne et al., 2016; Coyne et al., 2018).
Disadvantages
Although most components of MTSS require additional
development (L.S. Fuchs & Vaughn, 2012; Gersten & Dimino,
2006), intensive intervention may be the component least well
developed. Given their specialized expertise, special education
administrators are in a unique position to provide needed
guidance and leadership in districts and schools struggling to
educate their students with the most intensive learning and
behavioral needs
Further, there is evidence that suggests that partial
implementation of RTI or MTSS models may not improve
student outcomes, particularly students with, or at risk, for
learning disabilities (Balu et al., 2015; Harn et al., 2011).
Although many schools implement practices and components of
MTSS at a surface level, they haven’t established the systems
23. and tools that make accurate, deep, and sustained
implementation possible (Balu et al., 2015)
K-3 reading initiative, school teams needed to go beyond
typical MTSS practice and “delve into the details” (Coyne et
al., 2016) in order to overcome barriers and build the systems
and infrastructure needed to support high quality
implementation of MTSS in reading that met the needs of all
students
Supporting School-Level Reading Implementation:
Activity Timeline Common Barrier:
We Have a School Literacy Plan, But We Do Not Use It to
Guide Our Day-To-Day Practices Schools often create a school
literacy plan that outlines broad reading goals and objectives for
the upcoming school year (Jones, Burns, & Pirri, 2010).
A growing school-based mental health (SBMH) movement has
positioned schools as an ideal context for the provision of
mental health services for youth, especially given the barriers
associated with children’s access to psychological services in
outpatient settings (George, Zaheer, Kern, & Evans, 2018).
Multi-tiered systems of support (MTSS), a prevalent model of
service delivery in schools for academics and behavior (e.g.,
Barrett, Eber, & Weist, 2013; Sugai & Horner, 2009), has been
posited as a promising framework for the delivery of mental
health supports due to its focus on preventing mental health
concerns, universal screening to determine students at risk, and
matching of intervention intensity to students’ needs, among
other characteristics (e.g., Doll, Cummings, & Chapla, 2014). In
line with this trend, researchers have more recently begun
examining the application of the MTSS model to address
students’ mental health concerns, including universal screening
of internalizing risk (e.g., Eklund, Tanner, Stoll, & Anway,
2015; Miller et al., 2015), progress monitoring tools for
internalizing behavior (e.g., Hunter, Chenier, & Gresham, 2014;
von der Embse, Scott, & Kilgus, 2015), and school-based
mental health interventions (e.g., Carnevale, 2013; Stark,
Streusand, Arora, & Patel, 2011). As this literature base
24. continues to grow, there is a need for additional research on the
provision of school-based mental health services within an
MTSS model, specifcally with a focus on practical implications
to guide school-based practice (Kilgus, Reinke, & Jimerson,
2015). As such, the purpose of the current special issue is to
advance the integration of SBMH and MTSS by (a) highlighting
additional research that has examined various aspects of school -
based mental health service delivery within a tiered model and
(b) providing practical guidance regarding the selection of
specifc assessments and intervention approaches that are
appropriate for use in schools within an MTSS framework.
Positive Behavior Interventions and Supports
https://egrove.olemiss.edu/cgi/viewcontent.cgi?article=2515&co
ntext=hon_thesis
https://assets-global.website-
files.com/5d3725188825e071f1670246/5f57daacfa5a0946c4ad8e
88_Evidence%20Base%20PBIS%20043020.pdf
https://www.understood.org/en/learning-thinking-
differences/treatments-approaches/educational-strategies/pbis-
how-schools-support-positive-behavior
https://www.pbis.org/pbis/getting-started
The PBIS framework is a “proactive, system-level approach
that enables schools to effectively and efficiently support
student behavior” (Simonsen et al., 2008).
As this is a framework, it can be tailor-made for individual
schools by having them to select
https://digitalcommons.gardner-
webb.edu/cgi/viewcontent.cgi?article=1135&context=education
_etd
https://shrivercenter.umbc.edu/files/2014/10/Using-Multi-
Tiered-Systems-of-Support-to-Address-the-Social-Emotional-
Needs-of-Students-in-Maryland.pdf
https://scholarworks.calstate.edu/downloads/vx021g51j
https://www.cmhnetwork.org/wp-
content/uploads/2019/04/S64A-LEWIS-CHIU.pdf
https://scholarworks.calstate.edu/downloads/w0892g32g
26. monitoring provide information about a student’s learning rate
and level of achievement, both individually and in comparison
with the peer group. These data are then used when determining
which students need closer monitoring or interventi on.
Throughout the RTI process, student progress is monitored
frequently to examine student achievement and gauge the
effectiveness of the curriculum. Decisions made regarding
students’ instructional needs are based on multiple data points
taken in context over time.
Tiered instruction. A multi-tier approach is used to efficiently
differentiate instruction for all students. The model incorporates
increasing intensities of instruction offering specific, research-
based interventions matched to student needs.
Parent involvement. Schools implementing RTI provide parents
information about their child’s progress, the instruction and
interventions used, the staff who are delivering the instruction,
and the academic or behavioral goals for their child. Each of
these essential components is addressed in the “Include
Essential Components” section of this Web site.
Though there is no single, thoroughly researched and widely
practiced “model” of the RTI process, it is generally defined as
a three-tier (or three-step) model of school supports that uses
research-based academic and/or behavioral interventions. The
Three-Tier Model is described below.
Tier 1: High-Quality Classroom Instruction, Screening, and
Group Interventions
Within Tier 1, all students receive high-quality, scientifically
based instruction provided by qualified personnel to ensure that
their difficulties are not due to inadequate instruction. All
students are screened on a periodic basis to establish an
academic and behavioral baseline and to identify struggling
learners who need additional support. Students identified as
being “at risk” through universal screenings and/or results on
state- or districtwide tests receive supplemental instruction
during the school day in the regular classroom. The length of
27. time for this step can vary, but it generally should not exceed 8
weeks. During that time, student progress is closely monitored
using a validated screening system such as curriculum-based
measurement. At the end of this period, students showing
significant progress are generally returned to the regular
classroom program. Students not showing adequate progress are
moved to Tier 2.
Tier 2: Targeted Interventions
Students not making adequate progress in the regular classroom
in Tier 1 are provided with increasingly intensive instruction
matched to their needs on the basis of levels of performance and
rates of progress. Intensity varies across group size, frequency
and duration of intervention, and level of training of the
professionals providing instruction or intervention. These
services and interventions are provided in small-group settings
in addition to instruction in the general curriculum. In the early
grades (kindergarten through 3rd grade), interventions are
usually in the areas of reading and math. A longer period of
time may be required for this tier, but it should generally not
exceed a grading period. Students who continue to show too
little progress at this level of intervention are then considered
for more intensive interventions as part of Tier 3.
Tier 3: Intensive Interventions and Comprehensive Evaluation
At this level, students receive individualized, intensive
interventions that target the students’ skill deficits. Students
who do not achieve the desired level of progress in response to
these targeted interventions are then referred for a
comprehensive evaluation and considered for eligibility for
special education services under the Individuals with
Disabilities Education Improvement Act of 2004 (IDEA 2004).
The data collected during Tiers 1, 2, and 3 are included and
used to make the eligibility decision.
It should be noted that at any point in an RTI process, IDEA
2004 allows parents to request a formal evaluation to determine
eligibility for special education. An RTI process cannot be used
to deny or delay a formal evaluation for special education.
28. In addition to variations in the tiers used to deliver RTI
services, schools use different approaches in implementation,
such as problem-solving, functional assessment, standard
protocol, and hybrid approaches. Although there are many
formats for how a school might implement RTI to best serve the
needs of its students, in every case RTI can be a school -wide
framework for efficiently allocating resources to improve
student outcomes.
International Institute for Restorative Practices (IIRP)
Restorative Practice
Advantages
Disadvantages
Strategies:
1. Check In and Check Out System
http://pbismissouri.org/wp-content/uploads/2017/06/5.0-MO-
SW-PBS-Tier-2-Workbook-Ch-5-CICO.pdf
Check-In, Check-Out (CICO), also known as The Behavior
Education Program (BEP), is a Tier 2, group-oriented
intervention designed for students whose problem behaviors (a)
are unresponsive to Tier 1 practices and systems, (b) do not
require more immediate individualized interventions, and (c)
are observed across multiple settings or contexts (Crone,
Hawken, and Horner 2010). Because CICO is a group-based,
standardized intervention, it is an efficient and cost-effective
method for providing additional support to a group of students
with similar behavioral needs.
classroom teachers can usually implement the intervention in
less than 5-10 minutes per day.
Implementation of CICO occurs using the following basic
approach. First, a student is identified as needing additional
behavioral support. Next, behavioral expectations for the
student are defined and documented on a Daily Progress Report
(DPR). Third, the student begins to receive a regular cycle of
prompts and feedback from teachers and family for meeting
behavioral expectations. Finally, student data is generated on a
29. daily basis and is used to monitor progress and make decisions
about the intervention effects. Figure 5.1 provides a visual
representation for daily and weekly components of the CICO
intervention cycle.
2. Punch Card
3. Counseling
https://childrenfirstindia.com/role-of-the-school-counsellor/
file:///C:/Users/student/Downloads/125947632.pdf
https://files.eric.ed.gov/fulltext/EJ1241840.pdf
4. Social Worker
https://www.sswaa.org/school-social-work
https://www.guilford.com/excerpts/openshaw.pdf?t
https://files.eric.ed.gov/fulltext/EJ794821.pdf
5. Walk Breaks
https://pediatrics.aappublications.org/content/131/1/183
6. Rewards
https://www.pbisrewards.com/blog/what-is-pbis/
https://www.pbisrewards.com/pbis-incentives/
https://books.google.com/books?hl=en&lr=&id=RxiMDwAAQB
AJ&oi=fnd&pg=PT264&dq=what+is+the+advantages+of+PBIS
&ots=zCdoGmmYmC&sig=AaTG4Lxn4kkaLoZWNjrhnT2T0kQ
#v=onepage&q=what%20is%20the%20advantages%20of%20PBI
S&f=false
7. Classroom Behavior System
file:///C:/Users/student/Downloads/The_effect_of_classroom_m
anagement_skills_of_eleme.pdf
https://files.eric.ed.gov/fulltext/EJ976654.pdf
8. Treasure Box
http://120.102.234.86/eduwebsystem/module/download/update/e
w00000000104/file3014_7.pdf
https://wjccschools.org/cbb/wp-
content/uploads/sites/9/2018/09/NonFood-Alternatives.pdf
9. PBIS Bucks
https://www.nchcityschools.org/apps/pages/index.jsp?uREC_ID
=1571690&type=d&pREC_ID=1700524#:~:text=Trojan%20Buc
ks%20are%20used%20to,for%20following%20school%2Dwide
30. %20expectations.&text=The%20PBIS%20store%20is%20a,items
%20from%20the%20following%20list.
10. Dojo
asst5 OOP/bodgeUnitTest.h
#ifndef BODGE_UNIT_TEST_H_INCLUDED
#define BODGE_UNIT_TEST_H_INCLUDED
#include <cstdlib>
#include <functional>
#include <iostream>
#include <string>
#include "bodgeUnitTest.h"
/**
* This is the Bodge-Unit-Testing... PseUdO-Framework
*
* Bodge - A clumsy or inelegant job, usually a temporary
repair;
* a patch, a repair. (From Wiktionary)
*/
#define bodgeAssert(expression)
if (!(expression)) {
std::cout << "FAILURE: "
<< __func__ << ":" << __LINE__
<< " -> (" << #expression << ")n";
return false;
}
// End Macro
// Unit Aliases
using UnitTestFunction = std::function<bool()>;
31. using UnitTestPair = std::pair<UnitTestFunction, std::string>;
/**
* Run a single unit test function and output PASSED of
FAILED based on the
* result.
*
* @TODO I could (and should) probably turn this into a macro.
*/
inline
void runTest(const UnitTestFunction& testFunction, std::string
description)
{
std::cout << " " << (testFunction() ? "PASSED" :
"FAILED")
<< " -> " << description
<< std::endl;
}
#endif
asst5 OOP/BoundingBox.cpp
#include "BoundingBox.h"
//-------------------------------------------------------------------------
-----
BoundingBox::BoundingBox()
:lowerLeftVertex (0, 0, 0),
upperRightVertex(0, 0, 0)
{
}
//-------------------------------------------------------------------------
-----
BoundingBox::BoundingBox(Point lowerLeft, Point upperRight)
33. //-------------------------------------------------------------------------
-----
void BoundingBox::merge(const BoundingBox& other)
{
upperRightVertex.x = std::max( this->upperRightVertex.x,
other.upperRightVertex.x);
upperRightVertex.y = std::max(this->upperRightVertex.y,
other.upperRightVertex.y);
upperRightVertex.z = std::max(this->upperRightVertex.z,
other.upperRightVertex.z);
}
asst5 OOP/BoundingBox.h
#ifndef BOUNDINGBOX_H_INCLUDED
#define BOUNDINGBOX_H_INCLUDED
#include "Point.h"
/**
* Rectangular prism representing the boundaries
* x, y, and z of a polyhedron
*/
class BoundingBox {
private:
/**
* Lower boundary. In this exercise, it is fixed at (0,0,0)
*/
Point lowerLeftVertex;
/**
* Upper boundary
*/
Point upperRightVertex;
34. public:
/**
* Default Constructor
*/
BoundingBox();
/**
* Construct a bounding box from lower and upper points
that define it
*/
BoundingBox(Point lowerLeft, Point upperRight);
// Use the compiler generated version
BoundingBox(const BoundingBox& src) = default;
// Use the compiler generated version
~BoundingBox() = default;
// Use the compiler generated version
BoundingBox& operator=(const BoundingBox& rhs) =
default;
/**
* Retrieve the lower boundary
*/
Point getLowerLeftVertex() const;
/**
* Retrieve the upper boundary
*/
Point getUpperRightVertex() const;
/**
* Set the upper boundary using a Point
*/
void setUpperRightVertex(Point u);
35. /**
* Set the upper boundary using the x, y, and z
components.
*/
void setUpperRightVertex(double x, double y, double z);
/**
* Merge two bounding boxes, taking the
* largest values for each of x, y, and z
*/
void merge(const BoundingBox& other);
/**
* Apply a scaling factor
*/
void scale(double s);
};
//-------------------------------------------------------------------------
-----
inline
void BoundingBox::scale(double s)
{
upperRightVertex.scale(s);
}
#endif
asst5 OOP/Composite.cpp
#include "Polyhedron.h"
#include "Composite.h"
//-------------------------------------------------------------------------
-----
36. Composite::Composite()
:Polyhedron("Composite")
{
}
//-------------------------------------------------------------------------
-----
/**
* @todo write this function
*/
Composite::Composite(const Composite& src)
:Polyhedron("Composite")
{
// Perform a deep copy... maybe the _add_ method can help...
}
//-------------------------------------------------------------------------
-----
/**
* @todo write this function
*/
Composite::~Composite()
{
// Delete each component polyhedra
}
//-------------------------------------------------------------------------
-----
void Composite::read(std::istream& ins){
int numPolyhedra;
ins >> numPolyhedra;
allPolyhedra.resize(numPolyhedra);
for (int i = 0; i < numPolyhedra; i++) {
37. ins >> allPolyhedra[i];
boundingBox.merge(allPolyhedra[i]->getBoundingBox());
}
}
//-------------------------------------------------------------------------
-----
/**
* @todo write this function
*/
void Composite::display(std::ostream& outs) const
{
Polyhedron::display(outs);
outs << allPolyhedra.size() << " polyhedra" << "n";
// Loop through all component polyhedra and
// print (display) them
}
//-------------------------------------------------------------------------
-----
/**
* @todo write this function
*/
void Composite::scale(double scalingFactor)
{
// Loop through all polyhedra and scale them
// Do not forget the bounding box... after the loop
}
//-------------------------------------------------------------------------
-----
Composite& Composite::operator=(Composite rhs)
39. * @todo write this function
*/
void Composite::add(const Polyhedron* toAdd)
{
// Add one new polyhedra and _merge_ its boundingBox with
_this->boundingBox_
}
//-------------------------------------------------------------------------
-----
void swap(Composite& lhs, Composite& rhs)
{
using std::swap;
std::swap(lhs.allPolyhedra, rhs.allPolyhedra);
swap(lhs.boundingBox, rhs.boundingBox);
}
asst5 OOP/Composite.h
#ifndef COMPOSITE_H_INCLUDED
#define COMPOSITE_H_INCLUDED
#include <vector>
#include "Polyhedron.h"
class Composite : public Polyhedron {
public:
using Collection = std::vector<Polyhedron*>;
using iterator = Collection::iterator;
using const_iterator = Collection::const_iterator;
private:
40. /**
* Collection of polyhedra of which
* this composite polyhedron is composed
*/
Collection allPolyhedra;
public:
/**
* Default Constructor
*/
Composite();
/**
* Copy Constructor
*/
Composite(const Composite& src);
/**
* Destructor
*/
virtual ~Composite();
/**
* Assignment Operator
*/
Composite& operator=(Composite rhs);
/**
* Return the number of polyhedra that are part of this
* Composite object.
*/
int size() const;
// Iterator helpers
iterator begin();
41. iterator end();
const_iterator begin() const;
const_iterator end() const;
/**
* Add a Polyhedron to the `Composite` collection.
*
* @post toAdd is cloned and the copy is added.
*/
void add(const Polyhedron* toAdd);
// Polyhedron Interface
/**
* Copy Constructor Wrapper
*/
virtual Polyhedron* clone() const;
/**
* Read all component polyhedra
*
* @pre numPolyhedra == 0
*/
virtual void read(std::istream& ins);
/**
* Print all polyhedra
*/
virtual void display(std::ostream& outs) const;
/**
* Scale all polyhedra
*/
virtual void scale(double scalingFactor);
42. /**
* Swap the contents of two `Composite`s
* <p>
* I am using a friend function here and only here (under
protest)
*/
friend
void swap(Composite& lhs, Composite& rhs);
};
//-------------------------------------------------------------------------
-----
inline
int Composite::size() const
{
return this->allPolyhedra.size();
}
//-------------------------------------------------------------------------
-----
inline
Polyhedron* Composite::clone() const
{
return new Composite(*this);
}
#endif
asst5 OOP/Cylinder.cppPolyhedra (OOP) Part 1
You have submitted this assignment 1 time(s).
You last submitted it on Wed Nov 3 18:36:14 2021
43. The files you submitted wereFile
NameBytesCylinder.h2524Cylinder.cpp1453
You may not submit this, because: you have already requested
and been given access to the solution;A grade report was posted
on Wed Nov 3 18:45:04 2021Look at the solution to this
assignment.
(You will not be permitted to submit again after the solution has
been revealed.)
asst5 OOP/Cylinder.hPolyhedra (OOP) Part 1
You have submitted this assignment 1 time(s).
You last submitted it on Wed Nov 3 18:36:14 2021
The files you submitted wereFile
NameBytesCylinder.h2524Cylinder.cpp1453
You may not submit this, because: you have already requested
and been given access to the solution;A grade report was posted
on Wed Nov 3 18:45:04 2021Look at the solution to this
assignment.
(You will not be permitted to submit again after the solution has
been revealed.)
asst5 OOP/make.dep.txt
createPolyhedra.o: createPolyhedra.cpp Polyhedron.h Point.h
BoundingBox.h
PolyhedronFactory.h
Polyhedron.o: Polyhedron.cpp Polyhedron.h Point.h
BoundingBox.h
PolyhedronFactory.h
45. LFLAGS=-fsanitize=leak,address -fuse-ld=gold
endif
#
#####################################################
###################
# Macro definitions for "standard" C and C++ compilations
#
CPPFLAGS=-g -std=c++11 -D$(DISTR) -Wall -Wextra -
Wpedantic -Weffc++
CFLAGS=-g
TARGET=$(MAINPROG)$(EXE)
LINK=g++ $(CPPFLAGS)
#
CC=gcc
CPP=g++
#
#
# In most cases, you should not change anything below this
line.
#
# The following is "boilerplate" to set up the standard
compilation
# commands:
#
OBJS=$(CPPS:%.cpp=%.o)
DEPENDENCIES = $(CPPS:%.cpp=%.d)
TEST_OBJS=$(TEST_CPPS:%.cpp=%.o)
TEST_DRIVER_OBJS=$(TEST_DRIVERS:%.cpp=%.o)
%.d: %.cpp
touch [email protected]
%.o: %.cpp
48. //-------------------------------------------------------------------------
-----
bool operator==(const Point& lhs, const Point& rhs)
{
if (!fpNumsAreEqual(lhs.x, rhs.x)) {
return false;
}
if (!fpNumsAreEqual(lhs.y, rhs.y)) {
return false;
}
if (!fpNumsAreEqual(lhs.z, rhs.z)) {
return false;
}
return true;
}
asst5 OOP/Point.h
#ifndef POINT_H_INCLUDED
#define POINT_H_INCLUDED
#include <iostream>
/**
* Coordinate in 3 dimensional Cartesian space
*/
struct Point {
double x, y, z;
/**
* Default Constructor
*/
Point();
49. /**
* Construct a Point from specified
* x, y, and z values
*/
Point(double x, double y, double z);
// Use the compiler generated version
Point(const Point& src) = default;
// Use the compiler generated version
~Point() = default;
// Use the compiler generated version
Point& operator=(const Point& rhs) = default;
/**
* Apply geometric scaling function
*/
void scale(double scalingFactor);
/**
* Print a point
*/
void display(std::ostream& outs) const;
/**
* Swap the contents of two `Point`s
* <p>
* I am using a friend function here and only here (under
protest)
*/
friend
void swap(Point& lhs, Point& rhs);
};
53. }
}
return ins;
}
asst5 OOP/Polyhedron.h
#ifndef POLYHEDRON_H_INCLUDED
#define POLYHEDRON_H_INCLUDED
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include "Point.h"
#include "BoundingBox.h"
/**
* Abstract Polyhedron Base Class
*/
class Polyhedron {
private:
/**
* A string representing the name of this polyhedron
*/
std::string type;
protected:
/**
* Box (rectangular prism) that contains this element
*/
BoundingBox boundingBox;
public:
54. /**
* Default Constructor
*/
Polyhedron();
/**
* Constructor which allows
* a name to be set
*
* @param t c-string representing the polyhedron name
*/
Polyhedron(const char* t);
/**
* Destructor
*/
virtual ~Polyhedron();
/**
* Get the polyhedron name
*/
std::string getType() const;
/**
* set the polyhedron name
*/
void setType(std::string t);
/**
* Retrieve the bounding box
*/
BoundingBox getBoundingBox() const;
/**
* Duplicate the polyhedron
55. */
virtual Polyhedron* clone() const = 0;
/**
* Retrieve and reconstruct the polyhedron
* from an input stream
*/
virtual void read(std::istream& ins) = 0;
/**
* Print the polyhedron
*/
virtual void display(std::ostream& outs) const;
/**
* Check if two polyhedra have matching types
*/
bool isTypeMatch(const Polyhedron* rhs) const;
/**
* Apply a geometric scaling operation
*/
virtual void scale(double scalingFactor);
};
//-------------------------------------------------------------------------
-----
inline
std::string Polyhedron::getType() const
{
return type;
}
//-------------------------------------------------------------------------
-----
inline
59. #include <iostream>
#include <array>
class Polyhedron;
/**
* The Polyhedron Creating Wizard
*/
class PolyhedronFactory {
private:
/**
* Name Polyhedron Pair 2-tuple( name, model )
* <p>
* Note how this is now a std::pair
*/
using PolyhedronPair = std::pair<std::string,
Polyhedron*>;
static PolyhedronPair _known_polyhedra[]; ///< Listing of
known polyhedra
public:
/**
* Create a Polyhedron
*
* @param name the polyhedron to be created
*
* @return A polyhedron with the specified name
* or nullptr if no matching polyhedron is found
*/
static Polyhedron* createPolyhedron(std::string name);
/**
* Determine whether a given polyhedron is known
*
60. * @param name the polyhedron for which to query
*/
static bool isKnown(std::string name);
/**
* Print a list of known Polyhedrons
*
* @param outs the output stream
*/
static void listKnown(std::ostream& outs);
/**
* Determine the number of known Polyhedrons
*
* @return the number of known polyhedrons
*
*/
static int numberKnown();
};
#endif
asst5 OOP/Sphere.cpp
#include "Sphere.h"
//-------------------------------------------------------------------------
-----
Sphere::Sphere()
:Sphere(1)
{
}
//-------------------------------------------------------------------------
-----
Sphere::Sphere(double r)
:Polyhedron("Sphere"),
67. // I am skipping display in this test
delete sphere;
delete cylinder;
return true;
}
//-------------------------------------------------------------------------
----
bool testClone()
{
Polyhedron* sphere = new Sphere(2);
Polyhedron* cylinder = new Cylinder(3, 5);
Composite comp1;
comp1.add(sphere);
comp1.add(cylinder);
// Sanity Check Original
bodgeAssert(comp1.size() == 2);
bodgeAssert(comp1.begin() != comp1.end());
Point lowerPoint =
(comp1.getBoundingBox()).getLowerLeftVertex();
Point upperPoint =
(comp1.getBoundingBox()).getUpperRightVertex();
bodgeAssert(lowerPoint == ORIGIN);
bodgeAssert(upperPoint == Point(6, 6, 5));
// Make the copy and check it
Polyhedron* theCopyAsBase = comp1.clone();
68. Composite& theCopyAsComp = *((Composite*)
theCopyAsBase);
bodgeAssert(theCopyAsComp.size() == 2);
bodgeAssert(theCopyAsComp.begin() !=
theCopyAsComp.end());
lowerPoint =
(theCopyAsComp.getBoundingBox()).getLowerLeftVertex();
upperPoint =
(theCopyAsComp.getBoundingBox()).getUpperRightVertex();
bodgeAssert(lowerPoint == ORIGIN);
bodgeAssert(upperPoint == Point(6, 6, 5));
// Technically I should use the iterator to check that I
// have copies of `sphere` and `cylinder`
// I am skipping display in this test
delete theCopyAsBase;
delete sphere;
delete cylinder;
return true;
}
//-------------------------------------------------------------------------
----
bool testRead()
{
std::istringstream ins(INPUT_STR);
Composite comp1;
comp1.read(ins);
69. bodgeAssert(comp1.size() == 2);
bodgeAssert(comp1.begin() != comp1.end());
// Technically I should use the iterator to check that I
// have the correct `sphere` and `cylinder`
// BoundingBox...
Point expectedPoint(10, 10, 10);
const Point& point =
(comp1.getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
// I am skipping display in this test
return true;
}
//-------------------------------------------------------------------------
----
/**
This comment contains the markup to render a sequence
diagram in sdedit:
#![testScale]
test:TestComposite[a]
/sphere:unique_ptr<Sphere>[a]
/rawSphere:Sphere*[a]
/sphereBB:BoundingBox[a]
/cylinder:unique_ptr<Cylinder>[a]
/rawCylinder:Cylinder*[a]
/cylinderBB:BoundingBox[a]
/comp:Composite[a]
/compBB:BoundingBox[a]
/allPolyhedra:vector<Polyhedron*>[a]
#
# Setup
test:rawSphere=rawSphere.new(2)
70. rawSphere:sphereBB.new()
rawSphere:d=rawSphere.getDiameter()
rawSphere:sphereBB.setUpperRightVertex(d, d, d)
test:sphere.new(rawSphere)
test:rawCylinder=rawCylinder.new(3, 5)
rawCylinder:cylinderBB.new()
rawCylinder:d=rawCylinder.getDiameter()
rawCylinder:cylinderBB.setUpperRightVertex(d, d, height)
test:cylinder.new(rawCylinder)
test:comp.new()
comp:compBB.new()
comp:allPolyhedra.new()
#
# Add rawSphere and rawCylinder to comp
test:rawSphere=sphere.get()
test:comp.add(rawSphere)
comp:cpy=rawSphere.clone()
comp:allPolyhedra.push_back(cpy)
comp:compBB.merge(cpy.getBoundingBox())
test:rawCylinder=cylinder.get()
test:comp.add(rawCylinder)
comp:cpy=rawCylinder.clone()
comp:allPolyhedra.push_back(cpy)
comp:compBB.merge(cpy.getBoundingBox())
#
test:comp.scale(5)
[c:loop for each idx in {0, 1}]
comp:poly=allPolyhedra.at(idx)
comp:poly->scale() is invoked (omitted for brevity)
[/c]
test:All Checks (assertions run)
test:sphere.destroy()
sphere:rawSphere.destroy()
rawSphere:sphereBB.destroy()
test:cylinder.destroy()
cylinder:rawCylinder.destroy()
71. rawCylinder:cylinderBB.destroy()
test:comp.destroy()
[c:loop for each idx in {0, 1}]
comp:poly=allPolyhedra.at(idx)
comp:delete poly (omitted for brevity)
[/c]
comp:allPolyhedra.destroy()
**/
bool testScale()
{
std::unique_ptr<Polyhedron> sphere(new Sphere(2));
std::unique_ptr<Polyhedron> cylinder(new Cylinder(3, 5));
Composite comp1;
comp1.add(sphere.get());
comp1.add(cylinder.get());
comp1.scale(5);
// Sanity Check Original
bodgeAssert(comp1.size() == 2);
bodgeAssert(comp1.begin() != comp1.end());
// Technically I should use the iterator to check that I
// have the correct `sphere` and `cylinder`
Point lowerPoint =
(comp1.getBoundingBox()).getLowerLeftVertex();
Point upperPoint =
(comp1.getBoundingBox()).getUpperRightVertex();
bodgeAssert(lowerPoint == ORIGIN);
bodgeAssert(upperPoint == Point(30, 30, 25));
return true;
}
74. //-------------------------------------------------------------------------
----
Cylinder* defaultCylinder = new Cylinder();
bool testDefaultConstructor()
{
bodgeAssert(fpNumsAreEqual(defaultCylinder->getRadius(),
1));
bodgeAssert(fpNumsAreEqual(defaultCylinder-
>getDiameter(), 2));
bodgeAssert(fpNumsAreEqual(defaultCylinder->getHeight(),
1));
// BoundingBox...
Point expectedPoint(2, 2, 1);
const Point& point = (defaultCylinder-
>getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
// I am skipping display in this test
return true;
}
//-------------------------------------------------------------------------
----
bool testNonDefaultConstructor()
{
Cylinder* cyl = new Cylinder(3, 2);
bodgeAssert(fpNumsAreEqual(cyl->getRadius(), 3));
bodgeAssert(fpNumsAreEqual(cyl->getDiameter(), 6));
75. bodgeAssert(fpNumsAreEqual(cyl->getHeight(), 2));
// BoundingBox...
Point expectedPoint(6, 6, 2);
const Point& point = (cyl-
>getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
// I am skipping display in this test
delete cyl;
return true;
}
//-------------------------------------------------------------------------
----
bool testSetRadius()
{
Cylinder* cyl = new Cylinder(1, 2);
cyl->setRadius(12);
bodgeAssert(fpNumsAreEqual(cyl->getRadius(), 12));
bodgeAssert(fpNumsAreEqual(cyl->getDiameter(), 24));
bodgeAssert(fpNumsAreEqual(cyl->getHeight(), 2));
// BoundingBox...
Point expectedPoint(24, 24, 2);
const Point& point = (cyl-
>getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
76. // I am skipping display in this test
delete cyl;
return true;
}
//-------------------------------------------------------------------------
----
bool testSetHeight()
{
Cylinder* cyl = new Cylinder(1, 2);
cyl->setHeight(8);
bodgeAssert(fpNumsAreEqual(cyl->getRadius(), 1));
bodgeAssert(fpNumsAreEqual(cyl->getDiameter(), 2));
bodgeAssert(fpNumsAreEqual(cyl->getHeight(), 8));
// BoundingBox...
Point expectedPoint(2, 2, 8);
const Point& point = (cyl-
>getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
// I am skipping display in this test
delete cyl;
return true;
}
//-------------------------------------------------------------------------
----
77. bool testClone()
{
Cylinder* cyl = new Cylinder(3, 2);
Cylinder* cpy = (Cylinder*) cyl->clone();
bodgeAssert(fpNumsAreEqual(cpy->getRadius(), 3));
bodgeAssert(fpNumsAreEqual(cpy->getDiameter(), 6));
bodgeAssert(fpNumsAreEqual(cpy->getHeight(), 2));
// BoundingBox...
Point expectedPoint(6, 6, 2);
const Point& point = (cpy-
>getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
// I am skipping display in this test
delete cyl;
delete cpy;
return true;
}
//-------------------------------------------------------------------------
----
bool testRead()
{
Cylinder* cyl = new Cylinder();
std::istringstream ins("4 12");
cyl->read(ins);
78. bodgeAssert(fpNumsAreEqual(cyl->getRadius(), 12));
bodgeAssert(fpNumsAreEqual(cyl->getDiameter(), 24));
bodgeAssert(fpNumsAreEqual(cyl->getHeight(), 4));
// BoundingBox...
Point expectedPoint(24, 24, 4);
const Point& point = (cyl-
>getBoundingBox()).getUpperRightVertex();
bodgeAssert(point == expectedPoint);
// I am skipping display in this test
delete cyl;
return true;
}
//-------------------------------------------------------------------------
----
bool testScale()
{
Cylinder* cyl = new Cylinder(5, 3);
cyl->scale(2);
bodgeAssert(fpNumsAreEqual(cyl->getRadius(), 10));
bodgeAssert(fpNumsAreEqual(cyl->getDiameter(), 20));
bodgeAssert(fpNumsAreEqual(cyl->getHeight(), 6));
// BoundingBox...
Point expectedPoint(20, 20, 6);
const Point& point = (cyl-
>getBoundingBox()).getUpperRightVertex();
79. bodgeAssert(point == expectedPoint) ;
// I am skipping display in this test
delete cyl;
return true;
}
//-------------------------------------------------------------------------
----
bool testDisplay()
{
Cylinder* cyl = new Cylinder(3, 5);
std::ostringstream outs;
const std::string expectedOutput = "[Cylinder] (6, 6, 5)-
>Radius: 3 Height: 5";
cyl->display(outs);
bodgeAssert(outs.str() == expectedOutput);
delete cyl;
return true;
}
//-------------------------------------------------------------------------
-----
int main(int argc, char** argv)
{
UnitTestPair tests[] = {
{testDefaultConstructor, "testDefaultConstructor"},
{testNonDefaultConstructor,
"testNonDefaultConstructor"},
81. #ifndef UTILITIES_H_INCLUDED
#define UTILITIES_H_INCLUDED
extern const double FP_TOLERANCE;
/**
* Compare two floating point numbers for equivalence. Allow
them to differ
* within a set tolerance
*
* Note there exists a tremendous amount of literature on how to
* compare floating point number. For this exercise/example we
will
* use a slightly-better-than naive fp1 == fp2 approach.
*
* @param fp1 first floating point number
* @param fp2 second floating point number
* @param eps tolerance
*/
bool fpNumsAreEqual(double fp1, double fp2, double
eps=FP_TOLERANCE);
#endif