The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Can anyone help me with the visual basic project before the deadline is passed. I cannot seem to figure out the question I have done a little bit of it. I have attached my question on here.
CSC239 Project 1
Objectives
In this programming project, students will learn:
- How to create multi-form windows form application
- How to define visual inheritance
- How to define classes and inheritance
- How to define and use object array
- How to perform object-oriented programming by encapsulating data and methods in objects
Goals
In this lab assignment, students will demonstrate the abilities to:
- Create multi-form windows form application
- Define visual inheritance
- Define classes and inheritance
- Define and use object array
- Perform object-oriented programming by encapsulating data and methods in objects Grading rubric
Category High Proficiency Medium Proficiency Low Proficiency Define GUIs for
multiple windows
forms [20 pts] Successfully define all
window forms with the
appropriate controls.
[20pts] Most window forms are
defined correctly, some
forms or controls are not
defined appropriately. [1019 pts] Most window forms are
missing, or most controls are
not defined appropriately.
[0-9 pts] Define classes and
inheritance [30 pts] Successfully define all
classes, inheritance
relationships are defined
correctly. [30ts] Most classed are defined
correctly, applied
inheritance, however, some
codes are not correct. [10-29
pts] Most classes are not defined
correctly, or the inheritance
is not defined correctly. [0-9
pts] Define event
handler methods for
“Login” form (5 pts) Successfully define the
login functionality. [5 pts] Minor issues are found for
login functionality [3-5 pts] Can not implement login
functionality. [0-2pts] Define event
handler methods for
“Search” form (10
pts) Successfully implement
“search” functionality and
define the button-click
methods. [10 pts] Minor issues are found for
“search” functionality, or the
button-click methods. [5-9
pts] Major issues are found for
“search” functionality, or the
button-click methods. [0-4
pts] Define event
handler methods for
“View” form [10
pts] Successfully implement
“view” functionality and
define the button-click
methods. [10 pts] Minor issues are found for
“view” functionality, or the
button-click methods. [5-9
pts] Major issues are found for
“view” functionality, or the
button-click methods. [0-4
pts] Define event
handler methods for
“Shopping Cart”
form [10 pts] Successfully implement
“shopping cart”
functionality and define the
button-click methods. [10
pts] Minor issues are found for
“shopping cart”
functionality, or the buttonclick methods. [5-9 pts] Major issues are found for
“shopping cart”
functionality, or the buttonclick methods. [0-4 pts] Define event Successfully implement Minor issues are found for Major issues are found for handler methods for
“Check Out” form
[10 pts] “check out” functionality
and define the button-click
methods. [10 pts] “check out” functionality, or
the button-click methods.
[5-9 pts] “check out” functionality, or
the button-click methods.
[0-4 pts] Define event
handler methods for
“Confirmation”
form [5 pts] Successfully implement
“confirmation”
functionality and define the
button-click methods. [5
pts] Minor issues are found for
“confirmation”
functionality, or the buttonclick methods. [3-5 pts] Major issues are found for
“confirmation” functionality,
or the button-click methods.
[0-2 pts] In this project, you will design and develop a Bookstore multi-form
windows form application and perform object oriented programming.
This project covers Chapter 9, 10 and 14.
Design and Define GUI interface
1. It must be a multi-form Windows Form Application.
2. You may design any GUI as you like.
3. The GUI should be convenient and efficient to perform the required tasks
specified below.
4. Suggestion - design and create a base windows form which contains the common
components appear in each form , all of other forms inherit the visual features
from this base form. Your application should perform the following tasks:
1. When you run your project, a Login form should be displayed first, you may set
the password TextBox’s PasswordChar property as “*”: In order to make testing easier, please use “csc239” as user name, and
“password” as password value.
2. After user log in successfully, user could search for the publication by titles from
the following Search form. Do not need to display many publications; 4-6 items
should be fine. For example, only let user search publication from 2 books and 2
magazines:
3. User then could view the information for the selected publication on the View
form: 4. If the
viewed user wants to buy the
publication, he/she could add it in the shopping cart, then view the shopping cart or continue
shopping.
5. If the user does not plan to buy the viewed publication, he/she could go back to
select and view other publications.
6. When the user chooses to view shopping cart, the ShoppingCart form should
display the publication title, item sale price and let user select quantity to buy: 7. Then user may choose “Check out” or “Continue shopping”.
8. The Checkout form should display the following information and let user input
billing and shipping address, provide gift information and select deliver date. 9. After checking out, user may choose to display Confirmation form or go back to
modify the shopping cart information (For example - Quantity of publication).
This is a sample confirmation form which displays amount due and shipping
information. User may leave this bookstore from this form by clicking “Thanks
for shopping” button. Programming Technical Specifications Object-oriented programming need to be performed. All data must be encapsulated in
objects (declared as instance variables in class definition).
Inheritance and polymorphism should be executed if appropriate. Database is not needed; you may save the publication objects in an array. So do not
add too many publications in your book store, 4 to 6 items should be fine.
Try to add controls in the shopping cart form during execution time if necessary
(writing code to add controls dynamically, see examples below).
Exceptions handling is encouraged but not required.
Use debugger or testing technologies to test your application. The software testing
documentations will be posted on Black Board.
This is an open project, there is no standard solution. Good luck! Suggestions
Development Steps
o Design and build GUI forms
o Design and define classes and modules.
o Complete GUI_behind code files by defining event handler methods and other
methods.
Design and Build GUI Forms
o Build as many GUI forms as you like. In order to achieve visual consistency across
your apps, you may define a base form which contains the common controls and let
all other forms inherit from the base form visually.
o Should let user perform the following tasks via GUI forms Search publication View the information of the selected publication (Only select and view ONE
publication at one time) Display the selected publications in shopping cart form and let user choose
quantities of ordered items. Allow user input billing or shipping information in the checkout form. Display confirmation on the confirmation form.
Design and Define Classes and Modules Define as many classes as needed Encapsulate all data in classes Define inheritance between the related classes For example: Publication
titleValue
publisherValue
priceValue
properties and methods Book Base class Magazine authorValue
ISBNValue
publishDateValue editorValue
issueValue
frequencyValue properties and methods
Derived class properties and methods
Derived class BookStoreDatabase
publicationArray(3)
selectedPublicationIndex
properties and methods
hjhgjghj Order o Use this class as your bookstore database.
o Initialize this array with 2 book objects and
2 magazine objects in constructor method.
o Use selectedPublicationIndex to
remember which publication is selected to
view by user. o This class represents order item object. titleValue
priceValue
qtyValue
properties and methods ShoppingCart
orderedItemsArray(3)
orderedItemNumberValue
subtotal
properties and methods o Use this class as your shopping cart.
o You may use ReDim Preserve to save the
ordered items in a dynamic array, or
o Set maximum size of the array as 4, use
orderedItemNumberValue to
remember actual number of ordered items in
this shopping cart array. Customer
UserName
Password
billing_name
billing_address
billing_city
billing_state
billing_zip
shipping_name
shipping _address
shipping _city
shipping _state
shipping _zip
gift
deliver_date
properties and methods
If one or more variables or objects will be shared by more than one Classes or
Forms, declare them as public variables or objects in a Module. This Module
is only a group of declarations; it will not be executed, so you do not need to
initialize these objects. Right-click the project name Add Module type name Declare public variables For example:
Module BookStroe
Public myBookStore As BookStoreDatabase
Public myCart As ShoppingCart
Public myCustomer As Customer
End Module Complete GUI_Behind Code Files by Defining Event Handler Methods and Other
Methods You need to initialize myBookStore, myCart and myCustomer objects after
user log in successfully, because they are only declared in the above Module,
and any reference should be set to a new object before they could be used. Private Sub btnLogin_Click(……) Handles btnLogin.Click
……………
myBookStore = New BookStoreDatabase()
myCart = New ShoppingCart()
myCustomer = New Customer()
……………
End Sub After this, myBookStore,myCart and myCustomer can be used in any
Form’s code. When you open a new Form from the current Form, you may create an object
of the new Form, and let this object show, also remember to hide the current
Form. The following code demonstrate how to open Search Form from Login
Form when user press “Login” button: Public Class frmLogin
Private Sub btnLogin_Click(………) Handles btnLogin.Click
Dim f As New frmSearch()
f.Show()
Me.Hide()
End Sub
End Class When you open a new Form and do something in the new Form, you may
choose one of the following ways. For example, if user wants to view
publication’s information when clicking “View” button in “Search” Form, a
new “View” Form will be shown and display publication’s info: Public Class frmSearch
Private Sub btnView_Click(………) Handles btnView.Click
………
Dim viewForm As New frmView()
'let viewForm display publication’s info here
viewForm.Label.Text = ………
Me.Hide()
viewForm.Show()
………
End Sub
End Class Or
Public Class frmSearch Private Sub btnView_Click(………) Handles btnView.Click
………
Dim viewForm As New frmView()
' do not display publication’s info here
' display publication’s info in the form_load
' method of View Form, see code bellow
Me.Hide()
viewForm.Show()
………
End Sub
End Class
Public Class frmView
Private Sub frmView_Load(……) Handles Me.Load
' display publication’s info here
Label.Text = …..
End Sub
End Class In shopping cart form, you may use one of the following two ways to add controls
and display items in the cart:
1) declare array of controls, the size of array should be determined by
number of items in the shopping cart, then you could use a loop to add the
controls in the shopping cart Form dynamically:
(myCart.itemNumber refers to number of ordered
items in myCart) Public Class frmCart
Dim labels(myCart.itemNumber - 1) As Label
Dim textBoxes(myCart.itemNumber - 1) As TextBox
Dim numUpDowns(myCart.itemNumber - 1) As NumericUpDown
……….
Private Sub frmCart_Load(……) Handles MyBase.Load
Dim xLabel As Integer = 50
Dim xTextBox As Integer = 240
Dim xNumUpDown As Integer = 370
Dim y As Integer = 138
Dim width As Integer = 55
Dim height As Integer = 20
If myCart.itemNumber > 0 Then
For i As Integer = 0 To myCart.itemNumber - 1
labels(i) = New Label()
labels(i).Location = New Point(xLabel, y)
labels(i).Size = New Size(width, height)
labels(i).Text = myCart.cart(i).name Me.Controls.Add(labels(i))
‘ Add other controls here
y += 40
Next
Else
…………
End If
End Sub
…………
End Class
2) Because we only have 4 publications in our bookstore, so add 4 sets of
controls in the Form in the design time and make them invisible. In the
frmCart_Load()event handler method, check number of items in the
cart (myCart.itemNumber), modify the corresponding properties of
the controls and make them visible.
-----------