SlideShare a Scribd company logo
1 of 81
#include "Polyhedron.h"
#include "Composite.h"
#include <assert.h>
//-------------------------------------------------------------------------
-----
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...
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()
{
// 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;
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)
{
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
// 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()
{
return allPolyhedra.end();
}
//-------------------------------------------------------------------------
-----
Composite::const_iterator Composite::be gin() const
{
return allPolyhedra.begin();
}
//-------------------------------------------------------------------------
-----
Composite::const_iterator Composite::end() const
{
return allPolyhedra.end();
}
//-------------------------------------------------------------------------
-----
/**
* @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);
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
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
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
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
academics and behavior with the use of frequent data
monitoring driving the decision making process. In this case,
behavior includes more than just referrals. Behavior in the sense
of MTSS includes everything from attendance issues to physical
altercations. MTSS also supports the staff at schools as well,
emphasizing the need for professional development and
highlighting the importance of feedback to staff. It shows the
importance of the home/school/community collaboration and
attempts to have all parties involved to help students succeed.
The MTSS model grew out of the combination of two other
intervention-based frameworks: Response to Intervention (RtI)
and PBIS.( CITATION) Copyright © 2021 PBIS Rewards
MTSS is designed to help schools identify students that struggle
academically and to try to provide assistance early in their
academic careers. It uses a “whole child “approach which
supports the students’ academic growth, but assist in many
other areas, too. These areas may include behavior, social and
emotional needs, and absenteeism (not attending school). In
addition, the MTSS framework has grown to encompass all
students at every level.
A central goal of the MTSS frameworks is to prevent reading
difficulties before they become entrenched and intractable,
similar to prevention models in public health (Fletcher &
Vaughn, 2009; Lembke, McMaster, & Stecker, 2010). In
addition, to improve outcomes for students with disabilities,
special education services should be supported by effective
MTSS practices. Such practices should be implemented school -
wide, and should provide a continuum of supports for all
students, including students with disabilities (Coyne,
Kame’enui, & Simmons, 2001; Fuchs, Fuchs, & Stecker, 2010;
Harn, Chard, & Kame’enui, 2011).
Research shows that students in regular education classes that
are exposed to early intervention services generally do not have
experience with intense reading instruction may happen until
third or fourth grade. However, research again shows that
schools that provides early intervention through MTSS
frameworks, all students experiencing reading difficulties
receive intensive instruction and intervention, beginning in
kindergarten. Therefore, when a student is identified for special
education services, the initial Individualized Education Program
(IEP) can be developed as a continuation and expansion of
current and ongoing reading instruction and intervention (Fuchs
et al., 2010)
https://keystoliteracy.com/blog/what-is-mtss/
( difference between RtI and MTSS?)
Key Components of MTSS
As an alternative to the “waiting to fail” assessment model,
MTSS takes a more proactive approach to identify student with
academic, behavioral, social or absenteem needs.
The key elements of MTSS include:
· Universal screening of all students early in the school year
· Tiers of interventions that can be amplified in response to
levels of need
· Ongoing data collection and continual assessment
· Schoolwide approach to expectations and supports
· Parent involvement
The cohesive instruction model of MTSS uses collected data to
assess the students’ needs and provide them with deep and
explicit interventions in appropriate tiers.
Copyright © 2021 PBIS Rewards
https://www.pbisrewards.com/blog/what-is-mtss/
Three Tiers of Support
The tiers of support are a huge part of MTSS. They get more
intense from one level to the next. For example, a child getting
small group interventions may need to “move up” to one-on-one
help.
Three Tiers of Support
MTSS provides a method of early identification and
intervention that can help struggling students to catch up with
their peers. As such, MTSS uses three tiers of support to assist
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
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
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
emphasize the importance of providing high quality,
scientifically-based instruction and interventions, and hold
schools accountable for the adequate yearly progress of al l
students. This new process of providing interventions to
students who are at risk for academic or behavioral problems is
called MTSS (Multi-tiered System of Support).
Handling the needs of students can be one of the biggest
challenges that a teacher faces on a daily basics. Some students
struggle with academics while others struggle with behavioral
challenges. Still, there are many students that struggle with
both. So, to meet these demands standards both with academics
and behaviors, schools began using a framework of
interventions and supports designed to address these behavioral
and academic challenges. Thus, the multi-tiered systems of
support (MTSS) was developed. MTSS was implemented to be
the overseeing body of both response to intervention (RTI) for
academics and positive behavior interventions and support
(PBIS), dealing with behaviors (Harlacher, Sakelaris, &
Kattelman, 2013; Hunter et al., 2015).
Copyright © 2014–2021 Understood For All Inc.
MTSS is an “umbrella” term. It includes some multi-tiered
systems of support you may know already:
Response to intervention (RTI) helps students who are
struggling with academics. It provides increasing levels of
support to help them catch up. Learn more about RTI .
Positive behavioral interventions and supports (PBIS) is an
approach schools use to promote school safety and good
behavior. All students are taught how they’re expected to
behave. These expectations are described in a positive way.
(“Be respectful” instead of “Don’t talk back.”) Learn more
about PBIS.
https://www.understood.org/en/learning-thinking-
differences/treatments-approaches/educational-strategies/mtss-
what-you-need-to-know
This new and groundbreaking framework, known as MTSS,
helps schools to identify struggling students early so that they
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
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
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
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
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
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
Advantages
Disadvantages
PBIS encourages schools to use their time and resources more
effectively while making data-based decisions concerning
interventions along a three-tiered continuum (PBIS.org, 2012).
School-wide Positive Behavioral Interventions and Supports
(SWPBIS) is the establishment of socially appropriate behavior
expectations and supports for all students within a school
environment (PBIS.org, 2012).
RTI Response to interventions
Copyright © 2021 National Center for Learning Disabilities,
Inc.
Response to Intervention (RTI) is a multi-tier approach to the
early identification and support of students with learning and
behavior needs. The RTI process begins with high-quality
instruction and universal screening of all children in the general
education classroom. Struggling learners are provided with
interventions at increasing levels of intensity to accelerate their
rate of learning. These services may be provided by a variety of
personnel, including general education teachers, special
educators, and specialists. Progress is closely monitored to
assess both the learning rate and level of performance of
individual students. Educational decisions about the intensity
and duration of interventions are based on individual student
response to instruction. RTI is designed for use when making
decisions in both general education and special education,
creating a well-integrated system of instruction and intervention
guided by child outcome data.
For RTI implementation to work well, the following essential
components must be implemented with fidelity and in a rigorous
manner:
High-quality, scientifically based classroom instruction. All
students receive high-quality, research-based instruction in the
general education classroom.
Ongoing student assessment. Universal screening and progress
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
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.
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
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
%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()>;
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)
:lowerLeftVertex (lowerLeft),
upperRightVertex(upperRight)
{
}
//-------------------------------------------------------------------------
-----
Point BoundingBox::getLowerLeftVertex() const
{
return lowerLeftVertex;
}
//-------------------------------------------------------------------------
-----
Point BoundingBox::getUpperRightVertex() const
{
return upperRightVertex;
}
//-------------------------------------------------------------------------
-----
void BoundingBox::setUpperRightVertex(Point u)
{
upperRightVertex = u;
}
//-------------------------------------------------------------------------
-----
void BoundingBox::setUpperRightVertex(double x, double y,
double z)
{
upperRightVertex.x = x;
upperRightVertex.y = y;
upperRightVertex.z = z;
}
//-------------------------------------------------------------------------
-----
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;
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);
/**
* 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"
//-------------------------------------------------------------------------
-----
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++) {
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)
{
swap(*this, rhs);
return *this;
}
//-------------------------------------------------------------------------
-----
Composite::iterator Composite::begin()
{
return allPolyhedra.begin();
}
//-------------------------------------------------------------------------
-----
Composite::iterator Composite::end()
{
return allPolyhedra.end();
}
//-------------------------------------------------------------------------
-----
Composite::const_iterator Composite::begin() const
{
return allPolyhedra.begin();
}
//-------------------------------------------------------------------------
-----
Composite::const_iterator Composite::end() const
{
return allPolyhedra.end();
}
//-------------------------------------------------------------------------
-----
/**
* @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:
/**
* 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();
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);
/**
* 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
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
Sphere.o: Sphere.cpp Sphere.h Polyhedron.h Point.h
BoundingBox.h
Point.o: Point.cpp Point.h utilities.h
PolyhedronFactory.o: PolyhedronFactory.cpp
PolyhedronFactory.h Sphere.h 
Polyhedron.h Point.h BoundingBox.h Cylinder.h Composite.h
BoundingBox.o: BoundingBox.cpp BoundingBox.h Point.h
Cylinder.o: Cylinder.cpp Cylinder.h Polyhedron.h Point.h
BoundingBox.h
Composite.o: Composite.cpp Polyhedron.h Point.h
BoundingBox.h Composite.h
utilities.o: utilities.cpp utilities.h
asst5 OOP/makefile.txt
MAINPROG=createPolyhedra
CPPS= createPolyhedra.cpp Polyhedron.cpp Sphere.cpp
Point.cpp 
PolyhedronFactory.cpp BoundingBox.cpp Cylinder.cpp
Composite.cpp 
utilities.cpp
TEST_CPPS= Polyhedron.cpp Sphere.cpp Point.cpp 
PolyhedronFactory.cpp BoundingBox.cpp Cylinder.cpp
Composite.cpp 
utilities.cpp
TEST_DRIVERS=TestCylinder.cpp TestComposite.cpp
DIR=${PWD}
ASST=$(notdir ${DIR})
ifneq (,$(findstring MinGW,$(PATH)))
DISTR=MinGW
EXE=.exe
LFLAGS=
else
DISTR=Unix
EXE=
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
$(CPP) $(CPPFLAGS) -MMD -o [email protected] -c
$*.cpp
#
# Targets:
#
all: $(TARGET) tests
win: $(OBJS)
$(LINK) $(FLAGS) -o $(TARGET) $(OBJS)
$(TARGET): $(OBJS)
$(LINK) $(FLAGS) -o $(TARGET) $(OBJS) $(LFLAGS)
tests: $(TEST_OBJS) $(TEST_DRIVER_OBJS)
$(LINK) $(FLAGS) -o testCylinder $(TEST_OBJS)
TestCylinder.o $(LFLAGS)
$(LINK) $(FLAGS) -o testComposite $(TEST_OBJS)
TestComposite.o $(LFLAGS)
clean:
-/bin/rm -f *.d *.o $(TARGET) $(TEST_DRIVER_OBJS)
testCylinder.o TestComposite.o
make.dep: $(DEPENDENCIES)
-cat $(DEPENDENCIES) > [email protected]
include make.dep
asst5 OOP/Point.cpp
#include "Point.h"
#include "utilities.h"
//-------------------------------------------------------------------------
-----
Point::Point()
:x(0), y(0), z(0)
{
}
//-------------------------------------------------------------------------
-----
Point::Point(double x_, double y_, double z_)
:x(x_), y(y_), z(z_)
{
}
//-------------------------------------------------------------------------
-----
void Point::scale(double scalingFactor)
{
x *= scalingFactor;
y *= scalingFactor;
z *= scalingFactor;
}
//-------------------------------------------------------------------------
-----
void Point::display(std::ostream& outs) const
{
outs << "(" << x
<< ", " << y
<< ", " << z
<< ")";
}
//-------------------------------------------------------------------------
-----
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();
/**
* 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);
};
/**
* Logical Equivalence Operator - Weak Equality
*/
bool operator==(const Point& lhs, const Point& rhs);
/**
* Stream insertion (output) operator
*/
inline
std::ostream& operator<<(std::ostream& outs, const Point prt)
{
prt.display(outs);
return outs;
}
//-------------------------------------------------------------------------
-----
inline
void swap(Point& lhs, Point& rhs)
{
std::swap(lhs.x, rhs.x);
std::swap(lhs.y, rhs.y);
std::swap(lhs.z, rhs.z);
}
#endif
asst5 OOP/polyhedra1.txt
sphere 1
cylinder 2 1
sphere 4
cylinder 2 3
sphere 3
asst5 OOP/polyhedra2.txt
sphere 1
cylinder 2 1
sphere 4
cylinder 2 3
composite 3
sphere 3
sphere 5
sphere 7
composite 2
cylinder 1 2
sphere 5
sphere 3
asst5 OOP/Polyhedron.cpp
#include "Polyhedron.h"
#include "PolyhedronFactory.h"
//-------------------------------------------------------------------------
-----
Polyhedron::Polyhedron()
:type("Polyhedron"),
boundingBox()
{
}
//-------------------------------------------------------------------------
-----
Polyhedron::Polyhedron(const char* t)
:type(t),
boundingBox()
{
}
//-------------------------------------------------------------------------
-----
Polyhedron::~Polyhedron()
{
// No dynamic memory
}
//-------------------------------------------------------------------------
-----
void Polyhedron::display(std::ostream& outs) const
{
outs << "[" << type << "] "
<< boundingBox.getUpperRightVertex()
<< "->";
}
//-------------------------------------------------------------------------
-----
void Polyhedron::scale(double scalingFactor)
{
boundingBox.scale(scalingFactor);
}
//-------------------------------------------------------------------------
-----
std::istream& operator>>(std::istream& ins, Polyhedron*& ply)
{
std::string polyhedronType;
if (ins >> polyhedronType) {
ply =
PolyhedronFactory::createPolyhedron(polyhedronType);
if (ply != nullptr) {
ply->read(ins);
}
else {
getline(ins, polyhedronType);
}
}
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:
/**
* 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
*/
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
void Polyhedron::setType(std::string t)
{
type = t;
}
//-------------------------------------------------------------------------
-----
inline
BoundingBox Polyhedron::getBoundingBox() const
{
return boundingBox;
}
//-------------------------------------------------------------------------
-----
inline
bool Polyhedron::isTypeMatch(const Polyhedron* rhs) const
{
return this->getType() == rhs->getType();
}
/**
* Stream insertion operator (inline wrapper for display)
*/
inline
std::ostream& operator<<(std::ostream& outs, const
Polyhedron& ply) {
ply.display(outs);
return outs;
}
/**
* Stream extraction (input) operator
*/
std::istream& operator>>(std::istream& ins, Polyhedron*& ply);
#endif
asst5 OOP/PolyhedronFactory.cpp
#include "PolyhedronFactory.h"
#include "Sphere.h"
#include "Cylinder.h"
#include "Composite.h"
#include <iterator>
#include <algorithm>
PolyhedronFactory::PolyhedronPair
PolyhedronFactory::_known_polyhedra[] = {
{"sphere" , new Sphere()},
{"composite", new Composite()},
{"cylinder" , new Cylinder()}
};
//-------------------------------------------------------------------------
-----
Polyhedron* PolyhedronFactory::createPolyhedron(std::string
name)
{
for(const PolyhedronPair& pair : _known_polyhedra) {
if(pair.first == name) {
return pair.second->clone();
}
}
// A polygon with the given name could not be found
return nullptr;
}
//-------------------------------------------------------------------------
-----
bool PolyhedronFactory::isKnown(std::string name)
{
const auto it = std::find_if(std::begin(_known_polyhedra),
std::end(_known_polyhedra),
[&name](const PolyhedronPair&
pairToCheck) {
return pairToCheck.first == name;
});
return it != std::end(_known_polyhedra);
}
//-------------------------------------------------------------------------
-----
void PolyhedronFactory::listKnown(std::ostream& outs)
{
for(const PolyhedronPair& pair : _known_polyhedra) {
outs << " " << pair.first << "n";
}
}
//-------------------------------------------------------------------------
-----
int PolyhedronFactory::numberKnown()
{
return std::end(_known_polyhedra) -
std::begin(_known_polyhedra);
}
asst5 OOP/PolyhedronFactory.h
#ifndef POLYHEDRONFACTORY_H_INCLUDED
#define POLYHEDRONFACTORY_H_INCLUDED
#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
*
* @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"),
radius(r)
{
double d = this->getDiameter();
boundingBox.setUpperRightVertex(d, d, d);
}
//-------------------------------------------------------------------------
-----
void Sphere::read(std::istream& ins)
{
ins >> radius;
double d = this->getDiameter();
boundingBox.setUpperRightVertex(d, d, d);
}
//-------------------------------------------------------------------------
-----
void Sphere::display(std::ostream& outs) const
{
Polyhedron::display(outs);
outs << "Radius: " << radius
<< " "
<< "Diameter: " << getDiameter();
}
//-------------------------------------------------------------------------
-----
void Sphere::scale(double scalingFactor)
{
radius *= scalingFactor;
boundingBox.scale(scalingFactor);
}
asst5 OOP/Sphere.h
#ifndef SPHERE_H_INCLUDED
#define SPHERE_H_INCLUDED
#include "Polyhedron.h"
/**
* Sphere
*/
class Sphere : public Polyhedron {
private:
double radius;
public:
/**
* Default Constructor
*/
Sphere();
/**
* Construct a sphere from a provided radius
*/
Sphere(double r);
// Use the compiler generated version
Sphere(const Sphere& src) = default;
// Use the compiler generated version
virtual ~Sphere() = default;
// Use the compiler generated version
Sphere& operator=(const Sphere& rhs) = default;
/**
* Retrieve the radius
*/
double getRadius() const;
/**
* Update the radius
*/
void setRadius(double r);
/**
* Compute and return the diameter
*/
double getDiameter() const;
virtual Polyhedron* clone() const;
virtual void read(std::istream& ins);
virtual void display(std::ostream& outs) const;
virtual void scale(double scalingFactor);
};
//-------------------------------------------------------------------------
-----
inline
double Sphere::getRadius() const
{
return this->radius;
}
//-------------------------------------------------------------------------
-----
inline
void Sphere::setRadius(double r)
{
radius = r;
double d = getDiameter();
boundingBox.setUpperRightVertex(d, d, d);
}
//-------------------------------------------------------------------------
-----
inline
double Sphere::getDiameter() const
{
return (2 * radius);
}
//-------------------------------------------------------------------------
-----
inline
Polyhedron* Sphere::clone() const
{
return new Sphere(*this);
}
#endif
asst5 OOP/TestComposite.cpp
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <vector>
#include <sstream>
#include <algorithm>
#include <functional>
#include <cmath>
#include <memory>
#include "Polyhedron.h"
#include "Sphere.h"
#include "Cylinder.h"
#include "Composite.h"
#include "utilities.h"
#include "bodgeUnitTest.h"
//-------------------------------------------------------------------------
----
// Unit Tests
//-------------------------------------------------------------------------
----
const Point ORIGIN(0, 0, 0);
const Composite EMPTY_POLY;
const std::string INPUT_STR = R"(2
cylinder 1 2
sphere 5)";
bool testDefaultConstructor()
{
Point lowerPoint =
(EMPTY_POLY.getBoundingBox()).getLowerLeftVertex();
Point upperPoint =
(EMPTY_POLY.getBoundingBox()).getUpperRightVertex();
bodgeAssert(lowerPoint == ORIGIN);
bodgeAssert(upperPoint == ORIGIN);
bodgeAssert(EMPTY_POLY.size() == 0);
bodgeAssert(EMPTY_POLY.begin() ==
EMPTY_POLY.end());
// I am skipping display in this test
return true;
}
//-------------------------------------------------------------------------
----
bool testAdd()
{
Polyhedron* sphere = new Sphere(2);
Polyhedron* cylinder = new Cylinder(3, 5);
Composite comp1;
comp1.add(sphere);
bodgeAssert(comp1.size() == 1);
bodgeAssert(comp1.begin() != comp1.end());
Point lowerPoint =
(comp1.getBoundingBox()).getLowerLeftVertex();
Point upperPoint =
(comp1.getBoundingBox()).getUpperRightVertex();
bodgeAssert(lowerPoint == ORIGIN);
bodgeAssert(upperPoint == Point(4, 4, 4));
comp1.add(cylinder);
bodgeAssert(comp1.size() == 2);
bodgeAssert(comp1.begin() != comp1.end());
lowerPoint =
(comp1.getBoundingBox()).getLowerLeftVertex();
upperPoint =
(comp1.getBoundingBox()).getUpperRightVertex();
bodgeAssert(lowerPoint == ORIGIN);
bodgeAssert(upperPoint == Point(6, 6, 5));
// 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();
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);
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)
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()
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;
}
//-------------------------------------------------------------------------
----
bool testDisplay()
{
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);
std::ostringstream outs;
std::string expectedOutput = R"([Composite] (30, 30, 25) ->2
polyhedra
[Sphere] (20, 20, 20)->Radius: 10 Diameter: 20
[Cylinder] (30, 30, 25)->Radius: 15 Height: 25
)";
comp1.display(outs);
bodgeAssert(outs.str() == expectedOutput);
return true;
}
//-------------------------------------------------------------------------
-----
int main(int argc, char** argv)
{
UnitTestPair tests[] = {
{testDefaultConstructor, "testDefaultConstructor"},
{testAdd, "testAdd"},
{testClone, "testClone"},
{testRead, "testRead"},
{testScale, "testScale"},
{testDisplay, "testDisplay"}
};
for (const UnitTestPair& testPair : tests) {
runTest(testPair.first, testPair.second);
}
return 0;
}
asst5 OOP/TestCylinder.cpp
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <vector>
#include <sstream>
#include <algorithm>
#include <functional>
#include <cmath>
#include "Polyhedron.h"
#include "Sphere.h"
#include "Cylinder.h"
#include "utilities.h"
#include "bodgeUnitTest.h"
//-------------------------------------------------------------------------
----
// Unit Tests
//-------------------------------------------------------------------------
----
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));
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);
// 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;
}
//-------------------------------------------------------------------------
----
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);
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();
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"},
{testSetRadius, "testSetRadius"},
{testSetHeight, "testSetHeight"},
{testClone, "testClone"},
{testRead, "testRead"},
{testScale, "testScale"},
{testDisplay, "testDisplay"}
};
for (const UnitTestPair& testPair : tests) {
runTest(testPair.first, testPair.second);
}
return 0;
}
asst5 OOP/utilities.cpp
#include <cmath>
#include "utilities.h"
//-------------------------------------------------------------------------
-----
const double FP_TOLERANCE = 0.01;
//-------------------------------------------------------------------------
-----
bool fpNumsAreEqual(double fp1, double fp2, double eps)
{
return std::abs(fp2 - fp1) <= eps;
}
asst5 OOP/utilities.h
#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

More Related Content

Similar to Causes and Effects of Lack of Social Skills in Elementary Students

Conflicts In The Home
Conflicts In The HomeConflicts In The Home
Conflicts In The HomeCassieFeldman
 
Pbl presentation slides
Pbl presentation slidesPbl presentation slides
Pbl presentation slidesqed528
 
Pbl presentation slides
Pbl presentation slidesPbl presentation slides
Pbl presentation slidesqed528
 
interventions for students who are at risk
interventions for students who are at riskinterventions for students who are at risk
interventions for students who are at riskmekimber2
 
Inclusive Classroom: Promoting learning
 Inclusive Classroom: Promoting learning Inclusive Classroom: Promoting learning
Inclusive Classroom: Promoting learningOM THAPA
 
Coping Skills for Children: Social Skills and Assertiveness Training
Coping Skills for Children: Social Skills and Assertiveness TrainingCoping Skills for Children: Social Skills and Assertiveness Training
Coping Skills for Children: Social Skills and Assertiveness TrainingCarmen Y. Reyes
 
Education & Socioeconomic Status Fact Sheet
Education & Socioeconomic Status Fact SheetEducation & Socioeconomic Status Fact Sheet
Education & Socioeconomic Status Fact Sheetmokshacts
 
Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...
Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...
Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...Michael Changaris
 
Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...
Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...
Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...Nicole Heredia
 
Effect of Individual Counselling on Academic Performance of Underachievers’ ...
 Effect of Individual Counselling on Academic Performance of Underachievers’ ... Effect of Individual Counselling on Academic Performance of Underachievers’ ...
Effect of Individual Counselling on Academic Performance of Underachievers’ ...Research Journal of Education
 
Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013
Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013
Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013William Kritsonis
 
Myth Buster Activity.pptx
Myth Buster Activity.pptxMyth Buster Activity.pptx
Myth Buster Activity.pptxJoanneWeishar
 
Task Groups in the School SettingPromoting Children’s Socia.docx
Task Groups in the School SettingPromoting Children’s Socia.docxTask Groups in the School SettingPromoting Children’s Socia.docx
Task Groups in the School SettingPromoting Children’s Socia.docxjosies1
 
Please put number and name before each reply#1 charity parker.docx
Please put number and name before each reply#1 charity parker.docxPlease put number and name before each reply#1 charity parker.docx
Please put number and name before each reply#1 charity parker.docxbunnyfinney
 
Handout 4.3 Leadership StrategiesModule 4 The Center on t
Handout 4.3 Leadership StrategiesModule 4 The Center on tHandout 4.3 Leadership StrategiesModule 4 The Center on t
Handout 4.3 Leadership StrategiesModule 4 The Center on tJeanmarieColbert3
 
The effect of anxiety and emotional intelligence on students’ learning process
The effect of anxiety and emotional intelligence on students’ learning processThe effect of anxiety and emotional intelligence on students’ learning process
The effect of anxiety and emotional intelligence on students’ learning processuzairahmohdali
 
Behavioral Challenges Related to Inclusion 2
Behavioral Challenges Related to Inclusion 2Behavioral Challenges Related to Inclusion 2
Behavioral Challenges Related to Inclusion 2Stacia Jarvis
 

Similar to Causes and Effects of Lack of Social Skills in Elementary Students (20)

Conflicts In The Home
Conflicts In The HomeConflicts In The Home
Conflicts In The Home
 
Pbl presentation slides
Pbl presentation slidesPbl presentation slides
Pbl presentation slides
 
Pbl presentation slides
Pbl presentation slidesPbl presentation slides
Pbl presentation slides
 
interventions for students who are at risk
interventions for students who are at riskinterventions for students who are at risk
interventions for students who are at risk
 
Inclusive Classroom: Promoting learning
 Inclusive Classroom: Promoting learning Inclusive Classroom: Promoting learning
Inclusive Classroom: Promoting learning
 
Research Defense 1.pptx
Research Defense 1.pptxResearch Defense 1.pptx
Research Defense 1.pptx
 
Coping Skills for Children: Social Skills and Assertiveness Training
Coping Skills for Children: Social Skills and Assertiveness TrainingCoping Skills for Children: Social Skills and Assertiveness Training
Coping Skills for Children: Social Skills and Assertiveness Training
 
Education & Socioeconomic Status Fact Sheet
Education & Socioeconomic Status Fact SheetEducation & Socioeconomic Status Fact Sheet
Education & Socioeconomic Status Fact Sheet
 
FWPhardcopy
FWPhardcopyFWPhardcopy
FWPhardcopy
 
Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...
Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...
Childhood Trauma: The impact of Childhood Adversity on Education, Learning an...
 
Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...
Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...
Adaptation Of Social Problem Solving For Children Questionnaire In 6 Age Grou...
 
Effect of Individual Counselling on Academic Performance of Underachievers’ ...
 Effect of Individual Counselling on Academic Performance of Underachievers’ ... Effect of Individual Counselling on Academic Performance of Underachievers’ ...
Effect of Individual Counselling on Academic Performance of Underachievers’ ...
 
Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013
Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013
Bore, samuel k psycho educational groups in schools nfjca v2 n1 2013
 
Myth Buster Activity.pptx
Myth Buster Activity.pptxMyth Buster Activity.pptx
Myth Buster Activity.pptx
 
Gifted children
Gifted childrenGifted children
Gifted children
 
Task Groups in the School SettingPromoting Children’s Socia.docx
Task Groups in the School SettingPromoting Children’s Socia.docxTask Groups in the School SettingPromoting Children’s Socia.docx
Task Groups in the School SettingPromoting Children’s Socia.docx
 
Please put number and name before each reply#1 charity parker.docx
Please put number and name before each reply#1 charity parker.docxPlease put number and name before each reply#1 charity parker.docx
Please put number and name before each reply#1 charity parker.docx
 
Handout 4.3 Leadership StrategiesModule 4 The Center on t
Handout 4.3 Leadership StrategiesModule 4 The Center on tHandout 4.3 Leadership StrategiesModule 4 The Center on t
Handout 4.3 Leadership StrategiesModule 4 The Center on t
 
The effect of anxiety and emotional intelligence on students’ learning process
The effect of anxiety and emotional intelligence on students’ learning processThe effect of anxiety and emotional intelligence on students’ learning process
The effect of anxiety and emotional intelligence on students’ learning process
 
Behavioral Challenges Related to Inclusion 2
Behavioral Challenges Related to Inclusion 2Behavioral Challenges Related to Inclusion 2
Behavioral Challenges Related to Inclusion 2
 

More from MargaritoWhitt221

Your supervisor, Sophia, Ballot Online director of information t.docx
Your supervisor, Sophia, Ballot Online director of information t.docxYour supervisor, Sophia, Ballot Online director of information t.docx
Your supervisor, Sophia, Ballot Online director of information t.docxMargaritoWhitt221
 
Your selected IEP. (Rudy)Descriptions of appropriate instructi.docx
Your selected IEP. (Rudy)Descriptions of appropriate instructi.docxYour selected IEP. (Rudy)Descriptions of appropriate instructi.docx
Your selected IEP. (Rudy)Descriptions of appropriate instructi.docxMargaritoWhitt221
 
Your project sponsor and customer are impressed with your project .docx
Your project sponsor and customer are impressed with your project .docxYour project sponsor and customer are impressed with your project .docx
Your project sponsor and customer are impressed with your project .docxMargaritoWhitt221
 
Your initial post should use APA formatted in-text citations whe.docx
Your initial post should use APA formatted in-text citations whe.docxYour initial post should use APA formatted in-text citations whe.docx
Your initial post should use APA formatted in-text citations whe.docxMargaritoWhitt221
 
Your life is somewhere in a databaseContains unread posts.docx
Your life is somewhere in a databaseContains unread posts.docxYour life is somewhere in a databaseContains unread posts.docx
Your life is somewhere in a databaseContains unread posts.docxMargaritoWhitt221
 
Your original initial post should be between 200-300 words and 2 pee.docx
Your original initial post should be between 200-300 words and 2 pee.docxYour original initial post should be between 200-300 words and 2 pee.docx
Your original initial post should be between 200-300 words and 2 pee.docxMargaritoWhitt221
 
Your assignment is to research and report about an archaeological fi.docx
Your assignment is to research and report about an archaeological fi.docxYour assignment is to research and report about an archaeological fi.docx
Your assignment is to research and report about an archaeological fi.docxMargaritoWhitt221
 
Your assignment for Physical Science I is to write a paper on.docx
Your assignment for Physical Science I is to write a paper on.docxYour assignment for Physical Science I is to write a paper on.docx
Your assignment for Physical Science I is to write a paper on.docxMargaritoWhitt221
 
Your charge is to develop a program using comparative research, anal.docx
Your charge is to develop a program using comparative research, anal.docxYour charge is to develop a program using comparative research, anal.docx
Your charge is to develop a program using comparative research, anal.docxMargaritoWhitt221
 
Young consumers’ insights on brand equity Effects of bra.docx
Young consumers’ insights on brand equity Effects of bra.docxYoung consumers’ insights on brand equity Effects of bra.docx
Young consumers’ insights on brand equity Effects of bra.docxMargaritoWhitt221
 
You will examine a scenario that includes an inter-group conflict. I.docx
You will examine a scenario that includes an inter-group conflict. I.docxYou will examine a scenario that includes an inter-group conflict. I.docx
You will examine a scenario that includes an inter-group conflict. I.docxMargaritoWhitt221
 
You will perform a history of a head, ear, or eye problem that y.docx
You will perform a history of a head, ear, or eye problem that y.docxYou will perform a history of a head, ear, or eye problem that y.docx
You will perform a history of a head, ear, or eye problem that y.docxMargaritoWhitt221
 
You need to enable JavaScript to run this app. .docx
You need to enable JavaScript to run this app.      .docxYou need to enable JavaScript to run this app.      .docx
You need to enable JavaScript to run this app. .docxMargaritoWhitt221
 
You will act as a critic for some of the main subjects covered i.docx
You will act as a critic for some of the main subjects covered i.docxYou will act as a critic for some of the main subjects covered i.docx
You will act as a critic for some of the main subjects covered i.docxMargaritoWhitt221
 
You will research and prepare a presentation about image.  Your rese.docx
You will research and prepare a presentation about image.  Your rese.docxYou will research and prepare a presentation about image.  Your rese.docx
You will research and prepare a presentation about image.  Your rese.docxMargaritoWhitt221
 
You will be asked to respond to five different scenarios. Answer eac.docx
You will be asked to respond to five different scenarios. Answer eac.docxYou will be asked to respond to five different scenarios. Answer eac.docx
You will be asked to respond to five different scenarios. Answer eac.docxMargaritoWhitt221
 
You might find that using analysis tools to analyze internal .docx
You might find that using analysis tools to analyze internal .docxYou might find that using analysis tools to analyze internal .docx
You might find that using analysis tools to analyze internal .docxMargaritoWhitt221
 
You will conduct a professional interview with a staff nurse and a s.docx
You will conduct a professional interview with a staff nurse and a s.docxYou will conduct a professional interview with a staff nurse and a s.docx
You will conduct a professional interview with a staff nurse and a s.docxMargaritoWhitt221
 
You have chosen the topic of Computer Forensics for your researc.docx
You have chosen the topic of Computer Forensics for your researc.docxYou have chosen the topic of Computer Forensics for your researc.docx
You have chosen the topic of Computer Forensics for your researc.docxMargaritoWhitt221
 
1.Describe some of the landmark Supreme Court decisions that h.docx
1.Describe some of the landmark Supreme Court decisions that h.docx1.Describe some of the landmark Supreme Court decisions that h.docx
1.Describe some of the landmark Supreme Court decisions that h.docxMargaritoWhitt221
 

More from MargaritoWhitt221 (20)

Your supervisor, Sophia, Ballot Online director of information t.docx
Your supervisor, Sophia, Ballot Online director of information t.docxYour supervisor, Sophia, Ballot Online director of information t.docx
Your supervisor, Sophia, Ballot Online director of information t.docx
 
Your selected IEP. (Rudy)Descriptions of appropriate instructi.docx
Your selected IEP. (Rudy)Descriptions of appropriate instructi.docxYour selected IEP. (Rudy)Descriptions of appropriate instructi.docx
Your selected IEP. (Rudy)Descriptions of appropriate instructi.docx
 
Your project sponsor and customer are impressed with your project .docx
Your project sponsor and customer are impressed with your project .docxYour project sponsor and customer are impressed with your project .docx
Your project sponsor and customer are impressed with your project .docx
 
Your initial post should use APA formatted in-text citations whe.docx
Your initial post should use APA formatted in-text citations whe.docxYour initial post should use APA formatted in-text citations whe.docx
Your initial post should use APA formatted in-text citations whe.docx
 
Your life is somewhere in a databaseContains unread posts.docx
Your life is somewhere in a databaseContains unread posts.docxYour life is somewhere in a databaseContains unread posts.docx
Your life is somewhere in a databaseContains unread posts.docx
 
Your original initial post should be between 200-300 words and 2 pee.docx
Your original initial post should be between 200-300 words and 2 pee.docxYour original initial post should be between 200-300 words and 2 pee.docx
Your original initial post should be between 200-300 words and 2 pee.docx
 
Your assignment is to research and report about an archaeological fi.docx
Your assignment is to research and report about an archaeological fi.docxYour assignment is to research and report about an archaeological fi.docx
Your assignment is to research and report about an archaeological fi.docx
 
Your assignment for Physical Science I is to write a paper on.docx
Your assignment for Physical Science I is to write a paper on.docxYour assignment for Physical Science I is to write a paper on.docx
Your assignment for Physical Science I is to write a paper on.docx
 
Your charge is to develop a program using comparative research, anal.docx
Your charge is to develop a program using comparative research, anal.docxYour charge is to develop a program using comparative research, anal.docx
Your charge is to develop a program using comparative research, anal.docx
 
Young consumers’ insights on brand equity Effects of bra.docx
Young consumers’ insights on brand equity Effects of bra.docxYoung consumers’ insights on brand equity Effects of bra.docx
Young consumers’ insights on brand equity Effects of bra.docx
 
You will examine a scenario that includes an inter-group conflict. I.docx
You will examine a scenario that includes an inter-group conflict. I.docxYou will examine a scenario that includes an inter-group conflict. I.docx
You will examine a scenario that includes an inter-group conflict. I.docx
 
You will perform a history of a head, ear, or eye problem that y.docx
You will perform a history of a head, ear, or eye problem that y.docxYou will perform a history of a head, ear, or eye problem that y.docx
You will perform a history of a head, ear, or eye problem that y.docx
 
You need to enable JavaScript to run this app. .docx
You need to enable JavaScript to run this app.      .docxYou need to enable JavaScript to run this app.      .docx
You need to enable JavaScript to run this app. .docx
 
You will act as a critic for some of the main subjects covered i.docx
You will act as a critic for some of the main subjects covered i.docxYou will act as a critic for some of the main subjects covered i.docx
You will act as a critic for some of the main subjects covered i.docx
 
You will research and prepare a presentation about image.  Your rese.docx
You will research and prepare a presentation about image.  Your rese.docxYou will research and prepare a presentation about image.  Your rese.docx
You will research and prepare a presentation about image.  Your rese.docx
 
You will be asked to respond to five different scenarios. Answer eac.docx
You will be asked to respond to five different scenarios. Answer eac.docxYou will be asked to respond to five different scenarios. Answer eac.docx
You will be asked to respond to five different scenarios. Answer eac.docx
 
You might find that using analysis tools to analyze internal .docx
You might find that using analysis tools to analyze internal .docxYou might find that using analysis tools to analyze internal .docx
You might find that using analysis tools to analyze internal .docx
 
You will conduct a professional interview with a staff nurse and a s.docx
You will conduct a professional interview with a staff nurse and a s.docxYou will conduct a professional interview with a staff nurse and a s.docx
You will conduct a professional interview with a staff nurse and a s.docx
 
You have chosen the topic of Computer Forensics for your researc.docx
You have chosen the topic of Computer Forensics for your researc.docxYou have chosen the topic of Computer Forensics for your researc.docx
You have chosen the topic of Computer Forensics for your researc.docx
 
1.Describe some of the landmark Supreme Court decisions that h.docx
1.Describe some of the landmark Supreme Court decisions that h.docx1.Describe some of the landmark Supreme Court decisions that h.docx
1.Describe some of the landmark Supreme Court decisions that h.docx
 

Recently uploaded

भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

Causes and Effects of Lack of Social Skills in Elementary Students

  • 1. #include "Polyhedron.h" #include "Composite.h" #include <assert.h> //------------------------------------------------------------------------- ----- Composite::Composite() :Polyhedron("Composite") { } //------------------------------------------------------------------------- ----- /** * @todo write this function */ Composite::Composite(const Composite& src) :Polyhedron("Composite")
  • 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()
  • 7. { return allPolyhedra.end(); } //------------------------------------------------------------------------- ----- Composite::const_iterator Composite::be gin() const { return allPolyhedra.begin(); } //------------------------------------------------------------------------- ----- Composite::const_iterator Composite::end() const { return allPolyhedra.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
  • 13. academics and behavior with the use of frequent data monitoring driving the decision making process. In this case, behavior includes more than just referrals. Behavior in the sense of MTSS includes everything from attendance issues to physical altercations. MTSS also supports the staff at schools as well, emphasizing the need for professional development and highlighting the importance of feedback to staff. It shows the importance of the home/school/community collaboration and attempts to have all parties involved to help students succeed. The MTSS model grew out of the combination of two other intervention-based frameworks: Response to Intervention (RtI) and PBIS.( CITATION) Copyright © 2021 PBIS Rewards MTSS is designed to help schools identify students that struggle academically and to try to provide assistance early in their academic careers. It uses a “whole child “approach which supports the students’ academic growth, but assist in many other areas, too. These areas may include behavior, social and emotional needs, and absenteeism (not attending school). In addition, the MTSS framework has grown to encompass all students at every level. A central goal of the MTSS frameworks is to prevent reading difficulties before they become entrenched and intractable, similar to prevention models in public health (Fletcher & Vaughn, 2009; Lembke, McMaster, & Stecker, 2010). In addition, to improve outcomes for students with disabilities, special education services should be supported by effective MTSS practices. Such practices should be implemented school - wide, and should provide a continuum of supports for all students, including students with disabilities (Coyne, Kame’enui, & Simmons, 2001; Fuchs, Fuchs, & Stecker, 2010; Harn, Chard, & Kame’enui, 2011). Research shows that students in regular education classes that are exposed to early intervention services generally do not have experience with intense reading instruction may happen until third or fourth grade. However, research again shows that schools that provides early intervention through MTSS
  • 14. frameworks, all students experiencing reading difficulties receive intensive instruction and intervention, beginning in kindergarten. Therefore, when a student is identified for special education services, the initial Individualized Education Program (IEP) can be developed as a continuation and expansion of current and ongoing reading instruction and intervention (Fuchs et al., 2010) https://keystoliteracy.com/blog/what-is-mtss/ ( difference between RtI and MTSS?) Key Components of MTSS As an alternative to the “waiting to fail” assessment model, MTSS takes a more proactive approach to identify student with academic, behavioral, social or absenteem needs. The key elements of MTSS include: · Universal screening of all students early in the school year · Tiers of interventions that can be amplified in response to levels of need · Ongoing data collection and continual assessment · Schoolwide approach to expectations and supports · Parent involvement The cohesive instruction model of MTSS uses collected data to assess the students’ needs and provide them with deep and explicit interventions in appropriate tiers. Copyright © 2021 PBIS Rewards https://www.pbisrewards.com/blog/what-is-mtss/ Three Tiers of Support The tiers of support are a huge part of MTSS. They get more intense from one level to the next. For example, a child getting small group interventions may need to “move up” to one-on-one help. Three Tiers of Support MTSS provides a method of early identification and intervention that can help struggling students to catch up with their peers. As such, MTSS uses three tiers of support to assist
  • 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
  • 18. emphasize the importance of providing high quality, scientifically-based instruction and interventions, and hold schools accountable for the adequate yearly progress of al l students. This new process of providing interventions to students who are at risk for academic or behavioral problems is called MTSS (Multi-tiered System of Support). Handling the needs of students can be one of the biggest challenges that a teacher faces on a daily basics. Some students struggle with academics while others struggle with behavioral challenges. Still, there are many students that struggle with both. So, to meet these demands standards both with academics and behaviors, schools began using a framework of interventions and supports designed to address these behavioral and academic challenges. Thus, the multi-tiered systems of support (MTSS) was developed. MTSS was implemented to be the overseeing body of both response to intervention (RTI) for academics and positive behavior interventions and support (PBIS), dealing with behaviors (Harlacher, Sakelaris, & Kattelman, 2013; Hunter et al., 2015). Copyright © 2014–2021 Understood For All Inc. MTSS is an “umbrella” term. It includes some multi-tiered systems of support you may know already: Response to intervention (RTI) helps students who are struggling with academics. It provides increasing levels of support to help them catch up. Learn more about RTI . Positive behavioral interventions and supports (PBIS) is an approach schools use to promote school safety and good behavior. All students are taught how they’re expected to behave. These expectations are described in a positive way. (“Be respectful” instead of “Don’t talk back.”) Learn more about PBIS. https://www.understood.org/en/learning-thinking- differences/treatments-approaches/educational-strategies/mtss- what-you-need-to-know This new and groundbreaking framework, known as MTSS, helps schools to identify struggling students early so that they
  • 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
  • 25. Advantages Disadvantages PBIS encourages schools to use their time and resources more effectively while making data-based decisions concerning interventions along a three-tiered continuum (PBIS.org, 2012). School-wide Positive Behavioral Interventions and Supports (SWPBIS) is the establishment of socially appropriate behavior expectations and supports for all students within a school environment (PBIS.org, 2012). RTI Response to interventions Copyright © 2021 National Center for Learning Disabilities, Inc. Response to Intervention (RTI) is a multi-tier approach to the early identification and support of students with learning and behavior needs. The RTI process begins with high-quality instruction and universal screening of all children in the general education classroom. Struggling learners are provided with interventions at increasing levels of intensity to accelerate their rate of learning. These services may be provided by a variety of personnel, including general education teachers, special educators, and specialists. Progress is closely monitored to assess both the learning rate and level of performance of individual students. Educational decisions about the intensity and duration of interventions are based on individual student response to instruction. RTI is designed for use when making decisions in both general education and special education, creating a well-integrated system of instruction and intervention guided by child outcome data. For RTI implementation to work well, the following essential components must be implemented with fidelity and in a rigorous manner: High-quality, scientifically based classroom instruction. All students receive high-quality, research-based instruction in the general education classroom. Ongoing student assessment. Universal screening and progress
  • 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)
  • 32. :lowerLeftVertex (lowerLeft), upperRightVertex(upperRight) { } //------------------------------------------------------------------------- ----- Point BoundingBox::getLowerLeftVertex() const { return lowerLeftVertex; } //------------------------------------------------------------------------- ----- Point BoundingBox::getUpperRightVertex() const { return upperRightVertex; } //------------------------------------------------------------------------- ----- void BoundingBox::setUpperRightVertex(Point u) { upperRightVertex = u; } //------------------------------------------------------------------------- ----- void BoundingBox::setUpperRightVertex(double x, double y, double z) { upperRightVertex.x = x; upperRightVertex.y = y; upperRightVertex.z = z; }
  • 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)
  • 38. { swap(*this, rhs); return *this; } //------------------------------------------------------------------------- ----- Composite::iterator Composite::begin() { return allPolyhedra.begin(); } //------------------------------------------------------------------------- ----- Composite::iterator Composite::end() { return allPolyhedra.end(); } //------------------------------------------------------------------------- ----- Composite::const_iterator Composite::begin() const { return allPolyhedra.begin(); } //------------------------------------------------------------------------- ----- Composite::const_iterator Composite::end() const { return allPolyhedra.end(); } //------------------------------------------------------------------------- ----- /**
  • 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
  • 44. Sphere.o: Sphere.cpp Sphere.h Polyhedron.h Point.h BoundingBox.h Point.o: Point.cpp Point.h utilities.h PolyhedronFactory.o: PolyhedronFactory.cpp PolyhedronFactory.h Sphere.h Polyhedron.h Point.h BoundingBox.h Cylinder.h Composite.h BoundingBox.o: BoundingBox.cpp BoundingBox.h Point.h Cylinder.o: Cylinder.cpp Cylinder.h Polyhedron.h Point.h BoundingBox.h Composite.o: Composite.cpp Polyhedron.h Point.h BoundingBox.h Composite.h utilities.o: utilities.cpp utilities.h asst5 OOP/makefile.txt MAINPROG=createPolyhedra CPPS= createPolyhedra.cpp Polyhedron.cpp Sphere.cpp Point.cpp PolyhedronFactory.cpp BoundingBox.cpp Cylinder.cpp Composite.cpp utilities.cpp TEST_CPPS= Polyhedron.cpp Sphere.cpp Point.cpp PolyhedronFactory.cpp BoundingBox.cpp Cylinder.cpp Composite.cpp utilities.cpp TEST_DRIVERS=TestCylinder.cpp TestComposite.cpp DIR=${PWD} ASST=$(notdir ${DIR}) ifneq (,$(findstring MinGW,$(PATH))) DISTR=MinGW EXE=.exe LFLAGS= else DISTR=Unix EXE=
  • 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
  • 46. $(CPP) $(CPPFLAGS) -MMD -o [email protected] -c $*.cpp # # Targets: # all: $(TARGET) tests win: $(OBJS) $(LINK) $(FLAGS) -o $(TARGET) $(OBJS) $(TARGET): $(OBJS) $(LINK) $(FLAGS) -o $(TARGET) $(OBJS) $(LFLAGS) tests: $(TEST_OBJS) $(TEST_DRIVER_OBJS) $(LINK) $(FLAGS) -o testCylinder $(TEST_OBJS) TestCylinder.o $(LFLAGS) $(LINK) $(FLAGS) -o testComposite $(TEST_OBJS) TestComposite.o $(LFLAGS) clean: -/bin/rm -f *.d *.o $(TARGET) $(TEST_DRIVER_OBJS) testCylinder.o TestComposite.o make.dep: $(DEPENDENCIES) -cat $(DEPENDENCIES) > [email protected] include make.dep asst5 OOP/Point.cpp #include "Point.h"
  • 47. #include "utilities.h" //------------------------------------------------------------------------- ----- Point::Point() :x(0), y(0), z(0) { } //------------------------------------------------------------------------- ----- Point::Point(double x_, double y_, double z_) :x(x_), y(y_), z(z_) { } //------------------------------------------------------------------------- ----- void Point::scale(double scalingFactor) { x *= scalingFactor; y *= scalingFactor; z *= scalingFactor; } //------------------------------------------------------------------------- ----- void Point::display(std::ostream& outs) const { outs << "(" << x << ", " << y << ", " << z << ")"; }
  • 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); };
  • 50. /** * Logical Equivalence Operator - Weak Equality */ bool operator==(const Point& lhs, const Point& rhs); /** * Stream insertion (output) operator */ inline std::ostream& operator<<(std::ostream& outs, const Point prt) { prt.display(outs); return outs; } //------------------------------------------------------------------------- ----- inline void swap(Point& lhs, Point& rhs) { std::swap(lhs.x, rhs.x); std::swap(lhs.y, rhs.y); std::swap(lhs.z, rhs.z); } #endif asst5 OOP/polyhedra1.txt sphere 1 cylinder 2 1 sphere 4 cylinder 2 3 sphere 3 asst5 OOP/polyhedra2.txt
  • 51. sphere 1 cylinder 2 1 sphere 4 cylinder 2 3 composite 3 sphere 3 sphere 5 sphere 7 composite 2 cylinder 1 2 sphere 5 sphere 3 asst5 OOP/Polyhedron.cpp #include "Polyhedron.h" #include "PolyhedronFactory.h" //------------------------------------------------------------------------- ----- Polyhedron::Polyhedron() :type("Polyhedron"), boundingBox() { } //------------------------------------------------------------------------- ----- Polyhedron::Polyhedron(const char* t) :type(t), boundingBox() { } //------------------------------------------------------------------------- -----
  • 52. Polyhedron::~Polyhedron() { // No dynamic memory } //------------------------------------------------------------------------- ----- void Polyhedron::display(std::ostream& outs) const { outs << "[" << type << "] " << boundingBox.getUpperRightVertex() << "->"; } //------------------------------------------------------------------------- ----- void Polyhedron::scale(double scalingFactor) { boundingBox.scale(scalingFactor); } //------------------------------------------------------------------------- ----- std::istream& operator>>(std::istream& ins, Polyhedron*& ply) { std::string polyhedronType; if (ins >> polyhedronType) { ply = PolyhedronFactory::createPolyhedron(polyhedronType); if (ply != nullptr) { ply->read(ins); } else { getline(ins, polyhedronType);
  • 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
  • 56. void Polyhedron::setType(std::string t) { type = t; } //------------------------------------------------------------------------- ----- inline BoundingBox Polyhedron::getBoundingBox() const { return boundingBox; } //------------------------------------------------------------------------- ----- inline bool Polyhedron::isTypeMatch(const Polyhedron* rhs) const { return this->getType() == rhs->getType(); } /** * Stream insertion operator (inline wrapper for display) */ inline std::ostream& operator<<(std::ostream& outs, const Polyhedron& ply) { ply.display(outs); return outs; } /** * Stream extraction (input) operator */ std::istream& operator>>(std::istream& ins, Polyhedron*& ply);
  • 57. #endif asst5 OOP/PolyhedronFactory.cpp #include "PolyhedronFactory.h" #include "Sphere.h" #include "Cylinder.h" #include "Composite.h" #include <iterator> #include <algorithm> PolyhedronFactory::PolyhedronPair PolyhedronFactory::_known_polyhedra[] = { {"sphere" , new Sphere()}, {"composite", new Composite()}, {"cylinder" , new Cylinder()} }; //------------------------------------------------------------------------- ----- Polyhedron* PolyhedronFactory::createPolyhedron(std::string name) { for(const PolyhedronPair& pair : _known_polyhedra) { if(pair.first == name) { return pair.second->clone(); } } // A polygon with the given name could not be found return nullptr; }
  • 58. //------------------------------------------------------------------------- ----- bool PolyhedronFactory::isKnown(std::string name) { const auto it = std::find_if(std::begin(_known_polyhedra), std::end(_known_polyhedra), [&name](const PolyhedronPair& pairToCheck) { return pairToCheck.first == name; }); return it != std::end(_known_polyhedra); } //------------------------------------------------------------------------- ----- void PolyhedronFactory::listKnown(std::ostream& outs) { for(const PolyhedronPair& pair : _known_polyhedra) { outs << " " << pair.first << "n"; } } //------------------------------------------------------------------------- ----- int PolyhedronFactory::numberKnown() { return std::end(_known_polyhedra) - std::begin(_known_polyhedra); } asst5 OOP/PolyhedronFactory.h #ifndef POLYHEDRONFACTORY_H_INCLUDED #define POLYHEDRONFACTORY_H_INCLUDED
  • 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"),
  • 61. radius(r) { double d = this->getDiameter(); boundingBox.setUpperRightVertex(d, d, d); } //------------------------------------------------------------------------- ----- void Sphere::read(std::istream& ins) { ins >> radius; double d = this->getDiameter(); boundingBox.setUpperRightVertex(d, d, d); } //------------------------------------------------------------------------- ----- void Sphere::display(std::ostream& outs) const { Polyhedron::display(outs); outs << "Radius: " << radius << " " << "Diameter: " << getDiameter(); } //------------------------------------------------------------------------- ----- void Sphere::scale(double scalingFactor) { radius *= scalingFactor; boundingBox.scale(scalingFactor); }
  • 62. asst5 OOP/Sphere.h #ifndef SPHERE_H_INCLUDED #define SPHERE_H_INCLUDED #include "Polyhedron.h" /** * Sphere */ class Sphere : public Polyhedron { private: double radius; public: /** * Default Constructor */ Sphere(); /** * Construct a sphere from a provided radius */ Sphere(double r); // Use the compiler generated version Sphere(const Sphere& src) = default; // Use the compiler generated version virtual ~Sphere() = default; // Use the compiler generated version Sphere& operator=(const Sphere& rhs) = default; /**
  • 63. * Retrieve the radius */ double getRadius() const; /** * Update the radius */ void setRadius(double r); /** * Compute and return the diameter */ double getDiameter() const; virtual Polyhedron* clone() const; virtual void read(std::istream& ins); virtual void display(std::ostream& outs) const; virtual void scale(double scalingFactor); }; //------------------------------------------------------------------------- ----- inline double Sphere::getRadius() const { return this->radius; } //------------------------------------------------------------------------- ----- inline void Sphere::setRadius(double r) { radius = r; double d = getDiameter();
  • 64. boundingBox.setUpperRightVertex(d, d, d); } //------------------------------------------------------------------------- ----- inline double Sphere::getDiameter() const { return (2 * radius); } //------------------------------------------------------------------------- ----- inline Polyhedron* Sphere::clone() const { return new Sphere(*this); } #endif asst5 OOP/TestComposite.cpp #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <vector> #include <sstream> #include <algorithm> #include <functional> #include <cmath> #include <memory> #include "Polyhedron.h" #include "Sphere.h"
  • 65. #include "Cylinder.h" #include "Composite.h" #include "utilities.h" #include "bodgeUnitTest.h" //------------------------------------------------------------------------- ---- // Unit Tests //------------------------------------------------------------------------- ---- const Point ORIGIN(0, 0, 0); const Composite EMPTY_POLY; const std::string INPUT_STR = R"(2 cylinder 1 2 sphere 5)"; bool testDefaultConstructor() { Point lowerPoint = (EMPTY_POLY.getBoundingBox()).getLowerLeftVertex(); Point upperPoint = (EMPTY_POLY.getBoundingBox()).getUpperRightVertex(); bodgeAssert(lowerPoint == ORIGIN); bodgeAssert(upperPoint == ORIGIN); bodgeAssert(EMPTY_POLY.size() == 0); bodgeAssert(EMPTY_POLY.begin() == EMPTY_POLY.end()); // I am skipping display in this test
  • 66. return true; } //------------------------------------------------------------------------- ---- bool testAdd() { Polyhedron* sphere = new Sphere(2); Polyhedron* cylinder = new Cylinder(3, 5); Composite comp1; comp1.add(sphere); bodgeAssert(comp1.size() == 1); bodgeAssert(comp1.begin() != comp1.end()); Point lowerPoint = (comp1.getBoundingBox()).getLowerLeftVertex(); Point upperPoint = (comp1.getBoundingBox()).getUpperRightVertex(); bodgeAssert(lowerPoint == ORIGIN); bodgeAssert(upperPoint == Point(4, 4, 4)); comp1.add(cylinder); bodgeAssert(comp1.size() == 2); bodgeAssert(comp1.begin() != comp1.end()); lowerPoint = (comp1.getBoundingBox()).getLowerLeftVertex(); upperPoint = (comp1.getBoundingBox()).getUpperRightVertex(); bodgeAssert(lowerPoint == ORIGIN); bodgeAssert(upperPoint == Point(6, 6, 5));
  • 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; }
  • 72. //------------------------------------------------------------------------- ---- bool testDisplay() { 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); std::ostringstream outs; std::string expectedOutput = R"([Composite] (30, 30, 25) ->2 polyhedra [Sphere] (20, 20, 20)->Radius: 10 Diameter: 20 [Cylinder] (30, 30, 25)->Radius: 15 Height: 25 )"; comp1.display(outs); bodgeAssert(outs.str() == expectedOutput); return true; } //------------------------------------------------------------------------- ----- int main(int argc, char** argv) { UnitTestPair tests[] = { {testDefaultConstructor, "testDefaultConstructor"}, {testAdd, "testAdd"}, {testClone, "testClone"},
  • 73. {testRead, "testRead"}, {testScale, "testScale"}, {testDisplay, "testDisplay"} }; for (const UnitTestPair& testPair : tests) { runTest(testPair.first, testPair.second); } return 0; } asst5 OOP/TestCylinder.cpp #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <vector> #include <sstream> #include <algorithm> #include <functional> #include <cmath> #include "Polyhedron.h" #include "Sphere.h" #include "Cylinder.h" #include "utilities.h" #include "bodgeUnitTest.h" //------------------------------------------------------------------------- ---- // Unit Tests
  • 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"},
  • 80. {testSetRadius, "testSetRadius"}, {testSetHeight, "testSetHeight"}, {testClone, "testClone"}, {testRead, "testRead"}, {testScale, "testScale"}, {testDisplay, "testDisplay"} }; for (const UnitTestPair& testPair : tests) { runTest(testPair.first, testPair.second); } return 0; } asst5 OOP/utilities.cpp #include <cmath> #include "utilities.h" //------------------------------------------------------------------------- ----- const double FP_TOLERANCE = 0.01; //------------------------------------------------------------------------- ----- bool fpNumsAreEqual(double fp1, double fp2, double eps) { return std::abs(fp2 - fp1) <= eps; } asst5 OOP/utilities.h
  • 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