As the head of the local Criminal Justice Dept. You have been tasked to write changes to departmental policy because of a recurring problem involving students failing to appear in class or appearing late in class. The dean has complained to you because he thinks attending class is a low priority for you students. Using cause and effect determine the possible causes for the late and missed classes. List the possible causes under the headings below
Machines
1
2
3
4
5
People
1
2
3
4
5
Materials
1
2
3
4
5
Methods
1
2
3
4
5
In: Psychology
In C++
Make changes to List.h and List.cpp, but not City.h or City.cpp.
Project includes Cities01.txt , City.h ,City.cpp , List.h , List.cpp , and Trial.cpp
Cities01.txt
Lansing 42.73 -84.55
Detroit 42.33 -83.04
Flint 43.01 -83.68
Grand-Rapids 42.96 -85.66
Jackson 42.27 -84.47
Kalamazoo 42.23 -85.55
Ann-Arbor 42.22 -83.75
Mt-Pleasant 43.60 -84.78
Clare 43.82 -84.77
Saginaw 43.42 -83.95
City.h
// City class definition
class city
{ friend class list;
public:
city(); // Constructor
bool get(istream& in); // Input name & location
void put(ostream& out); // Output data
private:
string name; // Name
float latitude,longitude; // Location
};
List.h
#define LIST_SIZE 20
#include "City.h"
class list
{ public:
list(); // Constructor - empty list
bool insert(city arg); // Add a city
void display(ostream& out); // Output data
void sort(string arg); // Sort by distance from arg
int size(); // Return number of cities
private:
int len; // Number of used cities
city map[LIST_SIZE]; // Data set
};
City.cpp
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
#include "City.h"
/**************************************
* Constructor - no parameters
**************************************/
city::city()
{ name = "";
latitude = longitude = 0.0F;
}
/**************************************
* Get
**************************************/
bool city::get(istream &in)
{ in >> name;
in >> latitude;
in >> longitude;
return in.good();
}
/**************************************
* Put
**************************************/
void city::put(ostream &out)
{ out << left;
out << setw(14) << name;
out << right << fixed << setprecision(2);
out << setw(8) << latitude;
out << setw(8) << longitude;
}
List.cpp
#include <iostream>
#include <iomanip>
using namespace std;
#include "List.h"
/*************************************
* list()
*************************************/
list::list()
{ len = 0;
}
/*************************************
* insert()
*************************************/
bool list::insert(city arg)
{
// Check to see if there is room
if(len>=LIST_SIZE) return false;
// Add to array
map[len++] = arg;
// Return success
return true;
}
/*************************************
* display()
*************************************/
void list::display(ostream &out)
{
}
/*************************************
* size()
************************************/
int list::size()
{ return len;
}
Trial.cpp
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
#include "List.h"
/*************************************
* main()
*************************************/
void main()
{ string name;
fstream infile;
city c;
list state;
// Load from file
cout << "Enter file name: ";
cin >> name;
cout << endl;
infile.open(name,ios::in);
if(!infile.is_open()) return;
while(c.get(infile)) state.insert(c);
infile.close();
// Display
cout << state.size() << " Cities" << endl
<< endl;
state.display(cout);
/* Steps 10.6-7
// Sort by closest to here and display
cout << "Enter home city: ";
cin >> name;
cout << endl;
state.sort(name);
state.display(cout);
*/
}
Could use some help with implementing the list::display() function so the output looks like this:
Enter file name: Cities01.txt
10 Cities
City Lat Long
-------------- ------ ------
Lansing 42.73 -84.55
Detroit 42.33 -83.04
Flint 43.01 -83.68
Grand-Rapids 42.96 -85.66
Jackson 42.27 -84.47
Kalamazoo 42.23 -85.55
Ann-Arbor 42.22 -83.75
Mt-Pleasant 43.60 -84.78
Clare 43.82 -84.77
Saginaw 43.42 -83.95
Create a private function list::dist() that takes two integers src and dst, and calculates the distance between the cities at index src and dst. Hint:
Distance = Sqrt((latsrc-latdist)^2+(longsrc-longdist)^2)
Update the display() function so it calls the distance() function to display the distance between each city and the first city in the list. Uncomment the section in main() for steps 10.6-7. Implement the list::sort() function in two parts:
Output should look like this:
Enter file name: Cities01.txt
10 Cities
City Lat Long Dist
-------------- ------ ------ ------
Lansing 42.73 -84.55 0.00
Detroit 42.33 -83.04 1.56
Flint 43.01 -83.68 0.91
Grand-Rapids 42.96 -85.66 1.13
Jackson 42.27 -84.47 0.47
Kalamazoo 42.23 -85.55 1.12
Ann-Arbor 42.22 -83.75 0.95
Mt-Pleasant 43.60 -84.78 0.90
Clare 43.82 -84.77 1.11
Saginaw 43.42 -83.95 0.91
Enter home city: Lansing
City Lat Long Dist
-------------- ------ ------ ------
Lansing 42.73 -84.55 0.00
Jackson 42.27 -84.47 0.47
Mt-Pleasant 43.60 -84.78 0.90
Flint 43.01 -83.68 0.91
Saginaw 43.42 -83.95 0.91
Ann-Arbor 42.22 -83.75 0.95
Clare 43.82 -84.77 1.11
Kalamazoo 42.23 -85.55 1.12
Grand-Rapids 42.96 -85.66 1.13
Detroit 42.33 -83.04 1.56
In: Computer Science
A15: Capitalization and Treatment of Words
With Track Changes turned on, edit all the errors related to capitalization and treatment of words in the following sentences. Then, in the box to the right of each sentence, note the section number from the Chicago Manual of Style that supports each edit. I’ve included an example for you so you can see how I would like your answers formatted. All of the answers come from Chapter 8 of the Chicago Manual of Style. I’ll give you 0.5 points for each correct edit and 0.5 points for your comment that notes the correct section of the manual and provides a short explanation. Note: all sentences require editing in this assignment.
Example:
|
My gourmet friend Lindsay makes her own Polish polish sausage from scratch. |
8.61 |
|
Sentence |
Chicago Section |
|
1. Although he is a Senior in college, his mother does all of his laundry. |
|
|
2. Because he was born in 1945, James is actually not a Baby Boomer. |
|
|
3. Shirley plans to take a cruise to the caribbean sea. |
|
|
4. Dr. Roberts is a native of the desert southwest. |
|
|
5. Although Charles Schultz has passed away, his comic strip Peanuts still runs. |
|
|
6. My favorite Shakespearean tragedy is Othello. |
|
|
7. One of the greatest poems in English is Keats’s Ode on a Grecian Urn. |
|
|
8. I always buy flowers for the secretaries on administrative professionals day. |
|
|
9. My friend Duncan has a BS in Structural Engineering. |
|
|
10. President Lyndon Johnson started the war on poverty in 1964, but we haven’t very much progress yet. |
|
|
1. Chicago’s home insurance building, dating from 1885, is considered the world’s first skyscraper. |
|
|
2. Legend has it that if one drinks water from the hassyampa river, he or she will never tell the truth again. |
|
|
P.D. James wrote Children of Men, which was adapted into an excellent film. |
|
|
(Hint: There are two errors in this sentence, and you’ll need to reference two different sections of Chicago) Omar Bradley was a General of the Army, which is a five-star rank. |
|
|
When my taxes are computed, I’m going to owe the Federal Government about a grand. |
|
|
He frequently buys on EBay stamps for his US collection. |
|
|
I once published a sonnet in the Gila Bend Journal of Poetry. |
|
|
Since rivers have two sides, how do the Parisians know which is the left bank? |
|
|
Have you ever looked closely at a map of the Amazon Basin? |
|
|
To get to I-35 from my house, I drive west on university road. |
In: Computer Science
Please explain why bond prices are subject to changes in interest rates.
Describe the characteristics of a bond and provide an example of a firm or government entity that has recently issued (sold) these securities.
Need 300 words discussions
In: Finance
1. Over history, the institution of marriage in the U.S. has undergone many changes. In detail, describe the landmark styles of marriage and how they differ from each other (hint: institutional, companionate, and individualized marriage).
2. For each style of marriage, describe the cultural context that influenced marriage in that era. Based on current trends, how do you think marriage styles will change in the future?
this is for my Family And Consumer Studies FCS 2400 course
In: Psychology
C++
Write a program that reads a line of text, changes each uppercase letter to lowercase, and places each letter both in a queue and onto a stack. The program should then verify whether the line of text is a palindrome (a set of letters or numbers that is the same whether read forward or backward). Please use a Queue Class and Stack class.
In: Computer Science
I have attempted to implement some changes to my source code and was unable to succefully implement there are (two) changes. I am in the learning process so comments help in the learning curve so if possible leave comments.
PLEASE DONT CHANGE ANY OF THE SOURCE CODE - unless needed to implement the changes.
* Change the program so that the user can choose to either check if a password is valid or have the program randomly generate a password that is valid.
* Add the functionality to generate a valid password, display this password and end the program.
SOURCE CODE PROVIDED BELOW
import java.util.Scanner;
public class PasswordChecker {
public static void main(String[] args) {
Scanner keyboard = new
Scanner(System.in);
String password;
int uppers = 0;
int lowers = 0;
int numbers = 0;
int special = 0;
int length = 0;
System.out.println("Enter your
password: ");
System.out.println("Rules:
");
System.out.println("* 9 to 30
characters in length");
System.out.println("* contain at
least one uppercase letter (A - Z)");
System.out.println("* contain at
least one lowercase letter (a - z)");
System.out.println("* contain at
least one number digit (0 - 9)");
System.out.println("* contain at
least one special character (# @ $ % + = )");
password =
keyboard.nextLine();
length = password.length();
if ((length < 9) || (length >
30)) {
System.out.println("Please re-enter password, keep in mind more
than 9 char and less than 30");
}
else
{
for(int i = 0; i
< length; i++) {
if(Character.isUpperCase(password.charAt(i)))
uppers++;
else if
(Character.isLowerCase(password.charAt(i)))
lowers++;
else if
(Character.isDigit(password.charAt(i)))
numbers++;
else if
(specialCompare(password.charAt(i)))
special++;
}
}
if((uppers == 0) || (lowers == 0)
|| (numbers == 0) || (special == 0))
System.out.println("Password is missing one of the
requirements");
else
System.out.println("Good password");
}//End main
static boolean specialCompare(char a) {
switch(a) {
case '@':
case '#':
case '$':
case '%':
case '+':
case '=':
return
true;
}
return false;
}//End specialCompare
}//End class
In: Computer Science
37. Based on_____, changes in the interest rate bring the money market into equilibrium.
a. classical theory, but not liquidity preference theory.
b. neither liquidity preference theory nor classical theory.
c. liquidity preference theory, but not classical theory.
d. both liquidity preference theory and classical theory
38. A housing market boom may lead to ____
a. increases in aggregate supply, which the center bank could offset by increasing the money supply.
b. increases in aggregate demand, which the center bank could offset by decreasing the money supply.
c. increases in aggregate supply, which the center bank could offset by decreasing the money supply.
d. increases in aggregate demand, which the center bank could offset by increasing the money supply.
40. During the World War II, both the price level and real output increased in the U.S. If we know that during this period, the long-run aggregate supply curve shifted right because of the war, then what would have to have happened to aggregate demand so that we could observe these changes in price and output?
a. It would have to have shifted right by less than aggregate supply shifted
b. It would have to have to shifted right by more than aggregate supply shifted.
c. It would have to have shifted left by less than aggregate supply shifted
d. It would have to have to shifted left by more than aggregate supply shifted.
In: Economics
What permeability changes would you expect to occur at the postsynaptic neuron to result in hyperpolarization?
(P=permeability)
|
A. increased P Na+ and/or P K+ |
||
|
B. increased P K+ and/or P Cl- |
||
|
C. increased P Ca++ |
||
|
D. increase P Na+ |
||
|
E. none of these answers |
In: Anatomy and Physiology
The legal landscape is perpetually changing. Psychologists must remain abreast of these changes to avoid potentially damaging issues to individuals and careers. In this assignment, you will consider the current federal and state legal issues discussed in the last two modules and their influence on psychology ethics.
A detailed explanation of the issue.
A discussion of how the issue influences psychology ethics from an objective (scholarly) perspective.
A discussion of how the issue influences psychology ethics from a subjective (personal) perspective.
A discussion of how, if at all, the issue is influenced by current psychology ethics.
In: Psychology