Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What you will submit via handin: string utils.h and string.utils.c. 2. High Scho

ID: 3853994 • Letter: W

Question

What you will submit via handin: string utils.h and string.utils.c. 2. High School Scheduler gina pI0ro) In this problem you will design and implement a program that tells you the time of each class. The program will prompt the user for the class and you will output the time. For example, you will be provided with the following text file. Class Schedule: Class Time 15:30 Physics Physics 9:00 14:30 Calculus Biology Study Hall 10:30 Chemistry 11:30 All of your code should be placed in one file, highSchoolScheduler.c; the program accepts the file name as a command line argument so that it is executable like this: /highSchoolScheduler schedule.txt. In the input text file the times will be in military times, and you will have to con- vert them to regular time. Your converted time should be displayed either in PM or AM. Sample Output:

Explanation / Answer

class Algorithm
{
private:
vector<Schedule*> _chromosomes;
vector<bool> _bestFlags;
vector<int> _bestChromosomes;
int _currentBestSize;
int _replaceByGeneration;
ScheduleObserver* _observer;
Schedule* _prototype;
int _currentGeneration;
AlgorithmState _state;
CCriticalSection _stateSect;
static Algorithm* _instance;
static CCriticalSection _instanceSect;
public:
static Algorithm& GetInstance();
static void FreeInstance();
Algorithm(int numberOfChromosomes,
int replaceByGeneration,
int trackBest,
Schedule* prototype,
ScheduleObserver* observer);
~Algorithm();
void Start();
void Stop();
Schedule* GetBestChromosome() const;
inline int GetCurrentGeneration() const { return _currentGeneration; }
inline ScheduleObserver* GetObserver() const { return _observer; }
private:
void AddToBest(int chromosomeIndex);
bool IsInBest(int chromosomeIndex);
void ClearBest();

};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote