more on the user node class
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
# **This README is still incomplete! Don't work on this assignment now.**
|
||||
|
||||
<!--# Homework 5 — Design and Implementation of a Simple Tinder-->
|
||||
# Homework 5 — Design and Implementation of a Simple Tinder
|
||||
|
||||
In this assignment you will develop a simple online dating application called New York Date. Your program will mimic some of the features provided by Tinder. Please read the entire handout before starting to code the assignment.
|
||||
|
||||
@@ -69,7 +67,7 @@ Your program will support these commands:
|
||||
5. block someone.
|
||||
<!--6. delete account.-->
|
||||
|
||||
More details about each of these four commands are given below. For all four commands, *users.txt* represents the input file, and *output.txt* represents the output file, please do not hardcode the file names into your program, as the actual input/output file may have a different name. You should just use the *argv[]* array to retrieve the name of the input and the output file. Also note that all of our output files have an empty line at the very end, and the Submitty autograder sometimes will display that as two empty lines. But this empty line is not displayed if you open the file from Github in the browser, because GitHub automatically trims trailing whitespace and empty lines at the end of files when displaying them in the browser.
|
||||
More details about each of these four commands are given below. For all four commands, *users.txt* represents the input file, and *output.txt* represents the output file, please do not hardcode the file names into your program, as the actual input/output file may have a different name. You should just use the *argv[]* array to retrieve the name of the input and the output file. Also note that all the expected output files contain an empty line at the end of file, to match with that, you just need to make sure to use *std::endl;* (or just *endl;* if you don't use *std::*) when printing the last line of a file.
|
||||
|
||||
**Note**: for all the commands, you can assume the phone numbers (used in the commands) are valid and are corresponding to an existing account.
|
||||
|
||||
@@ -214,8 +212,34 @@ This function takes four parameters, which are the latitude and longitude of two
|
||||
```
|
||||
|
||||
## Program Requirements & Submission Details
|
||||
|
||||
This assignment has some unique requirements: In this assignment, you are required to create and manipulate linked lists using nodes, **you are not allowed to use the std::list library. You are not allowed to define a List class or an iterator class. You are not allowed to use any data structures we have not learned so far.**
|
||||
|
||||
There is no requirement on whether your linked lists should be singly-linked lists, or doubly-linked lists. It is your design choice, but you must store all the users in a linked list, where each node of the linked list represents one user. For example, you can define your node like this if you decide to use doubly-linked lists:
|
||||
|
||||
```cpp
|
||||
class User {
|
||||
public:
|
||||
// add other fields as needed.
|
||||
User* next;
|
||||
User* prev;
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
or this, if you decide to use singly-linked lists:
|
||||
|
||||
```cpp
|
||||
class User {
|
||||
public:
|
||||
// add other fields as needed.
|
||||
User* next;
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
**Note**: for this homework, it is okay to define member variables as public variables, and this is due to the unique nature of linked lists.
|
||||
|
||||
Use good coding style when you design and implement your program. Organize your program into functions:
|
||||
don’t put all the code in main! Be sure to read the [Homework Policies](https://www.cs.rpi.edu/academics/courses/spring24/csci1200/homework_policies.php) as you put the finishing touches on your solution. Be sure to make up new test cases to fully debug your program and don’t forget
|
||||
to comment your code! Use the provided template [README.txt](./README.txt) file for notes you want the grader to read.
|
||||
@@ -245,6 +269,7 @@ You must do this assignment on your own, as described in the [Collaboration Poli
|
||||
- Uses std::list, or data structures which have not been covered in this class. (-7)
|
||||
- Defines/Uses a list class. (-5)
|
||||
- Defines/Uses an iterator class (okay to use iterators to iterate through other containers such as vectors). (-5)
|
||||
- Does not use homemade linked lists (which consists of chain of nodes) to store all the users. (-5)
|
||||
<!--- Member variables are public. (-2)-->
|
||||
<!-- - OUTPUT OPERATOR OVERLOADING (2 pts)
|
||||
- Does not overload the output (<<) operator. (-2)
|
||||
|
||||
Reference in New Issue
Block a user