Code Monkey home page Code Monkey logo

cs1c-class-project's Introduction

The Golden Cone's CS1C Project

alt text

Requirement Locations in Source Code:

GOLDEN CONE GRAPHICS PROGRAM


EXTRA-CREDIT SORTING DONE IN: *CustomSorts.h

  • Sorting implementation: line 38 *dlgshapereport.cpp
  • Fuction that uses sorting implmenetation: line 40

Class project requirements are met in these files:


  1. Provide satisfied customer testimonials (solicit for additional testimonials). Guest users may enter testimonials. The testimonials should be persistent between executions.

*dlgtestimonialcreate.h

  • Entire dialog creates a new testimonial

*dlgtestimonialcreate.cpp

  • Entire dialog creates a new testimonial

*dlgtestimonialcreate.ui

  • Entire dialog creates a new testimonial

*dtotestimonial.h

  • Struct that represents the attributes of a testimonial

*jsontestimonial.h

  • JSON transformational layer that converts DTOTestimonial objects into JSON

*svcjson.h

  • Service that persists JSON in the local filesystem.

*svcjson.cpp

  • Persists JSON in the local filesystem: line 54
  • Reads JSON: line 90

2)Provide "contact us" method with team name and logo

*dlgcontactform.h, *dlgcontactform.cpp, *dlgcontactform.ui

  • Entire dialog takes input for creating an inquiry

*final_icon.png

  • Our logo

*dtocustomerinquiry.h

  • Struct that represents an inquiry

*jsoncustomerinquiry.h

  • JSON transformational layer

*svcjson.h

  • Persists and loads inquiry JSON to and from the local filesystem

*svcjson.cpp

  • Persists JSON: line 54
  • Reads JSON: line 90

3)Display all graphic objects (i.e. shapes including text) in rendering window. The shape id will be displayed above each shape identifying it. The rendering area to display shapes must have minimum dimensions of 1000 pixels (horizontal) by 500 pixels (vertical). The coordinate system is defined such that the top left corner of the rendering area is located at point (0,0), the bottom right corner at point (1000,500).

*vmcanvas.h *vmcanvas.cpp *goldenconevector.h *ishape.h *ishape.cpp *shapecircle.h *shapecircle.cpp *shapeellipse.h *shapeellipse.cpp *shapeline.h *shapeline.cpp *shapepolygon.h *shapepolygon.cpp *shapepolyline.h *shapepolyline.cpp *shaperect.h *shaperect.cpp *shapesquare.h *shapesquare.cpp *shapetext.h *shapetext.cpp *vmcanvas.h *vmcanvas.cpp *winmainl.h *winmain.cpp


4)Your program should read from a shape file that keeps track of all shapes currently being rendered by the 2D modeler. Shapes are identified by their type: line, polyline, polygon, rectangle, ellipse, text. Shapes have properties: shape dimensions, pen color, pen width, pen style, pen cap style, pen join style, brush color, brush shape. Text has properties: shape dimensions, text string, text color, text alignment, text point size, text font family, text font style, text font weight. All shapes must also have a unique ID.

*IShape.h *IShape.cpp *jsonshape.h *jsonshape.cpp *svcjson.h *svcjson.cpp


5)Your program should be able to move shapes, including text, being rendered. This is accomplished via a move shape form. All changes are visible in the rendering area. ñ administrator only

*/movement on canvas is done by move functions on the shapes derived from IShape abstract class, see (3)


6)Your program should be able to add and remove shapes, including text, being rendered. This is accomplished via an add/remove shape form. All changes are visible in the rendering area. ñ administrator only

*goldenconevector.h *vmcanvas.h *vmcanvas.cpp *winmain.cpp

  • Adding shapes: line 648 and 604
  • Removing shapes: line 346

*/all images rendered on canvas use specific IShape-derived-classes coordinates see (3)


7)Produce a shape listing report sorted by shape id (at any time). All shape properties should be included in the report.

*dlgshapereport.h *dlgshapereport.cpp *dlgshapreport.ui


8)Produce a shape listing report of ONLY shapes with an area sorted by area (at any time). The shape type, id and area should be included in the report.

*/see (7) *customsorts.h


9)Produce a shape listing report of ONLY shapes with a perimeter sorted by perimeter (at any time). The shape type, id and perimeter should be included in the report.

*/ see(8)


10)Save all changes between executions

*winmain.h *winmain.cpp *winmain.ui *jsonshape.h *jsonshape.cpp *svcjson.h *svcjson.cpp

  • Persists JSON: line 54
  • Reads JSON: line 90

cs1c-class-project's People

Contributors

xavierliancw avatar will-jedynak avatar coding-cat-cosmo avatar superspicycatfish avatar kersplato avatar vuandy50 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

cs1c-class-project's Issues

As an unsure modeler, I can see a "contact us" button that has the developer team name and logo so I know that there is software support available.

Description:
Our graphics application is not going to be intuitive for every user, so it makes sense to have a method for them to contact our team if they have inquiries. Therefore, the UI elements that initiate the process for contacting us need to be obvious.
This shall be achieved through displaying our team name, logo, and “contact us” or “need help?” text.
Such UI shall be available ubiquitously throughout the application to prevent users from feeling helpless.
Tasks:
Design contact UI
Implement that UI
Temporarily place that UI on the starting screen of our application since UI layouts will be changing
Tests:
Test that the contact UI is visually approved by our product owner
Assignee:
Julia
Point Estimation:
1
Priority:
7
Definition of Done:
There is a temporary or final “contact us” button.
The button is obvious and looks good.
Th

As a modeler, I can see shapes on the canvas in the same positions as the last time I ran the application so that I don't have to create new 2D graphics every time my computer restarts.

Description:
Our 2D graphics program shall support the ability to save the state of the graphics canvas. This will make it so users won't have to start from scratch every time they leave boot our application.

Tests:

  • Test that canvas gets saved when there is no JSON file in the filesystem
  • Test program startup when there is no JSON file in the system
  • Test that the existing JSON file gets updated correctly
  • Test that the existing JSON file gets saved on application close

Point Estimation:
5

Priority:
6

Definition of Done:

  • The canvas is exactly the same between application launches
  • The canvas is saved on application exit
  • The canvas is saved when the canvas page's back button is hit

As a modeler, I can add a polygon to the canvas so I can model 2D graphics.

Description:
Having the ability to render custom shapes on the canvas is really useful to modelors. You could even say it's the bread and butter of making 2D graphics. Our application shall support adding polygons.

Tests:

  • Test adding polygons to the canvas
  • Test unexpected values for polygon generation

Point Estimation:
3

Definition of Done:

  • Modelers can render polygons on the canvas
  • Polygon generation through user inputs is validated

As an administrator I can delete a shape from the list of supported shapes so that I can remove a shape I accidentally added.

Description:
An administrator can remove a shape that they no longer wish to utilize.
Process will open a user interface that allows for any of the available shapes to be removed with a ‘remove shape’ button
After selecting shapes to be removed, a ‘finished’ button will update the shape list.
A ‘cancel’ button will also be available to cancel removing a shape.
Tasks:
Create an interface that lists the available shapes.
Allow user to select shapes to be removed.
‘Finished’ button completes the removal action.
Create a ‘cancel’ or ‘escape’ button that allows for escape from the interface without making any changes.
Tests:
Verify that the ‘remove shape’ button can only be accessed by administrators
Verify that the ‘remove shape’ button successfully delete the desired shape(s) from persistent memory
Verify that ‘cancel’ button exits UI without making changes
Assignee:
Myles
Point Estimation:
2
Priority:
5
Definition of Done:
A user with administrator access can remove a shape from the repository of shapes using a friendly ‘remove shape’ button allowing for selection of shapes the user desires to remove
The shape data is gone when looking at the stored data

As an administrator, I can see a list of the supported shapes the modeler can draw so I can make decisions about what shapes I can remove/add.

Description:
Our application models 2D graphics by providing a set of shapes that modelers can manipulate on a canvas. So in order to administer the shapes that are available to modelers, a list of supported shapes needs to be visible to administrators, aiding in their decision-making.
Supported shapes shall be listed in a modal window.
This modal window shall be accessible only to administrators via a password protected button of some sort.
Tasks:
Create UI for modal window including the password screen and the list view screen
Create a model to represent a shape
Create a VM for the admin modal window
Create a service to pull shape data form a local JSON file
Link the layers together
Tests:
Test what happens when there is no JSON file
Test what happens when there is a JSON file with 0, 1, 2 shape objects
Assignee:
Xavier
Point Estimation:
2
Priority:
4
Definition of Done:
There is a temporary button to summon the admin modal window
The window appears with a password field first
Wrong and correct passwords are handled appropriately
Getting past the password screen will display the supported shapes
The shapes are listed in a scroll view

Produce a multitude of shape listing reports -- sorted by and presenting different criteria

A report should have the ability to be produced at any time!

There should be three different types of producible shape listing reports:

  1. Sorted by shape id with all shape properties being included in the report.

  2. A listing of ONLY shapes, sorted by area, with shape type, id, and area being included in the report.

  3. A listing of ONLY shapes, sorted by perimeter, with shape type, id, and perimeter being included in
    the report.

#19 Implement shape ABC

Child of #19

  • Add QPainter data member via a composition relationship
  • Virtual function draw
  • Virtual function move
  • Virtual function perimeter
  • Virtual function area

As a modeler, I can add a square to the canvas so I can model 2D graphics.

Description:
Adding a rectangle is great, but sometimes we want to make it easier for our modelors to generate squares faster. Giving them the ability to generate squares makes it so there's one less field to fill out.

Tests:

  • Test adding squares to blank and non-blank canvas
  • Test inputting letters and unexpected input into the square generator dialog

Point Estimation:
1

Definition of Done:

  • Modelers have the ability to render squares on the canvas through a dialog with one less field than the rectangle generator

As an unconvinced person, I can see testimonials left by other people right on the first screen after the program has booted so that I am encouraged to use the modeler.

Description:
Testimonials need to be visible to would-be users to encourage them to use our program. It makes sense to have them immediately visible on the starting screen so people can read them without interacting with the app.
Testimonials shall be stored and persisted in a JSON file that is in the same file directory as the app.
Testimonials shall appear as a list on the first screen of the app.
Testimonials shall include a display name and testimonial text.

Point Estimation:
1

Tests:

  • Test coverage for the business logic is covered in story #1
  • Test what happens when there are no testimonials

Definition of Done:

  • Previous testimonials appear on the welcome page

As a modeler, I can delete a shape from the canvas so that I can undo any mistakes I’ve made while modeling my 2D graphics creation.

Description:
This story focuses on any errors that were made by a modeler when modeling the 2D graphic creation.
If the shape has multiple errors, it will be hard to detect and fix all the problems accurately in a timely manner, by deleting the shape entirely it leave room for less error and it is much faster.
This will help with a more organized and efficient way to clear and clean the shape database, without much altering

Tests:

  • Test deleting from blank canvas
  • Test deleting from canvas that has 1 shape
  • Test deleting from canvas that has 2 shapes, the first one, and the last one
  • Test deleting from middle when there are 3 or more
  • Test deleting from beginning and end when there are 3 or more

Point Estimation:
2

Priority:
2

Definition of Done:

  • Modelers can either delete any shape on the canvas
  • Deletions persist between launche

As a satisfied modeler, I can leave a testimonial so that other people are encouraged to use the modeler.

Description:

  • Testimonials are akin to Amazon reviews for our 2D graphics modeler. Giving users the ability to leave testimonials gives us feedback about how our program is working.
  • To grant this ability to users, we shall have a button that is always available for modelers to press.
  • This button shall summon a form that will take a display name and testimonial text as inputs.
  • That form shall have cancel and submit buttons.
  • Submitted testimonials will persist between application launches in a JSON file in the same file directory as the application binary.
  • This story involves making services that will be used for the rest of the project, so it should be one of the first stories we tackle.

Tests:

  • Test that JSON files can be created, read from, and updated, in the local file system
  • Test that the view model can add a testimonial to a JSON file in the local file system

Point Estimation:

  • 5

Priority:

  • 1

Definition of Done:

  • A temporary or final testimonial button visibly exists on the UI
  • Press the button to summon the testimonial form
  • The form has submit and cancel buttons
  • The form has a prompt and a field for display name
  • The form has a prompt and a field for testimonial text
  • The cancel button dismisses the testimonial form
  • The submit button is only enabled if the display name and testimonial text exist
  • The submit button dismisses the testimonial form
  • There is a JSON file in the local file system named "testimonials" after a testimonial submission
  • The JSON file has the testimonial data that was entered
  • Add another testimonial and the JSON file should have 2 testimonial objects

As a modeler, I can resize, style, and move shapes I’ve added to the canvas so that I can manipulate 2D graphics to my heart’s content.

Description:
Modelers shall have the ability to edit the shapes that are currently placed on the canvas. This includes changing things like the color, border color, size, position, and layer position.

Tests:

  • Test shape moving
  • Test that shapes can be moved to another layer
  • Test shape resizing
  • Test editing shape brush color
  • Test editing shape brush style
  • Test editing shape pen cap style
  • Test editing shape pen color
  • Test editing shape pen join style
  • Test editing shape pen style
  • Test editing shape pen width
  • Test persistence of these properties

Point Estimation:
7

Priority:
1

Definition of Done:

  • Shapes can be edited as expected
  • Shape edits are reflected appropriately on the canvas
  • Shape edits are persisted between application launches

As a modelor, I can add an ellipse or circle to the canvas so I can model 2D graphics.

Description:
Adding circular shapes is important for graphics modeling.

Tests:

  • Test adding a circle to blank and non-blank canvas
  • Test adding an ellipse to blank and non-blank canvas
  • Test inputting letters into the fields that create an ellipse and a circle

Point Estimation:
1

Definition of Done:

  • Modelers can render circular shapes on the canvas
  • There are buttons to add circles and ellipses
  • There is a dialog that can create circles or ellipses

As a confused modeler, I can press the "contact us" button and leave a message for the developer team to see so that I can get help about using the software.

Description:
This story focuses on the functional aspect of story #3.
Pressing the “contact us” UI shall summon a modal window that displays over whatever current context the application is currently in.
For now, there shall be no UI for displaying inquiries from users since inquiries shall be stored in a local JSON file our developer team has knowledge about.
The modal window shall have a field for the confused modeler to provide an email so we can reply to their inquiry.
The modal window shall have a field for whatever inquiry the confused modeler may have.
The modal window shall have a submit button and a cancel button.

Tasks:
Design UI for the modal window
Create the UI for the modal window
Also create UI for a success message
Create a model for representing contact requests
Create a service that serializes and deserializes contacrequests to and from a local JSON file
Handle the case when there are no requests that exist in storage
Create a VM for the modal window, having it be the bridge between the UI and the contact request service
Add logic to prevent inquiry submissions when the inquiry text or email is empty

Tests:

  • Test creating a contact request when there are no contact requests in storage
  • Test the same thing but when there exists 1 in storage
  • Test the same thing again but when there exists more than 1 in storage
  • Test submitting an inquiry when there is no text
  • Test the UI flow is correct

Point Estimation:
3
Priority:
8

Definition of Done:

  • Pressing the contact UI from story #2 summons a modal window over the current application context
  • The modal window has a field for email
  • The modal window has a field for an inquiry
  • The modal window has a cancel button that makes the window disappear
  • The modal window has a button that submits the inquiry text and email
  • Inquiries are prevented when there is no inquiry text or email
  • A success message of some sort appears when an inquiry is successfully recorded
  • Submitted inquiries persist in a local JSON file

As an unsure modeler, I can see a "contact us" button that has the developer team name and logo so I know that there is software support available.

Description:
Our graphics application is not going to be intuitive for every user, so it makes sense to have a method for them to contact our team if they have inquiries. Therefore, the UI elements that initiate the process for contacting us need to be obvious.
This shall be achieved through displaying our team name, logo, and “contact us” or “need help?” text.
Such UI shall be available ubiquitously throughout the application to prevent users from feeling helpless.

Tests:

  • Test that the contact UI is visually approved by our product owner

Point Estimation:
1
Priority:
7
Definition of Done:

  • There is a temporary or final “contact us” button.
  • The button is obvious and looks good.
  • The button is put everywhere necessary for ease of access.

As a modeler, I can draw a rectangle on the canvas so that model 2D graphics.

Description:
The whole point of our application is to give modelers the ability to model 2D graphics.
Modelers will select a shape of their choosing from some list of supported shapes.
The selected shape shall appear on the modeling canvas.
In this particular story, we are focusing on the rectangle.
This is the first shape that should be implemented because its implementation is trivial, and it sets up all the architecture we'll be using to support the other shapes.

Tests:

  • Test adding a rectangle to a blank canvas
  • Test adding a shape to a canvas with 1 shape on it
  • Test adding a shape to a canvas with 5 shapes on it

Point Estimation:
7
Priority:
1
Definition of Done:

  • There is the ability to add rectangles to the canvas
  • Rectangles added to the canvas actually show up on the canvas
  • The canvas uses a custom vector to hold them in memory (client-requirement)

As a modeler, I can add a line or polyline to the canvas so I can model 2D graphics.

Description:
Adding lines is essential for modelling graphics. The program shall support adding lines and polylines as such.

Tests:

  • Test adding lines and polylines to the blank and non-blank canvas
  • Test invalid inputs in the fields used to create lines and polylines

Point estimation:
2

Definition of Done:

  • Modelers can render lines and polylines on the canvas
  • Line and polyline generation validates input

As a modeler, I can add text to the canvas so I can model 2D graphics.

Description:
Adding text to the canvas is a good feature to have for modelers, so we shall put it in.

Tests:

  • Test adding blank text to the canvas
  • Test adding any text to the canvas
  • Test adding text to a blank canvas
  • Test adding text to a canvas with other stuff on it already

Points Estimation:
1

Definition of Done:

  • There is a button that adds text
  • There is a dialog that initializes a text shape with user text
  • Text shapes actually gets rendered on the canvas as expected

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.