fatread/Makefile CXX=g++ CXXFLAGS=-Wall -Werror -pedantic -std=c++11 all: libfat.a fat_test fat_shell fat_test: fat_test.o libfat.a $(CXX) $(CXXFLAGS) -o $@ $^ fat_shell: fat_shell.o libfat.a $(CXX)...

complete assignment in given skeleton code tar fileinstructions in html filesample disk for testing in zip file


fatread/Makefile CXX=g++ CXXFLAGS=-Wall -Werror -pedantic -std=c++11 all: libfat.a fat_test fat_shell fat_test: fat_test.o libfat.a $(CXX) $(CXXFLAGS) -o $@ $^ fat_shell: fat_shell.o libfat.a $(CXX) $(CXXFLAGS) -o $@ $^ fat_internal.h: fat.h fat.o: fat.cc fat_internal.h libfat.a: fat.o ar cr $@ $^ ranlib $@ fat_test.o: fat_test.cc fat.h SUBMIT_FILENAME=fat-submission-$(shell date +%Y%m%d%H%M%S).tar.gz archive: tar -zcf $(SUBMIT_FILENAME) $(wildcard *.cc *.h *.hh *.H *.cpp *.C *.c *.txt *.md *.pdf) Makefile @echo "Created $(SUBMIT_FILENAME); please upload and submit this file." .PHONY: archive all fatread/fat_test.cc #include "fat.h" #include int passed = 0, failed = 0; #define CHECK(x, what) \ do { \ std::cout < what="">< "...";;="" \="" if="" (x)="" {="" \="" std::cout="">< "passed.\n";="" \="" ++passed;="" \="" }="" else="" {="" \="" std::cout="">< "failed.\n";="" \="" ++failed;="" \="" }="" \="" }="" while="" (0)="" #define="" congrats_text="" \="" "congratulations,="" you="" have="" gotten="" something="" working!\n"\="" "\n"\="" "now="" that="" you="" can="" wade="" through="" the="" fat="" with="" the="" greatest="" of="" ease,="" you="" can\n"\="" "undercut="" all="" of="" those="" $30="" shareware="" \"undelete\"="" applications="" that="" market\n"\="" "to="" people="" with="" digital="" camera="" and="" usb="" drive="" dysfunctions.="" go="" forth="" and\n"\="" "take="" advantage="" of="" other="" people's="" misfortunes!\n"\="" "\n"\="" "only="" $19.99!!!!\n"\="" "\n"\="" "-duane\n"\="" "\n"="" #define="" the_game_text="" \="" "subject:="" for="" your="" amusement\n"="" \="" "to:="" [email protected]\n"="" \="" "date:="" thu,="" 23="" mar="" 1995="" 10:49:33="" -0500="" (est)\n"="" \="" "content-type:="" text/plain;="" charset="US-ASCII\n"" \="" "content-transfer-encoding:="" 7bit\n"="" \="" "status:="" ro\n"="" \="" "content-length:="" 4226\n"="" \="" "\n"="" \="" "=""> Software - How Software Companies Die\n" \ "> By: Orson Scott Card\n" \ "> \n" \ "> The environment that nutures creative programmers kills management\n" \ "> and marketing types - and vice versa. Programming is the Great Game.\n" \ "> It consumes you, body and soul. When you're caught up in it, nothing\n" \ "> else matters. When you emerge into daylight, you might well discover\n" \ "> that you're a hundred pounds overweight, your underwear is older than\n" \ "> the average first grader, and judging from the number of pizza boxes\n" \ "> lying around, it must be spring already. But you don't care, because\n" \ "> your program runs, and the code is fast and clever and tight. You won.\n" \ "> You're aware that some people think you're a nerd. So what? They're\n" \ "> not players. They've never jousted with Windows or gone hand to hand\n" \ "> with DOS. To them C++ is a decent grade, almost a B - not a language.\n" \ "> They barely exist. Like soldiers or artists, you don't care about the\n" \ "> opinions of civilians. You're building something intricate and fine.\n" \ "> They'll never understand it.\n" \ "> \n" \ "> BEEKEEPING\n" \ "> \n" \ "> Here's the secret that every successful software company is based on:\n" \ "> You can domesticate programmers the way beekeepers tame bees. You\n" \ "> can't exactly communicate with them, but you can get them to swarm in\n" \ "> one place and when they're not looking, you can carry off the honey.\n" \ "> You keep these bees from stinging by paying them money. More money\n" \ "> than they know what to do with. But that's less than you might think.\n" \ "> You see, all these programmers keep hearing their parents' voices in\n" \ "> their heads saying \"When are you going to join the real world?\" All\n" \ "> you have to pay them is enough money that they can answer (also in\n" \ "> their heads) \"Geez, Dad, I'm making more than you.\" On average, this\n" \ "> is cheap. And you get them to stay in the hive by giving them other\n" \ "> coders to swarm with. The only person whose praise matters is another\n" \ "> programmer. Less-talented programmers will idolize them; evenly\n" \ "> matched ones will challenge and goad one another; and if you want to\n" \ "> get a good swarm, you make sure that you have at least one certified\n" \ "> genius coder that they can all look up to, even if he glances at other\n" \ "> people's code only long enough to sneer at it. He's a Player, thinks\n" \ "> the junior programmer. He looked at my code. That is enough. If a\n" \ "> software company provides such a hive, the coders will give up sleep,\n" \ "> love, health, and clean laundry, while the company keeps the bulk of\n" \ "> the money.\n" \ "> \n" \ "> OUT OF CONTROL\n" \ "> \n" \ "> Here's the problem that ends up killing company after company. All\n" \ "> successful software companies had, as their dominant personality, a\n" \ "> leader who nurtured programmers. But no company can keep such a leader\n" \ "> forever. Either he cashes out, or he brings in management types who end\n" \ "> up driving him out, or he changes and becomes a management type himself.\n" \ "> One way or another, marketers get control. But...control of what?\n" \ "> Instead of finding assembly lines of productive workers, they quickly\n" \ "> discover that their product is produced by utterly unpredictable,\n" \ "> uncooperative, disobedient, and worst of all, unattractive people who\n" \ "> resist all attempts at management. Put them on a time clock, dress\n" \ "> them in suits, and they become sullen and start sabotaging the product.\n" \ "> Worst of all, you can sense that they are making fun of you with every\n" \ "> word they say.\n" \ "> \n" \ "> SMOKED OUT\n" \ "> \n" \ "> The shock is greater for the coder, though. He suddenly finds that\n" \ "> alien creatures control his life. Meetings, Schedules, Reports. And\n" \ "> now someone demands that he PLAN all his programming and then stick to\n" \ "> the plan, never improving, never tweaking, and never, never touching\n" \ "> some other team's code. The lousy young programmer who once worshiped\n" \ "> him is now his tyrannical boss, a position he got because he played\n" \ "> golf with some sphincter in a suit. The hive has been ruined. The best\n" \ "> coders leave. And the marketers, comfortable now because they're\n" \ "> surrounded by power neckties and they have things under control, are\n" \ "> baffled that each new iteration of their software loses market share\n" \ "> as the code bloats and the bugs proliferate. Got to get some better\n" \ "> packaging. Yeah, that's it.\n" \ "\n" void check_root_dir(const std::string &path) { bool saw_people = false; bool saw_congrats = false; for (AnyDirEntry entry : FAT_readdir(path)) { if (entry.dir.DIR_Attr != DirEntryAttributes::LONG_NAME) { std::string name((char*) entry.dir.DIR_Name, (char*) entry.dir.DIR_Name + 11); if (name == "PEOPLE ") { saw_people = true; CHECK(entry.dir.DIR_Attr & DirEntryAttributes::DIRECTORY, "people is a directory"); } else if (name == "CONGRATSTXT") { saw_congrats = true; } } } CHECK(saw_people, "people directory was found in " < path);="" check(saw_congrats,="" "congrats.txt="" was="" found="" in="" "="">< path);="" }="" void="" check_is_congrats(const="" std::string="" &path)="" {="" int="" fd="FAT_open(path);" check(fd="">= 0, "opening congrats.txt via " < path="">< "="" returned="">= 0 fd"); if (fd >= 0) { char buffer[4096]; int count = FAT_pread(fd
Nov 14, 2020
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here