lab08/build.bat
@echo off
cls
set DRIVE_LETTER=%1:
set PATH=%DRIVE_LETTER%\MinGW\bin;%DRIVE_LETTER%\MinGW\msys\1.0\bin;%DRIVE_LETTER%\MinGW\gtkmm3\bin;%DRIVE_LETTER%\MinGW\gtk\bin;c:\Windows;c:\Windows\system32
set PROJECT_PATH=.
make DRIVE_LETTER="%DRIVE_LETTER%" PROJECT_DIR="%PROJECT_PATH%"
lab08/CSC2110/CD.h
#if !defined CD_H
#define CD_H
#include "Song.h"
#include "Text.h"
using CSC2110::String;
#include "ListArray.h"
using CSC2110::ListArray;
namespace CSC2110
{
class CD
{
private:
String* artist;
String* title;
int year;
int rating;
int num_tracks;
ListArray<Song>* songs;
public:
CD(String* artist, String* title, int year, int rating, int num_tracks);
virtual ~CD();
String* getKey();
void addSong(String* title, String* length);
void displayCD();
static ListArray<CD>* readCDs(const char* file_name);
static int compare_items(CD* one, CD* two);
static int compare_keys(String* sk, CD* cd);
static char getRadixChar(CD* cd, int index); //1-based
};
}
#endif
lab08/CSC2110/Double.h
#if !defined (DOUBLE_H)
#define DOUBLE_H
namespace CSC2110
{
class Double
{
private:
double value;
public:
Double(double val);
~Double();
double getValue();
};
}
#endif
lab08/CSC2110/HighPerformanceCounter.h
#if !defined (HIGHPERFORMANCECOUNTER_H)
#define HIGHPERFORMANCECOUNTER_H
namespace CSC2110
{
class HighPerformanceCounter
{
private:
double micro_spt; //micro_seconds per tick
HighPerformanceCounter();
static HighPerformanceCounter* hpc;
static int getTicksPerSecond();
public:
virtual ~HighPerformanceCounter();
static HighPerformanceCounter* getHighPerformanceCounter();
int getCurrentTimeInTicks();
double getTimeDifferenceInMicroSeconds(int start_time, int end_time);
};
}
#endif
lab08/CSC2110/Integer.h
#if !defined (INTEGER_H)
#define INTEGER_H
namespace CSC2110
{
class Integer
{
private:
int value;
public:
Integer(int val);
virtual ~Integer();
int getValue();
};
}
#endif
lab08/CSC2110/Keyboard.h
#if !defined KEYBOARD_H
#define KEYBOARD_H
#include "Text.h"
using CSC2110::String;
#include <string>
using namespace std;
namespace CSC2110
{
class Keyboard
{
private:
Keyboard();
public:
virtual ~Keyboard();
static Keyboard* getKeyboard();
//pre: the string (character literal) that will prompt the user for input
//post: the input read from the keyboard interpreted as an int is returned
int readInt(string prompt);
int getValidatedInt(string prompt, int min, int max);
//pre: the string that will prompt the user for input
//post: the input read from the keyboard interpreted as a double is returned
double readDouble(string prompt);
double getValidatedDouble(string prom ...
TO UNDERSTAND about stdio.h in C.
TO LEARN ABOUT Math.h in C.
To learn about ctype.h in C.
To understand stdlib.h in c.
To learn about conio.h in c.
To learn about String.h in c.
TO LEARN ABOUT process.h in C.
I am Moffat K. I am a C++ Programming Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from London, UK. I have been helping students with their homework for the past 6 years. I solve homework related to C++ Programming.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Programming Homework.
Implementing virtual machines in go & c 2018 reduxEleanor McHugh
An updated version of my talk on virtual machine cores comparing techniques in C and Go for implementing dispatch loops, stacks & hash maps.
Lots of tested and debugged code is provided as well as references to some useful/interesting books.
lab08/build.bat
@echo off
cls
set DRIVE_LETTER=%1:
set PATH=%DRIVE_LETTER%\MinGW\bin;%DRIVE_LETTER%\MinGW\msys\1.0\bin;%DRIVE_LETTER%\MinGW\gtkmm3\bin;%DRIVE_LETTER%\MinGW\gtk\bin;c:\Windows;c:\Windows\system32
set PROJECT_PATH=.
make DRIVE_LETTER="%DRIVE_LETTER%" PROJECT_DIR="%PROJECT_PATH%"
lab08/CSC2110/CD.h
#if !defined CD_H
#define CD_H
#include "Song.h"
#include "Text.h"
using CSC2110::String;
#include "ListArray.h"
using CSC2110::ListArray;
namespace CSC2110
{
class CD
{
private:
String* artist;
String* title;
int year;
int rating;
int num_tracks;
ListArray<Song>* songs;
public:
CD(String* artist, String* title, int year, int rating, int num_tracks);
virtual ~CD();
String* getKey();
void addSong(String* title, String* length);
void displayCD();
static ListArray<CD>* readCDs(const char* file_name);
static int compare_items(CD* one, CD* two);
static int compare_keys(String* sk, CD* cd);
static char getRadixChar(CD* cd, int index); //1-based
};
}
#endif
lab08/CSC2110/Double.h
#if !defined (DOUBLE_H)
#define DOUBLE_H
namespace CSC2110
{
class Double
{
private:
double value;
public:
Double(double val);
~Double();
double getValue();
};
}
#endif
lab08/CSC2110/HighPerformanceCounter.h
#if !defined (HIGHPERFORMANCECOUNTER_H)
#define HIGHPERFORMANCECOUNTER_H
namespace CSC2110
{
class HighPerformanceCounter
{
private:
double micro_spt; //micro_seconds per tick
HighPerformanceCounter();
static HighPerformanceCounter* hpc;
static int getTicksPerSecond();
public:
virtual ~HighPerformanceCounter();
static HighPerformanceCounter* getHighPerformanceCounter();
int getCurrentTimeInTicks();
double getTimeDifferenceInMicroSeconds(int start_time, int end_time);
};
}
#endif
lab08/CSC2110/Integer.h
#if !defined (INTEGER_H)
#define INTEGER_H
namespace CSC2110
{
class Integer
{
private:
int value;
public:
Integer(int val);
virtual ~Integer();
int getValue();
};
}
#endif
lab08/CSC2110/Keyboard.h
#if !defined KEYBOARD_H
#define KEYBOARD_H
#include "Text.h"
using CSC2110::String;
#include <string>
using namespace std;
namespace CSC2110
{
class Keyboard
{
private:
Keyboard();
public:
virtual ~Keyboard();
static Keyboard* getKeyboard();
//pre: the string (character literal) that will prompt the user for input
//post: the input read from the keyboard interpreted as an int is returned
int readInt(string prompt);
int getValidatedInt(string prompt, int min, int max);
//pre: the string that will prompt the user for input
//post: the input read from the keyboard interpreted as a double is returned
double readDouble(string prompt);
double getValidatedDouble(string prom ...
TO UNDERSTAND about stdio.h in C.
TO LEARN ABOUT Math.h in C.
To learn about ctype.h in C.
To understand stdlib.h in c.
To learn about conio.h in c.
To learn about String.h in c.
TO LEARN ABOUT process.h in C.
I am Moffat K. I am a C++ Programming Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from London, UK. I have been helping students with their homework for the past 6 years. I solve homework related to C++ Programming.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Programming Homework.
Implementing virtual machines in go & c 2018 reduxEleanor McHugh
An updated version of my talk on virtual machine cores comparing techniques in C and Go for implementing dispatch loops, stacks & hash maps.
Lots of tested and debugged code is provided as well as references to some useful/interesting books.
Implementing Software Machines in Go and CEleanor McHugh
Early draft of a tutorial on techniques for implementing virtual machines and language interpreters. Contains example programs for functional stacks and despatch loops.
Need help getting past an error in C++! I have all my code pasted down.docxJason0x0Scottw
Need help getting past an error in C++!
I have all my code pasted down below. My issue is that I'm trying to call the functions I have in main, but they don't do anything as they are now. I'm almost positive I need to call them with parenthesis, but putting them in always results with an error saying "A nonstatic member reference must be relative to a specific object."
Below will be the source file, then the header file I made all the functions in. Thanks in advance, y'all are the best!
(Source.ccp)
#include "Header.h"
int main() {
NoteList noteList;
noteList.loadData("input.txt");
bool finish = false;
int choice;
while (finish != true) {
cout << "\n** Menu **\n"
<< "1. LIST NOTES BY DATE\n"
<< "2. LIST NOTES BY COMPOSER\n"
<< "3. DELETE MOST RECENT NOTE\n"
<< "4. EXIT\n" << endl;
cin >> choice;
if (choice == 1)
{
&NoteList::listNotesByDate();
}
else if (choice == 2)
{
&NoteList::listNotesByComposer;
}
else if (choice == 3)
{
&NoteList::deleteFrontNote;
}
else if (choice == 4)
{
cout << "\nOperations ended";
finish = true;
}
else
{
cout << "\nInput not recognized. Please choose a number between 1 and 4." << endl;
}
}
return 0;
}
(Header.h)
#pragma once
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class Date {
private:
int month, day, year;
public:
Date() : month(0), day(0), year(0) {}
void setDate(string strDate) {
month = stoi(strDate.substr(0, 2));
day = stoi(strDate.substr(3, 2));
year = stoi(strDate.substr(6, 4));
}
string showDate() {
return to_string(month) + "-" + to_string(day) + "-" + to_string(year);
}
int calculateDays() {
return year * 365 + month * 31 + day;
}
};
class Note {
private:
string composer;
Date date;
string subject;
string body;
public:
Note(string c, string d, string s, string b) : composer(c), subject(s), body(b) {
date.setDate(d);
}
string getComposer() {
return composer;
}
Date getDate() {
return date;
}
string getSubject() {
return subject;
}
string getBody() {
return body;
}
};
struct noteNode {
Note note;
noteNode* next;
};
class NoteList {
private:
noteNode* head;
public:
NoteList() : head(nullptr) {}
void loadData(const char* filename) {
ifstream file(filename);
if (file.is_open()) {
string line;
string composer, date, subject, body;
while (getline(file, line)) {
if (line == "##########") {
Note note = Note(composer, date, subject, body);
addNote(note);
composer.clear();
date.clear();
subject.clear();
body.clear();
}
else if (line.substr(0, 10) == "COMPOSER: ") {
composer = line.substr(10);
}
else if (line.substr(0, 6) == "DATE: ") {
date = line.substr(6);
}
else if (line.substr(0, 9) == "SUBJECT: ") {
subject = line.substr(9);
}
else {
body += line + "\n";
}
}
file.close();
}
else {
cerr << "Unable to open file " << filename << endl;
}
}
void addNote(Note note) {
noteNode* newNode = new noteNode{note, head};
newNode->note = note;
newNode->next = head;
head =.
En vieux bourlingueur du langage Swift, Grégoire Lhotellier viendra nous présenter les séquences et les collections du nouveau langage d’Apple. Il nous briefera sur l’essentiel de ce qu’il faut en savoir et ce qu’elles changent par rapport à leurs équivalent Objective-C.
So I am writing a CS code for a project and I keep getting cannot .pdfezonesolutions
So I am writing a CS code for a project and I keep getting \"cannot open file\" I know I put it into
my code, but I don\'t know why it won\'t execute after i input ./a.out I put in gcc -Wall
contents3.c and no errors or warnings pop up. So I figure everything is working right. But after
that, I get \"Cannot open file\". So I am wondering what I can do to get this settled out properly. I
am putting the outcome of the project and my code. Please someone help me!
#include
#include
#include
#include
#include
#include
int len = 0;
int sp = 0;
int lwrcaseCount = 0;
int uprcaseCount = 0;
int digitCount = 0;
int specialCount = 0;
char data[200];
int frequency[84];
int sortFrequency[84][2];
char string[] =
\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&\'()*+,-
./:;<=>?@[/]^_`{|}~\";
//printf(\"\ \");
//To sort based on frequency of characters
/*void sort()
{
int max, loc, temp, x, y;
//Loops till end - 1 position of the frequency array
for(x = 0; x <= 84 - 1; x++)
{
//Initializes the max to the x position of the frequency array assuming it as maximum
max = frequency[x];
//Initializes of loc to x assuming location x contains the maximum value
loc = x;
//Loops through x + 1 to length - 1 of frequency array
for(y = x + 1; y <= 95 -1; y++)
{
//If current position of the frequency of the array is greater than the max
//then update the max with the current value of frequency and update the loc
if(frequency[y] > max)
{
max = frequency[y];
loc = y;
}//end of if
}//end of for loop
//If loc is not x then swap
if(loc != x)
{
temp = frequency[x];
frequency[x] = frequency[loc];
frequency[loc] = temp;
}//end of if
//Store the location of the maximum value in the zero column position of row x
sortFrequency[x][0]= loc;
//Store the maximum value in the first column position of row x
sortFrequency[x][1] = max;
}//end of for loop
}//end of function*/
void sort()
{
for(int i = 0; i < 84; i++)
{
sortFrequency[i][0] = i;
sortFrequency[i][1] = frequency[i];
}
for(int i = 0; i < 84-1; i++)
for(int j = 0; j < 84-i-1; j++)
if(sortFrequency[j][1] < sortFrequency[j+1][1])
{
int temp = sortFrequency[j][1];
sortFrequency[j][1] = sortFrequency[j+1][1];
sortFrequency[j+1][1] = temp;
temp = sortFrequency[j][0];
sortFrequency[j][0] = sortFrequency[j+1][0];
sortFrequency[j+1][0] = temp;
}
}
//To count frequency of each character
void frequencyCount()
{
int c, d;
//Loops till the length of the inputed data
for(c = 0; c < len; c++)
{
//Loops from 33 to 126 which is the ascii values of required characters range
for(d = 0; d < 84; d++)
{
//If the data in the current position is equal to the acii value
if(data[c] == string[d])
//Frequency 0 position is equal to 33 ascii.
//So 33 is deducted
frequency[d]++;
}//end of for loop
}//end of for loop
}//End of function
//Initializes the frequency array to zero
void initialize()
{
int c;
for(c = 0; c < 84; c++)
frequency[c] = 0;
}
//Read the file which contains data
void readFile()
{
//File pointer created
FILE *fptr;
char ch;
//Fi.
Implementing Software Machines in C and GoEleanor McHugh
The next iteration of the talk I gave at Progscon, this introduces examples of Map implementation (useful for caches etc.) and outlines for addition of processor core code in a later talk.
A class that automates conversion from a C++ recursive function to an iterative function. It allow the recursive function to preserve its structure by reproducing the "call stack" on an std::stack. The examples use combinatorics to illustrate usage.
It is an attempt to make the students of IT understand the basics of programming in C in a simple and easy way. Send your feedback for rectification/further development.
please write a short essay to address the following questions. Lengt.docxDIPESH30
please write a short essay to address the following questions. Length: 500 word count to the minimum.
“Blogs, Twitter, Facebook, and a host of other news and social-media sites have allowed average citizens to become newsmakers. Is this a good or bad thing? Is the increase in citizen journalism leading to inaccuracies in reporting? Or can we trust that Americans will “consider the source” and verify any questionable information they read on a blog?”
Requirements:
1.Word count: 500.
2.Submissions must be in Word format (doc, docx) or Rich Text format (rtf). Attached file sent to my email will not be graded.
3.VeriCite has been activated to prevent plagiarism and no credit will be issued if Similarity Index points to 20% or higher.
.
please write a diary entry from the perspective of a French Revoluti.docxDIPESH30
please write a diary entry from the perspective of a French Revolutionary of the Third Estate (bourgeoisie, worker, or peasant), a member of the First Estate (clergy) or a member of the Second Estate (nobles). Your entry should have a well established mood, or writing that evokes certain feelings or emotions in readers through words and descriptions. Some examples of mood through setting, diction, and tone can be found
HERE
.
In addition, your journal should incorporate at least
THREE
of the following vocabulary terms:
Louis XVI
Estates-General
National Assembly
Tennis Court Oath
estate (First, Second, Third)
The Enlightenment
Great Fear
.
More Related Content
Similar to lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx
Implementing Software Machines in Go and CEleanor McHugh
Early draft of a tutorial on techniques for implementing virtual machines and language interpreters. Contains example programs for functional stacks and despatch loops.
Need help getting past an error in C++! I have all my code pasted down.docxJason0x0Scottw
Need help getting past an error in C++!
I have all my code pasted down below. My issue is that I'm trying to call the functions I have in main, but they don't do anything as they are now. I'm almost positive I need to call them with parenthesis, but putting them in always results with an error saying "A nonstatic member reference must be relative to a specific object."
Below will be the source file, then the header file I made all the functions in. Thanks in advance, y'all are the best!
(Source.ccp)
#include "Header.h"
int main() {
NoteList noteList;
noteList.loadData("input.txt");
bool finish = false;
int choice;
while (finish != true) {
cout << "\n** Menu **\n"
<< "1. LIST NOTES BY DATE\n"
<< "2. LIST NOTES BY COMPOSER\n"
<< "3. DELETE MOST RECENT NOTE\n"
<< "4. EXIT\n" << endl;
cin >> choice;
if (choice == 1)
{
&NoteList::listNotesByDate();
}
else if (choice == 2)
{
&NoteList::listNotesByComposer;
}
else if (choice == 3)
{
&NoteList::deleteFrontNote;
}
else if (choice == 4)
{
cout << "\nOperations ended";
finish = true;
}
else
{
cout << "\nInput not recognized. Please choose a number between 1 and 4." << endl;
}
}
return 0;
}
(Header.h)
#pragma once
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
class Date {
private:
int month, day, year;
public:
Date() : month(0), day(0), year(0) {}
void setDate(string strDate) {
month = stoi(strDate.substr(0, 2));
day = stoi(strDate.substr(3, 2));
year = stoi(strDate.substr(6, 4));
}
string showDate() {
return to_string(month) + "-" + to_string(day) + "-" + to_string(year);
}
int calculateDays() {
return year * 365 + month * 31 + day;
}
};
class Note {
private:
string composer;
Date date;
string subject;
string body;
public:
Note(string c, string d, string s, string b) : composer(c), subject(s), body(b) {
date.setDate(d);
}
string getComposer() {
return composer;
}
Date getDate() {
return date;
}
string getSubject() {
return subject;
}
string getBody() {
return body;
}
};
struct noteNode {
Note note;
noteNode* next;
};
class NoteList {
private:
noteNode* head;
public:
NoteList() : head(nullptr) {}
void loadData(const char* filename) {
ifstream file(filename);
if (file.is_open()) {
string line;
string composer, date, subject, body;
while (getline(file, line)) {
if (line == "##########") {
Note note = Note(composer, date, subject, body);
addNote(note);
composer.clear();
date.clear();
subject.clear();
body.clear();
}
else if (line.substr(0, 10) == "COMPOSER: ") {
composer = line.substr(10);
}
else if (line.substr(0, 6) == "DATE: ") {
date = line.substr(6);
}
else if (line.substr(0, 9) == "SUBJECT: ") {
subject = line.substr(9);
}
else {
body += line + "\n";
}
}
file.close();
}
else {
cerr << "Unable to open file " << filename << endl;
}
}
void addNote(Note note) {
noteNode* newNode = new noteNode{note, head};
newNode->note = note;
newNode->next = head;
head =.
En vieux bourlingueur du langage Swift, Grégoire Lhotellier viendra nous présenter les séquences et les collections du nouveau langage d’Apple. Il nous briefera sur l’essentiel de ce qu’il faut en savoir et ce qu’elles changent par rapport à leurs équivalent Objective-C.
So I am writing a CS code for a project and I keep getting cannot .pdfezonesolutions
So I am writing a CS code for a project and I keep getting \"cannot open file\" I know I put it into
my code, but I don\'t know why it won\'t execute after i input ./a.out I put in gcc -Wall
contents3.c and no errors or warnings pop up. So I figure everything is working right. But after
that, I get \"Cannot open file\". So I am wondering what I can do to get this settled out properly. I
am putting the outcome of the project and my code. Please someone help me!
#include
#include
#include
#include
#include
#include
int len = 0;
int sp = 0;
int lwrcaseCount = 0;
int uprcaseCount = 0;
int digitCount = 0;
int specialCount = 0;
char data[200];
int frequency[84];
int sortFrequency[84][2];
char string[] =
\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&\'()*+,-
./:;<=>?@[/]^_`{|}~\";
//printf(\"\ \");
//To sort based on frequency of characters
/*void sort()
{
int max, loc, temp, x, y;
//Loops till end - 1 position of the frequency array
for(x = 0; x <= 84 - 1; x++)
{
//Initializes the max to the x position of the frequency array assuming it as maximum
max = frequency[x];
//Initializes of loc to x assuming location x contains the maximum value
loc = x;
//Loops through x + 1 to length - 1 of frequency array
for(y = x + 1; y <= 95 -1; y++)
{
//If current position of the frequency of the array is greater than the max
//then update the max with the current value of frequency and update the loc
if(frequency[y] > max)
{
max = frequency[y];
loc = y;
}//end of if
}//end of for loop
//If loc is not x then swap
if(loc != x)
{
temp = frequency[x];
frequency[x] = frequency[loc];
frequency[loc] = temp;
}//end of if
//Store the location of the maximum value in the zero column position of row x
sortFrequency[x][0]= loc;
//Store the maximum value in the first column position of row x
sortFrequency[x][1] = max;
}//end of for loop
}//end of function*/
void sort()
{
for(int i = 0; i < 84; i++)
{
sortFrequency[i][0] = i;
sortFrequency[i][1] = frequency[i];
}
for(int i = 0; i < 84-1; i++)
for(int j = 0; j < 84-i-1; j++)
if(sortFrequency[j][1] < sortFrequency[j+1][1])
{
int temp = sortFrequency[j][1];
sortFrequency[j][1] = sortFrequency[j+1][1];
sortFrequency[j+1][1] = temp;
temp = sortFrequency[j][0];
sortFrequency[j][0] = sortFrequency[j+1][0];
sortFrequency[j+1][0] = temp;
}
}
//To count frequency of each character
void frequencyCount()
{
int c, d;
//Loops till the length of the inputed data
for(c = 0; c < len; c++)
{
//Loops from 33 to 126 which is the ascii values of required characters range
for(d = 0; d < 84; d++)
{
//If the data in the current position is equal to the acii value
if(data[c] == string[d])
//Frequency 0 position is equal to 33 ascii.
//So 33 is deducted
frequency[d]++;
}//end of for loop
}//end of for loop
}//End of function
//Initializes the frequency array to zero
void initialize()
{
int c;
for(c = 0; c < 84; c++)
frequency[c] = 0;
}
//Read the file which contains data
void readFile()
{
//File pointer created
FILE *fptr;
char ch;
//Fi.
Implementing Software Machines in C and GoEleanor McHugh
The next iteration of the talk I gave at Progscon, this introduces examples of Map implementation (useful for caches etc.) and outlines for addition of processor core code in a later talk.
A class that automates conversion from a C++ recursive function to an iterative function. It allow the recursive function to preserve its structure by reproducing the "call stack" on an std::stack. The examples use combinatorics to illustrate usage.
It is an attempt to make the students of IT understand the basics of programming in C in a simple and easy way. Send your feedback for rectification/further development.
Similar to lab03build.bat@echo offclsset DRIVE_LETTER=1set.docx (20)
please write a short essay to address the following questions. Lengt.docxDIPESH30
please write a short essay to address the following questions. Length: 500 word count to the minimum.
“Blogs, Twitter, Facebook, and a host of other news and social-media sites have allowed average citizens to become newsmakers. Is this a good or bad thing? Is the increase in citizen journalism leading to inaccuracies in reporting? Or can we trust that Americans will “consider the source” and verify any questionable information they read on a blog?”
Requirements:
1.Word count: 500.
2.Submissions must be in Word format (doc, docx) or Rich Text format (rtf). Attached file sent to my email will not be graded.
3.VeriCite has been activated to prevent plagiarism and no credit will be issued if Similarity Index points to 20% or higher.
.
please write a diary entry from the perspective of a French Revoluti.docxDIPESH30
please write a diary entry from the perspective of a French Revolutionary of the Third Estate (bourgeoisie, worker, or peasant), a member of the First Estate (clergy) or a member of the Second Estate (nobles). Your entry should have a well established mood, or writing that evokes certain feelings or emotions in readers through words and descriptions. Some examples of mood through setting, diction, and tone can be found
HERE
.
In addition, your journal should incorporate at least
THREE
of the following vocabulary terms:
Louis XVI
Estates-General
National Assembly
Tennis Court Oath
estate (First, Second, Third)
The Enlightenment
Great Fear
.
Please write the definition for these words and provide .docxDIPESH30
Please write the definition for these words and
provide two
examples
for each one
The definition should relate to “linguistic form“ / grammar
See attached file. you have
three hours and an half
to do the assignemnt
.
Please view the filmThomas A. Edison Father of Invention, A .docxDIPESH30
Please view the film:
Thomas A. Edison: Father of Invention
, A & E Television (New York, NY: A & E Television Networks, 1996); Available on the Hagerty Library catalogue at: http://records.library.drexel.edu/record=b2133926~S9
And discuss:
Edison is portrayed rather herocially in this film, what would you do to present a more balanced view of Edison the man and inventor? Based on my lecture, discuss why or why not Edison should be considered the creator of the light bulb?
.
Please watch the clip from the movie The Break Up. Then reflect w.docxDIPESH30
Please watch the clip from the movie "The Break Up." Then reflect who you think is most at fault and why.
Then I would you like to think about a conflict you have had and think about what could have been done differently to resolve it.
Write a one page paper (double spaced)
https://www.youtube.com/watch?v=_bqhVqTuFO4
.
please write a report on Social Media and ERP SystemReport should.docxDIPESH30
please write a report on Social Media and ERP System:
Report should be a detail study on social media, effects of social media on business.Use of ERP Systems in social media and its benefits.During presentatio the students should present the use of ERP Systems in the social media aspect.
pages: 15
font size: 11
spaces: 1.5
please see attached file
due date tomorrow, within 24 hour
.
Please write 200 wordsHow has the healthcare delivery system chang.docxDIPESH30
Please write 200 words
How has the healthcare delivery system changed?
For what types of patients and what types of care does each of the systems deliver? Would a patient have a need for more than one system? When (give examples and explain)?
What are the regulations related to the medical staff? What purpose do these regulations serve?
.
Please view the documentary on Typhoid Mary at httpswww..docxDIPESH30
Please view the documentary on Typhoid Mary at:
https
://
www
.
youtube
.com/watch?v=
Mc
8O9
EnAuLo
And read:
- Priscilla Wald, “Cultures and Carriers: "Typhoid Mary" and the Science of Social Control,”
Social Text
, No. 52/53,
Queer
Transexions
of Race, Nation, and Gender
(Autumn - Winter, 1997), pp. 181-214; Available in the Readings Folder and on JSTOR at:
http
://
www
.
jstor
.
org
/stable/466739
Then discuss:
Wald discusses how the concept of "social control" relates or is exemplified by the Mary
Mallon
ca
se
. Choose one of the aspects of Wald's argument and discuss how it relates to the Typhoid Mary documentary. Do these help us understand the significance the 'Typhoid Mary' case has for the history of medicine, or for the treatment of epidemics today?
.
Please use the two attachments posted to complete work. Detailed in.docxDIPESH30
Please use the two attachments posted to complete work. Detailed instructions, notes / additional information, links and some resources are listed therein.
#1. Discussion due Thursday 12/11/14 Noon
#2. Paper due Saturday 12/13/14 Noon
******12/11/14 Edit to add additional research sources for you if need for part2 of assignment.
Davidson, W. H. (1979). FACTOR ENDOWMENT, INNOVATION AND INTERNATIONAL TRADE THEORY.
Kyklos
,
32
(4), 764.
Handlin, A. H. (2011).
Government Grief : How to Help Your Small Business Survive Mindless Regulation, Political Corruption and Red Tape
. Santa Barbara, Calif: Praeger.
Warren, R. C. (2003). The evolution of business legitimacy.
European Business Review,
15
(3), 153. Retrieved from http://search.proquest.com/docview/225421529?accountid=8289
.
Please use the sources in the outline (see photos)The research.docxDIPESH30
Please use the sources in the outline (see photos)
The research essay is to be 12 pages, typed, double-spaced. 10-12 sources are to be used. It is to be on a social policy area and may focus on Canada, or Canada in comparative perspective.
1.
Discuss the National Child Benefit, introduced in 1997. Has this measure been effective in reducing child poverty? Can this measure be seen as the further extension of neoliberalism, or as a new form of state-provided social investment?
Please make a clear and wordy thesis (highlight this in red) use notions of this thesis throughout the paper please. Clear and concise english as this is a university level paper.
Please include your own ideas as well as recommendations.
if a point is made please provide proof with the sources or readings
Please use APA FORMAT.
Please ensure that the paper follows the format suggested in the outline.
.
Please submit a minimum of five (5) detailed and discussion-provokin.docxDIPESH30
Please submit a minimum of five (5) detailed and discussion-provoking questions based on the recent reading assignments, video clips and the other websites assigned.
Only complete questions will earn credit. Therefore, it is important for you to think carefully about formulating the kinds of questions intended to stimulate conversations. Ask detailed and specific, rather than broad, general questions. Do not ask, for example, ‘When was the first Mission established in California?’ Instead, ask something like ‘What is the ideological agenda behind maintaining figures like Father Junipero Serra as heroic in California textbooks?’
Other examples include:
Does recent news media coverage of the “riots” in Baltimore, Ferguson and other cities promote a message that is pro-police? If not, how does it engender understanding of the root causes of many of the frustrations of local residents?
In the film “Banned in Arizona,” why does Superintendent Tom Horne argue in favor of “individualism” and why does he say that the Mexican American Studies program encourages radical thinking? What, if anything, is radical about the way those courses teach students in Tucson, Arizona?
If the U.S. reinstated a Vietnam War era-like military draft instead of relying upon the current all-volunteer force, would current public support for war change at all? If so, how?
Please consider these guidelines in composing your questions:
1. Make certain to ask at least one question from each source.
2. Ask questions about things that interest you.
3. Write your questions as though you were asking them to the entire class.
4. Be sure to make specific reference to the readings in each question. Many good questions require at least two sentences.
5. Try and use the questions to critique the author's opinion.
6. These homework questions should attempt to raise larger issues and---when possible---to relate the readings to issues in our current world.
"This week, I want us to think about the concept of
bias
, and its application in the places we consume information. This is tricky territory because even the very presentation of this unit is fraught with bias—my personal bias, or frame of reference. I’m going to ask you to read a collection of articles that I think are important, but they all clearly have a perspective and an agenda that comes from a particular worldview. So let’s get that out in the open. Maybe nothing in your liberal arts education is free from bias, but that does not mean we shy away from considering the information, ideas, arguments and critiques.
What is bias? For the purposes of our consideration, bias is really just about a set of values that can color or distort fair judgment. We can sometimes recognize obvious bias in others, especially when people use overtly discriminatory or offensive language, or have a clear political or ideological perspective that makes everything they present go through that lens. But more than anything else, I want us to think a.
Please think about the various learning activities you engaged in du.docxDIPESH30
Please think about the various learning activities you engaged in during this unit.
write one page summarizing the following:
Multiculturalism plays an important role in many schools today.
How can this be incorporated into everyday lessons related to health, safety, and nutrition?
How has your school (or your children’s school) incorporated multiculturalism into their lesson?
.
Please type out the question and answer it underneath. Each question.docxDIPESH30
Please type out the question and answer it underneath. Each question should be about a page long DOUBLE SPACED and cited.
Please use the articles that I PROVIDE!
Due date is this Sunday the 14th.
First two articles answer the questions 1 & 2 , the last article answers question 3
PLEASE FOLLOW INSTRUCTIONS
.
Please use the following technique-Outline the legal issues t.docxDIPESH30
Please use the following technique:
-
Outline the legal issues that you are going to discuss in your answer
-
Define the legal rules that are relevant to the question
-
Apply the legal rules to the facts of the question
-
Formulate a decision of which party should be successful
The use of headings for each relationship discussed is suggested.
Application of legal principles to the facts is the most important and often the hardest step. I am more interested in how you arrived at your answer, than the actual conclusions that you draw. Having said that, the “kitchen sink approach” is not suggested – i.e. spilling all of your knowledge that is vaguely related to the issue raised into your answer.
Please do not simply say, “Andrew is liable for negligence.” You must go through the analysis for why or why not a particular tort claim will be successful.
Use the language of the question.
Be as comprehensive and thorough as possible when responding to each issue – canvas all possible answers. If you have considered the application of a particular contractual concept, but after analysis, you have decided that it is not applicable, please go through your analysis.
If any possible remedies are available to either party, please identify with supporting reasons.
Assume for each relationship that the matter is being litigated in court,
not
through alternative dispute resolution.
DUE: TUESDAY MARCH 24
th
, 2015 at beginning of class
No midterms will be accepted after this date.
Tort Law Problem
Andrew Black is the owner of Confederation Mall (“Mall”) located in New Minas, Nova Scotia. Mr. Black leases out many retail spaces in the Mall to a wide range of businesses. He prides himself as a local success story. The people of New Minas truly admire his entrepreneurial success.
George Orange, owner of Guppy World, a pet fish store, has been a long-time tenant of Confederation Mall. Colin and Darren work for Mr. Orange. Colin was repairing a ceiling fan when he asked Darren to toss him a screwdriver, as Colin was up on a step-ladder at the time. Darren, standing 15 feet away, underhand tosses the screwdriver to Colin. Darren overshoots the toss and the screwdriver shatters a glass fish tank containing a piranha fish. At the same time a customer, Sally, was walking towards the check-out to purchase fish food, when she slipped on the water from the broken tank, fell to the floor and fractured her wrist. She is also bitten on the ankle by the piranha. When Mr. Orange tried to assist Sally, he smelled a strong smell of alcoholic beverage coming from her mouth. Colin noted that Sally appeared to be staggering slightly before falling.
Sally was transported to the hospital by paramedics. The doctor determines that Sally’s foot needs to be amputated due to the piranha bite and she needs to wear a cast on her wrist for 6-8 weeks due to the fracture.
Word of the piranha bite spreads like wild fire throughout the Mall. Evelyn, who suff.
Please use from these stratagies This homework will be to copyies .docxDIPESH30
Please use from these stratagies
This homework will be to copyies with different stratgies !!11
Rubrics
Revising Reading
RAFT
Quick write
Learning loge
KAMAL
Gallery walks
Data charts
All about book
Cubing Clusters Authors chair
Words Walks
.
PLEASE THOROUGHLY ANSWER THE FOLLOWING FIVE QUESTIONS BELOW IN.docxDIPESH30
PLEASE THOROUGHLY ANSWER THE FOLLOWING
FIVE
QUESTIONS BELOW IN A 500 Word Count Discussion
Contrast the dynamics between dominant cultures and subcultures either in a work setting or in society.
Explain why it is important to understand the impact of culture.
Give an example where you demonstrated your awareness and or openness to understanding a cultural difference.
Explain how these differences underscore the need for understanding diversity.
From the information given, develop guidelines for embracing diversity.
YOU MUST USE ONE CITED SCHOLARLY SOURCE. PROPERLY CITED IN APA FORM WITH AN REFERENCE PAGE ON THE BOTTOM. DO NOT USE WIKIPEDIA, THESAURUS, OR ENCYCLOPEDIA (THESE ARE NOT CITED SCHOLARLY SOURCES)
DO NOT TURN IN A PLAGIARIZED PAPER, WE WILL REPORT YOU.....
THIS PAPER IS DUE TODAY 12/11/2014.... 8 HOURS FROM NOW MAX NO LATER....SERIOUS INQUIRIES ONLY...DO NOT TAKE THIS PAPER IF YOU DO NOT KNOW THE TOPIC.....
.
Please share your thoughts about how well your employer, military .docxDIPESH30
Please share your thoughts about how well your employer, military base, or home responds to environmental concerns. Provide examples of some types.
1.
Issue 4
-
Re-Wilding
a. Explain what re-wilding is and how it became an issue.
b. Outline and discuss three main areas of disagreement between Josh Donlan and Rubenstein et al.
c. Which side do you agree with? Explain your answer.
Your response should be at least 200 words in length. All sources used, must be referenced; paraphrased and quoted material must have accompanying citations.
Put citation under each answer please
1.
Issue 5
-
Military Training and the Environment
a. Explain the history of military training and the environment.
b. Outline and discuss three main areas of disagreement between Benedict Cohen and Jamie Clark.
c. Which side do you agree with? Explain your answer.
Your response should be at least 200 words in length.
All sources used, must be referenced; paraphrased and quoted material must have accompanying citations.
Put citation under each answer please
1.
Issue 6
-
Carbon Emission Restrictions
a. Explain the history of carbon emissions and why the debate over carbon emissions exists.
b. Outline and discuss three main areas of disagreement between Paul Cicio and Eileen Claussen.
c. Which side do you agree with? Explain your answer.
Your response should be at least 200 words in length. All sources used, must be referenced; paraphrased and quoted material must have accompanying citations.
Put citation under each answer please
1.
Explain in your own words the Section 2017 initiative which Jamie Clark describes on. Then describe how you think Benedict Cohen would respond to Jamie Clark's presentation of Section 2017. Your response should be at least 200 words in length. as source material for your response. All sources used, must be referenced; paraphrased and quoted material must have accompanying citations.
Put citation under each answer please
Explain carbon trading, carbon offsets, and cap and trade. How are each similar? How are each different? Your response should be at least 200 words in length. as source material for your response. All sources used, , must be referenced; paraphrased and quoted material must have accompanying citations.
Put citation under each answer please
.
Please select and answer one of the following topics in a well-org.docxDIPESH30
Please select and answer one of the following topics in a well-organized and thoughtful paper (a minimum of 10 pages in
length). Your paper must contain at least five references in addition to the text. CSU requires that students use the APA
style for papers and projects. Therefore, the APA rules for formatting, quoting, paraphrasing, citing, and listing of sources
are to be followed.
1. If your employer's EMS is registered to ISO 14000, review the registration process. What were the most
difficult implementation activities? How long did it take? How easy was it to get worker buy-in and
participation? Cost? Others.
.
Please see the attachment for the actual work that is require. This.docxDIPESH30
Please see the attachment for the actual work that is require. This will be due on Sunday Nov 9, 2014.
THIS ISTHE CASE STUDY ATTACHED IS THE DIRECTIONS ON OW TO COMPLETE THE TASK.
Case Study Analysis
When it comes to planning events how many of us take the proper steps and put in the time and how many of us wait till the last minute to plan our event? What's the outcome of an event that has had the proper planning? Usually, a properly planned event is a huge success, and people leave-taking away information that will help them either improve, grow as a person or be successful at their job. People who try to plan events without taking the proper steps find themselves running into many problems along the way. Before they know it, they are out of time to fix any issues or problems that arise. Running out of time can lead to frustration, panic, and eventually the thought of “what am I going to do". Even though the steps to planning an event can be time-consuming, proper planning can ease frustration and anxiety, and lead to a successful event. Proper planning can eliminate the “What am I going to do” question.
Background
In the case study, Carl Robins did not plan for his event very well. He hired 15 new trainees and wanted to schedule a new hire orientation on June 15
th
. His goal was to have the new hires working by July. Carl had only been at his job for six months, and this was his first recruitment effort, so it is crucial for this event to work in Carl’s favor. Carl was contacted by Monica Carrolls, the soon to be Supervisor of the new hires, on May 15
th
. Monica was following up with Carl on how the planning for his orientation was going. She asked him about physicals, drug tests, the training schedule, orientation, manuals, and policy booklets. Carl told Monica that everything would be fine and ready to go in time for orientation. After Memorial Day, Carl finally decided to start planning for his event. Unfortunately; because Carl did not do any planning after hiring the fifteen new trainees and waited till the last minute to plan his event, he ran into multiple problems. When Carl finally decided to start planning for his event, he found that the training room where he was going to hold his orientation was booked for the whole month of June by a fellow associate named Joe. Joe was from technology services and needed the room for computer terminals. When he went to finalize the paperwork for his event, he found that some of the new hire trainees did not have completed transcripts or applications on file; nor had they gone to the clinic for their physicals and mandatory drug screenings. He then checked the orientation manuals and found that there were only three and that those three had missing pages. By now, Carl is very concerned, his anxiety is at a level high, and he is so frustrated that he sits with his head on his desk with the thought of “What am I going to do”.
Alternatives
At this point, Carl can .
Please see the attachment and look over the LOOK HERE FIRST file b.docxDIPESH30
Please see the attachment and look over the "LOOK HERE FIRST" file before handshaking to make sure you're committed to the assignment. Everything you need is within the zip folder attached. Thanks in advance. I had someone working on this and then they stopped answering me. Please don't be that person.
.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
13. #define CD_H
#include "Song.h"
#include "Text.h"
using CSC2110::String;
#include "ListArray.h"
using CSC2110::ListArray;
namespace CSC2110
{
class CD
{
private:
String* artist;
String* title;
int year;
int rating;
14. int num_tracks;
ListArray<Song>* songs;
public:
CD(String* artist, String* title, int year, int rating, int
num_tracks);
virtual ~CD();
String* getKey();
void addSong(String* title, String* length);
void displayCD();
static ListArray<CD>* readCDs(const char* file_name);
static int compare_items(CD* one, CD* two);
static int compare_keys(String* sk, CD* cd);
static char getRadixChar(CD* cd, int index); //1-based
};
24. Keyboard* Keyboard::getKeyboard()
{
static Keyboard keyboard; //initialized when method is called
the first time
return &keyboard; //won't go out of scope as keyboard is
static
}
int Keyboard::readInt(string prompt)
{
cout << prompt;
int val = 0;
cin >> val;
return val;
}
int Keyboard::getValidatedInt(string prompt, int min, int max)
{
28. {
class Keyboard
{
private:
Keyboard();
public:
virtual ~Keyboard();
static Keyboard* getKeyboard();
//pre: the string (character literal) that will prompt the user for
input
//post: the input read from the keyboard interpreted as an int is
returned
int readInt(string prompt);
int getValidatedInt(string prompt, int min, int max);
//pre: the string that will prompt the user for input
//post: the input read from the keyboard interpreted as a double
29. is returned
double readDouble(string prompt);
double getValidatedDouble(string prompt, double min, double
max);
//pre: the string that will prompt the user for input
// the string to store the user input and the length of the input
storage string
//post: the text read from the keyboard is copied into the storage
string
String* readString(string prompt);
};
}
#endif
ListArray.h
#if !defined (LISTARRAY_H)
#define LISTARRAY_H
32. sz = 0;
}
template < class T >
ListArray<T>::~ListArray()
{
delete[] items; //the items themselves are not deleted
}
template < class T >
bool ListArray<T>::isEmpty()
{
return (sz == 0);
}
template < class T >
int ListArray<T>::size()
{
33. return sz;
}
template < class T > //1-based
T* ListArray<T>::get(int index)
{
T* item = NULL;
if (index >= 1 && index <= sz)
{
item = items[index - 1];
}
return item;
}
template < class T >
void ListArray<T>::add(T* item)
34. {
add(sz + 1, item); //add the item to the end of the array list
}
template < class T >
void ListArray<T>::add(int index, T* item)
{
if (index < 1 || index > sz + 1)
{
return;
}
//need more room in the array list
if (sz == max_size)
{
arrayResize(2*max_size);
}
35. for (int i = sz; i >= index; i--)
{
items[i] = items[i - 1];
}
items[index - 1] = item;
sz++;
}
template < class T >
void ListArray<T>::remove(int index)
{
if (index < 1 || index > sz)
{
return;
}
for (int i = index; i < sz; i++)
36. {
items[i - 1] = items[i];
}
items[sz - 1] = NULL;
sz--;
/*
if (sz < max_size/2 - 1) //halve the size of the array, smallest
size of max_size should be 2
{
arrayResize(max_size/2);
}
*/
}
template < class T >
ListArrayIterator<T>* ListArray<T>::iterator()
{
37. ListArrayIterator<T>* iter = new ListArrayIterator<T>(items,
sz);
return iter;
}
template < class T >
void ListArray<T>::set(int index, T* item)
{
//could use other methods already written, but this is more
efficient
if (index >= 1 && index <= sz)
{
items[index - 1] = item; //overwrite contents at that
location
}
}
template < class T >
void ListArray<T>::arrayResize(int new_max_size)
38. {
max_size = new_max_size;
T** temp = new T*[max_size];
for (int i = 0; i < sz; i++)
{
temp[i] = items[i];
}
delete[] items;
items = temp;
}
template < class T >
void ListArray<T>::removeAll()
{
delete[] items;
39. max_size = 10;
items = new T*[max_size];
sz = 0;
}
template < class T >
T** ListArray<T>::toArray()
{
int num_items = size();
T** to_array = new T*[num_items];
for (int i = 0; i < num_items; i++)
{
to_array[i] = items[i];
}
return to_array;
}
}
40. #endif
ListArrayIterator.h
#if !defined (NULL)
#define NULL 0
#endif
#if !defined (LISTARRAYITERATOR_H)
#define LISTARRAYITERATOR_H
namespace CSC2110
{
template < class T >
class ListArrayIterator
{
private:
int index;
int sz;
T** items;
41. public:
ListArrayIterator(T** items, int size);
~ListArrayIterator();
bool hasNext();
T* next();
};
template < class T >
ListArrayIterator<T>::ListArrayIterator(T** itms, int size)
{
items = new T*[size];
for (int i = 0; i < size; i++)
{
items[i] = itms[i]; //snapshot of the data
}
index = 1;
42. sz = size;
}
template < class T >
ListArrayIterator<T>::~ListArrayIterator()
{
delete[] items;
}
template < class T >
bool ListArrayIterator<T>::hasNext()
{
return (index <= sz);
}
template < class T >
T* ListArrayIterator<T>::next()
{
44. #include <fstream>
#include <iostream>
using namespace std;
int Matrix::getNumRows()
{
return rows;
}
int Matrix::getNumCols()
{
return cols;
}
//the indices are 1-based!!
Matrix::Matrix(int r, int c)
{
rows = r;
45. cols = c;
if (r < 1)
{
rows = 1;
}
if (c < 1)
{
cols = 1;
}
int num_elements = rows*cols;
mat = new double[rows*cols];
//initialize the matrix to contain all zeroes (might not be
square in general)
int count = 0;
for (int i = 1; i <= rows; i++)
46. {
for (int j = 1; j <= cols; j++)
{
mat[count] = 0.0;
count++;
}
}
}
Matrix::~Matrix()
{
delete[] mat;
}
void Matrix::setElement(int row, int col, double val)
{
int index = (row - 1) * cols + col - 1;
mat[index] = val;
47. }
double Matrix::getElement(int row, int col)
{
int index = (row - 1) * cols + col - 1;
return mat[index];
}
void Matrix::displayMatrix()
{
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= cols; j++)
{
cout << this->getElement(i, j) << " ";
}
cout << endl;
}
48. cout << endl;
}
Matrix* Matrix::add(Matrix* other)
{
int rows1 = rows;
int cols1 = cols;
int rows2 = other->rows; //getNumRows()
int cols2 = other->cols; //getNumCols()
if (cols1 != rows1 || cols2 != rows2)
{
cout << "Cannot add matrices." << endl;
return NULL;
}
Matrix* result = new Matrix(rows1, cols1);
49. int rows = rows1;
int cols = cols1;
//loop over all elements of resulting matrix
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= cols; j++)
{
double x = this->getElement(i, j) + other->getElement(i,
j);
result->setElement(i, j, x);
}
}
return result;
}
50. Matrix* Matrix::multiply(Matrix* other)
{
int rows1 = rows;
int cols1 = cols;
int rows2 = other->rows;
int cols2 = other->cols;
if (cols1 != rows2)
{
cout << "Cannot multiply matrices." << endl;
return NULL;
}
Matrix* result = new Matrix(rows1, cols2);
int rows = rows1;
int cols = cols2;
51. double x;
//loop over all elements of resulting matrix
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= cols; j++)
{
x = 0;
//sum up multiplying matrices to obtain value placed in
new matrix
for (int k = 1; k <= cols1; k++)
{
x = x + this->getElement(i, k) * other->getElement(k,
j);
}
result->setElement(i, j, x);
}
}
52. return result;
}
//assumes a specific format for the file
Matrix* Matrix::readMatrix(const char* file_name)
{
ifstream matrix_file;
matrix_file.open(file_name);
int rows = 1;
int cols = 1;
matrix_file >> rows >> cols;
if (rows < 1)
{
rows = 1;
53. }
if (cols < 1)
{
cols = 1;
}
Matrix* matrix = new Matrix(rows, cols);
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= cols; j++)
{
double val = 0.0;
matrix_file >> val;
matrix->setElement(i, j, val);
}
}
54. matrix_file.close();
return matrix;
}
//assumes a specific format for the file
void Matrix::writeMatrix(const char* file_name)
{
ofstream matrix_file;
matrix_file.open(file_name);
matrix_file << rows << " " << cols << endl;
for (int i = 1; i <= rows; i++)
{
for (int j = 1; j <= cols; j++)
{
55. matrix_file << this->getElement(i, j) << " ";
}
matrix_file << endl;
}
matrix_file.close();
}
Matrix.h
#if !defined MATRIX_H
#define MATRIX_H
//the indices are 1-based!!
namespace CSC2110
{
class Matrix
{
private:
int rows;
56. int cols;
double* mat;
public:
Matrix(int rows, int cols); //constructor
~Matrix(); //destructor
void displayMatrix();
int getNumRows();
int getNumCols();
double getElement(int row, int col);
void setElement(int row, int col, double val);
Matrix* add(Matrix* other);
Matrix* multiply(Matrix* other);
57. static Matrix* readMatrix(const char* file_name); //discuss
static
void writeMatrix(const char* file_name);
};
}
#endif
Permutation.cpp
#include "Permutation.h"
using CSC2110::Permutation;
#include "ListArrayIterator.h"
using CSC2110::ListArrayIterator;
Permutation::Permutation(int q, int n)
{
random = Random::getRandom();
r = q;
58. numbers = new ListArray<Integer>();
for (int i = 1; i <= n; i++)
{
Integer* num = new Integer(i);
numbers->add(num);
}
}
Permutation::~Permutation()
{
ListArrayIterator<Integer>* iter = numbers->iterator();
while(iter->hasNext())
{
Integer* i = iter->next();
delete i;
}
delete iter;
delete numbers;
59. }
int Permutation::next()
{
if (r == 0) return -1;
int rand = random->getRandomInt(1, numbers->size());
Integer* num = numbers->get(rand);
int value = num->getValue();
numbers->remove(rand);
delete num;
r--;
return value;
}
Permutation.h
#if !defined (PERMUTATION_H)
60. #define PERMUTATION_H
#include "ListArray.h"
using CSC2110::ListArray;
#include "Integer.h"
using CSC2110::Integer;
#include "Random.h"
using CSC2110::Random;
namespace CSC2110
{
class Permutation
{
private:
int r;
ListArray<Integer>* numbers;
Random* random;
64. return coeffs[power];
}
void Poly::setCoeff(int power, double cf)
{
if (power > max_power || power < 0) return;
coeffs[power] = cf;
if (power >= degree)
{
degree = power;
}
}
double Poly::evaluate(double x)
{
double result = getCoeff(degree);
65. for (int i = degree - 1; i >= 0; i--)
{
result = result * x;
result = result + getCoeff(i);
}
return result;
}
Poly* Poly::multiply(Poly* other)
{
double TOL = .00001;
int n = getDegree();
int m = other->getDegree();
Poly* temp = new Poly(n + m);
66. for (int i = 0; i <= n; i++) //loop over coeffs
{
for (int j = 0; j <= m; j++) //loop over second coeffs
{
double coeff_i = getCoeff(i);
double coeff_j = other->getCoeff(j);
if (fabs(coeff_i) > TOL && fabs(coeff_j) > TOL)
{
int power = i + j;
double coeff = temp->getCoeff(power);
temp->setCoeff(power, coeff + (coeff_i * coeff_j));
}
}
}
return temp;
}
67. void Poly::displayPoly()
{
double TOL = .00001;
int degree = getDegree();
cout << getCoeff(degree) << "x^" << degree;
for (int i = degree - 1; i >= 0; i--)
{
double coeff = getCoeff(i);
if (fabs(coeff) > TOL)
{
cout << " + " << coeff << "x^" << i << " ";
}
}
cout << endl;
}
68. //assumes a specific format for the file
//why is this method static in the header file?
Poly* Poly::readPoly(const char* file_name)
{
ReadFile* rf = new ReadFile(file_name); //for reading
String* degree_str = rf->readLine();
int degree = degree_str->a_to_i();
delete degree_str;
Poly* poly = new Poly(degree);
for (int i = 0; i <= degree; i++)
{
String* coeff_str = rf->readLine();
float coeff = coeff_str->a_to_f();
delete coeff_str;
poly->setCoeff(i, (double) coeff);
69. }
delete rf;
return poly;
}
//assumes a specific format for the file
void Poly::writePoly(const char* file_name)
{
WriteFile wf(file_name); //for writing
String* degree_str = String::f_to_a(degree);
wf.writeLine(degree_str);
delete degree_str;
for (int i = 0; i <= degree; i++)
{
float coeff = (float) getCoeff(i);
70. String* coeff_str = String::f_to_a(coeff);
wf.writeLine(coeff_str);
delete coeff_str;
}
}
Poly.h
#if !defined (POLY)
#define POLY
namespace CSC2110
{
class Poly
{
private:
int max_power;
int degree;
73. }
Random* Random::getRandom()
{
static Random random; //initialized when method is called
the first time
return &random;
}
void Random::randomInit()
{
srand (time(NULL));
//try to get a more random starting number
rand();
rand();
rand();
rand();
74. }
int Random::getRandomInt(int lower, int upper)
{
int diff = upper - lower + 1;
int random_num = rand()%diff;
random_num = random_num + lower; //gives a number
between lower and upper, inclusive
return random_num;
}
float Random::getRandomFloat(float lower, float upper)
{
float r_float_1 = (float) rand();
float r_float_2 = (float) RAND_MAX;
float random_normalized = r_float_1/r_float_2; //between 0.0
and 1.0
float random_float = lower + random_normalized*(upper -
lower);
82. #include "Text.h"
using CSC2110::String;
namespace CSC2110
{
class Song
{
private:
String* title;
String* length;
public:
Song(String* title, String* length);
virtual ~Song();
void displaySong();
};
}
83. #endif
String.cpp
#include "Text.h"
using CSC2110::String;
#include <stdlib.h> //needed for atoi and atof
#include <cstring> //needed for strlen and strcmp
#include <sstream>
#include <iostream>
using namespace std;
String::String(const char* char_array)
{
sz = strlen(char_array);
char* text = new char[sz+1];
for (int i = 0; i < sz; i++)
{
text[i] = char_array[i];
86. int String::find(char delimiter, int start)
{
if (start >= sz || start < 0) return -1;
int loc = sz;
for (int i = start; i < sz; i++)
{
if (text[i] == delimiter)
{
loc = i;
break;
}
}
return loc; //delimiter not found
}
87. //the substring will use the characters from start to end inclusive
String* String::substr(int start, int end)
{
if (start > end || start < 0) return NULL;
if (start > sz || end > sz) return NULL;
int sub_len = end - start + 1;
char* sub_text = new char[sub_len + 1];
int count = 0;
for (int i = start; i <= end; i++)
{
sub_text[count] = text[i];
count++;
}
sub_text[count] = 0;
String* sub = new String((const char*) sub_text);
88. return sub;
}
int String::a_to_i()
{
return atoi(text);
}
float String::a_to_f()
{
return atof(text);
}
String* String::i_to_a(int number)
{
stringstream out;
out << number;
const char* text = out.str().c_str();
89. return new String(text);
}
String* String::f_to_a(float number)
{
stringstream out;
out << number;
const char* text = out.str().c_str();
return new String(text);
}
Text.h
#if !defined STRING_H
#define STRING_H
namespace CSC2110
{
90. class String
{
private:
const char* text;
int sz; //length of string not including null terminator
public:
String(const char* char_array);
virtual ~String();
void displayString();
int length();
const char* getText();
//add this member function
char charAt(int index);
int a_to_i();
float a_to_f();
91. static String* i_to_a(int number);
static String* f_to_a(float number);
//find the location of a particular character in a String and
return the index if found
//preconditions:
// str is the String being examined for the character delimiter
(str must point to a valid String)
// delimiter is the character being searched for
// start is the index to start the search at (the first index of
the String is 0, start cannot exceed the length of the String)
//postconditions:
// if the preconditions are met, the index of the first delimiter
encountered at or after the start index is returned
// if the delimiter is not present in the String at index start or
later, -1 is returned
// if the preconditions are not met, no guarantees on output
are made
int find(char delimiter, int start);
//creates a new String that is extracted from an existing String
with characters specified by the start and end indices
92. //preconditions:
// str is the String from which the substring will be extracted
(str must point to a valid String)
// start and end are the indices used to create the substring
// start must be less than or equal to end, start must be >= 0,
end must be >= 0, end < the length of the String
//postconditions:
// if the preconditions are met, the String extracted from the
parameter String
// that starts at index start and ends at index end is created
and returned
// the original string is unaffected
String* substr(int start, int end);
//need to document that this compare only has three possible
return values (-1, 0, 1)
int compare(String* other);
};
}
94. tokens = new String*[max_tokens];
for (int i = 0; i < max_tokens; i++)
{
tokens[i] = NULL;
}
int str_len = str->length();
int current_loc = 0;
int count = 0;
while(current_loc < str_len)
{
int next_loc = str->find(delimiter, current_loc);
if (next_loc > 0) //a delimiter as the first character is a
problem
{
String* token = str->substr(current_loc, next_loc - 1);
99. {
class Tokens
{
private:
String** tokens;
int max_tokens;
int sz;
void addToken(String* str); //requires a resizing check
void resize();
public:
Tokens(String* str, char delimiter);
~Tokens(); //Tokens is not responsible for deleting each
token
void displayTokens();
String* getToken(int index); //returns a specifically
requested token
int getNumTokens();
104. int Password::bestGuess()
{
int best_guess_index = -1;
int best_num_eliminated = -1;
int num_viable_passwords = getNumberOfPasswordsLeft();
//loop over ALL words, even if they have been eliminated as
the password
int count = 1;
ListArrayIterator<String>* all_iter = all_words->iterator();
while(all_iter->hasNext())
105. {
String* original_word = all_iter->next();
//loop over only those words that could still be the password
//count up the number of matches between a possible
password and a word in the original list
int* count_num_matches = new int[len + 1];
for (int i = 0; i < len; i++)
{
count_num_matches[i] = 0;
}
ListArrayIterator<String>* viable_iter = viable_words-
>iterator();
while(viable_iter->hasNext())
{
String* viable_word = viable_iter->next();
int num_matches = getNumMatches(viable_word,
106. original_word);
count_num_matches[num_matches]++;
}
delete viable_iter;
//find the largest number in the count_num_matches array
//the largest number indicates the guess that will generate
the most eliminations
int most_num_matches = 0;
for (int j = 0; j < len; j++)
{
int curr_num_matches = count_num_matches[j];
if (curr_num_matches > most_num_matches)
{
most_num_matches = curr_num_matches;
}
}
//compute the fewest that can possibly be eliminated by
107. guessing the current word (original list)
int num_eliminated = num_viable_passwords -
most_num_matches;
//select the word to guess that maximizes the minimum
number of eliminations (minimax)
if (num_eliminated > best_num_eliminated)
{
best_num_eliminated = num_eliminated;
best_guess_index = count;
}
count++;
delete[] count_num_matches;
}
delete all_iter;
return best_guess_index; //return a 1-based index into the
all_words list of words (careful)
}
108. lab03/Password.h
#if !defined PASSWORD_H
#define PASSWORD_H
//complete the includes
class Password
{
private:
ListArray<String>* viable_words; //the list of words that
can still be the password
ListArray<String>* all_words; //the original list of words
int len; //the length of the first word entered is stored to
check that all subsequent words have the same length
//a private helper method to report the number of character
matches between two Strings
int getNumMatches(String* curr_word, String*
word_guess);
110. containing the possible passwords: ");
ReadFile* rf = new ReadFile(file_str->getText());
delete file_str;
String* num_words_str = rf->readLine();
int num_words = num_words_str->a_to_i();
delete num_words_str;
for (int i = 0; i < num_words; i++)
{
String* word = rf->readLine();
fh->addWord(word);
}
delete rf;
fh->displayViableWords();
}
111. void guessWords(Password* fh)
{
Keyboard* kb = Keyboard::getKeyboard();
int numLeft = fh->getNumberOfPasswordsLeft();
while (numLeft > 1) //terminate if the password has been
identified, or there is no valid password (user entry error)
{
int best_guess_index = fh->bestGuess();
String* best_guess_word = fh-
>getOriginalWord(best_guess_index);
cout << "You should guess "";
best_guess_word->displayString();
cout << "" at index " << best_guess_index;
cout << endl << endl;
String* guess_str = kb->readString("Index of word in the
original word list to guess (1-based): ");
int guess = guess_str->a_to_i();
delete guess_str;
112. String* match_str = kb->readString("Number of character
matches: ");
int match = match_str->a_to_i();
delete match_str;
cout << endl;
fh->guess(guess, match); //1-based index of the guessed
word and the number of character matches
fh->displayViableWords();
numLeft = fh->getNumberOfPasswordsLeft();
}
}
int main()
{
Password* fallout = new Password();
addWords(fallout);