c++ css assignments lab and homework totally 2 questions

Programming

Lab 1 : Lo Shu Magic Square Game

Refer to the Programming Challenge #8 in chapter 7 of the textbook (page 456 in the 9th edition) to understand how this game works.

Specific requirements for this lab:

1) Define a class LoShuSquare with the necessary data and functions to play the game. Use a 2-D int array with three rows and three columns as the game grid. The class should also have the following functions:

  • A constructor to initialize the grid with zeros.
  • A function to fill a specific square with a number 1-9, given row and column.
    • For example, fill (0, 0, 4) will change the upper leftmost square to 4.
  • A function to print the board on the screen
  • A function to check if the grid is a Lo Shu Square. You may want to break this into multiple functions to check rows, columns and diagonals separately.

2) Define a class Player to implement the interaction with the user, such as asking for values to fill out the grid. The constructor should receive an object of the LoShuSquare class as a parameter.

3) The main function that I will use to test your game is given. You just have to turn in Player.h and LoShuSquare.h (these header files should have all your code implemented as inline functions).

Some Rubric (2)

Some Rubric (2)

Criteria Ratings Pts

This criterion is linked to a Learning OutcomeDocumentationFollows published guidelines.

5.0 pts

Full Marks

0.0 pts

No Marks

5.0 pts

This criterion is linked to a Learning OutcomeLoShuSquare constructor and destructorConstructor should initialize the grid with zeros. Destructor is only necessary if using dynamic memory allocation.

5.0 pts

Full Marks

0.0 pts

No Marks

5.0 pts

This criterion is linked to a Learning OutcomeLoShuSquare fill functionAdds a value to a specific place on the grid.

5.0 pts

Full Marks

0.0 pts

No Marks

5.0 pts

This criterion is linked to a Learning OutcomeLoShuSquare print functionPrints the grid on the screen.

5.0 pts

Full Marks

0.0 pts

No Marks

5.0 pts

This criterion is linked to a Learning OutcomeLoShuSquare check function(s)Checks if the grid is a Lo Shu Square

15.0 pts

Full Marks

0.0 pts

No Marks

15.0 pts

This criterion is linked to a Learning OutcomePlayer classHandles the interface with the user asking what values to put where on the grid. Make sure to always update the screen with the new grid after inserting a value, so it is easy to keep track of where the values are.

15.0 pts

Full Marks

0.0 pts

No Marks

15.0 pts

Total Points: 50.0


Homework 2

In this homework assignment you will use the algorithms presented in this chapter to implement a list of names that should be kept in alphabetical order.

Section 18.2 defines the Linked List Operations based on a list of numbers. You will change this code to work with a list of names. You can keep single names only (without space).

struct ListNode

{

string name;

struct ListNode *next;

};

Rename class NumberList to something more appropriate like StringList or NamesList. You will also need to change the methods to work with strings instead of numbers. You will only need two of the list operations: insertNode and displayList. Change them to work with the new type. Keep the constructor and destructor. Note that the destructor needs to delete one node at a time as shown in Destroying the List section.

Your main program should instantiate an object of the NamesList and ask the user to enter a list of names, which you will insert in alphabetical order by calling the insertNode method. When the user is done entering the names, call the displayList method to display the names, which should be in alphabetical order.

Turn in one .cpp file with the class implementation and the main function.

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational