# VB/C#

Need Help in Visual Basic and C# Assignments?
We provide help for students all over the world.

Items 1 to 10 of 166 total

per page
Page:
1. 1
2. 2
3. 3
4. 4
5. 5

Grid  List

1. ## Programming with Microsoft VB 2010 Diane Zak Chapter 6 Exercise 7 Guess a Random Number

Regular Price: \$12.00

Special Price: \$10.00

Programming with Microsoft VB 2010 Diane Zak Chapter 6 Exercise 7 Guess a Random Number

In this exercise, you code an application that allows the user 10 chances to guess a random number generated by the computer. The random number should be an integer from 1 through 50, inclusive. Each time the user makes an incorrect guess,the application should display a message that tells the user either to guess a higher number or to guess a lower number. When the user guesses the random number, the application should display a "congratulations!" message. However,if the user is not able to guess the random number after 10 tries, the application should display the random number in a message. Open the Random Solution (Random Solution.sln) file contained in the vb2010\chap06\Random Solution folder. If necessary, open the designer windows. Code the application. Save the solution and then start and test the application. Close the code editor and then close the solution.

2. ## BMIS 209 Programming Assignment 6 Polymorphic Banking Application

Regular Price: \$15.00

Special Price: \$12.00

BMIS 209 Programming Assignment 6 Polymorphic Banking Application

Develop a polymorphic banking application using the Account hierarchy you created in Assignment #5. Create the following two SavingsAccount objects and two CheckingAccount objects and store them in an array called "arrays" of Account references to the objects:
Account Name Account Number Initial Balance Fee Charged Interest Rate

Using a foreach loop, iterate over each account in the array. For each Account in the array, first print the account. Next, allow the user to specify an amount of money to withdraw from the Account using method Debit and an amount of money to deposit into the Account using method Credit. Specifically, for each account, prompt the user to enter an amount to deposit in the account and call the Credit method. Print the object.

Next, prompt the user to enter an amount to withdraw and call the Debit method. Print the object. After the user has made a deposit and a withdrawal from an account, calculate interest if the account is a SavingsAccount and print the object.

To perform this step, you must first determine the object’s type. If the Account is a SavingsAccount, calculate the amount of interest owed to the Account using method CalculateInterest and print the account a final time. If the account is a CheckingAccount, you do not need to CalculateInterest nor print the account a final time.

Hint: To determine if an account is a savings or checking account, use the .getType method which returns a string representing the Name or FullName property. Then use the ".Equals" method to determine if the returned string is equal to the name of the class. For example, acct.getType().Name returns the string "SavingsAccount" or "CheckingAccount". Once you have determined that an account is a SavingsAccount object, you must "cast" the account object into a SavingsAccount object in order to access its CalculateInterest method. I like to perform this in two steps: declare a different variable to hold the reference to the object that has been cast from an Account object into a SavingsAccount object. Then, using this new variable, invoke its CalculateInterest method. For example, at the beginning of the Main() method, I declare a variable of type SavingsAccount as follows:
SavingsAccount temp_account;

In my foreach loop, I have a variable called "acct" that is defined as an Account object. To downcast this Account object into a SavingsAccount object, I use the syntax:
temp_account = (SavingsAccount) acct;

At this point, because temp_account is a SavingsAccount object, I can invoke its CalculateInterest method:
temp_account.CalculateInterest();

3. ## BMIS 209 Programming Assignment 5 Account Inheritance Program

Regular Price: \$15.00

Special Price: \$12.00

BMIS 209 Programming Assignment 5 Account Inheritance Program

Create an inheritance hierarchy that a bank might use to represent customer's bank accounts. All customers at this back can deposit (i.e. credit) money into their accounts and withdraw (i.e. debit) money from their accounts. More specific types of accounts also exist. Savings accounts, for instance, earn interest on the money they hold. Checking accounts, on the other hand, charge a fee per transaction.

Create base class Account and derived classes SavingsAccount and CheckingAccount that inherit from class Account. Base class Account should include the following private instance variables: Balance, which is of type decimal to represent the account balance; AccountName, which is of type string and represents the account holder's last name; and AccountNumber, which is an integer type that represents the account’s number. The class should provide a constructor that receives an account’s name, account number, and an initial balance. It should use initialize these instance variables using the appropriate mutator methods (i.e. setAccountName, setAccountNumber, and setBalance). The setBalance method should validate the initial balance to ensure that it's greater than or equal to 0.0; if not, set the balance to 0. You should also include the appropriate accessor (i.e. "get") methods. Also, the class should provide two other public methods: Method Credit should add an amount to the current balance. Method Debit should withdraw money from the Account and ensure that the debit amount does not exceed the Account’s balance. If it does, the balance should be left unchanged, and the method should print the message "Insufficient Funds." Base class Account should also have a method called PrintAccount that prints the account’s name, number, and balance.

Derived class SavingsAccount should inherit the functionality of an Account, but also include a decimal instance variable indicating the interest rate (double) assigned to the Account. Call this variable InterestRate. SavingsAccount's constructor should receive the account's name, account number, initial balance, and an initial value for the interest rate. The constructor should call the base class constructor to initialize the account's name, number, and balance. It should also call a method in its own class, setInterestRate, which should set the InterestRate variable and validate that the rate is a positive number. If the interest rate passed in is negative, set the interest rate to zero. SavingsAccount should provide public method CalculateInterest that takes no arguments and returns a decimal indicating the amount of interest earned by an account. Method CalculateInterest should determine this amount by multiplying the interest rate by the account balance. [Note: SavingsAccount should inherit methods Credit and Debit without modifying them.] Finally, create a method in this derived class that overrides the PrintAccount method in the base class. In it, call the base class method to print out the account's name, number, and balance, and include code in the derived class’s method to print out the information specific to the derived class (i.e. InterestRate).

Derived class CheckingAccount should inherit from base class Account and include a decimal instance variable that represents the fee charged per transaction. Call this variable FeeCharged. CheckingAccount's constructor should receive the account's name, account number, initial balance, as well as a parameter indicating a fee amount. Create a mutator method, setFeeAmount, and call it from the constructor. If the fee amount is negative, the setFeeAmount should set it to zero. Class CheckingAccount should redefine methods Credit and Debit so that they subtract the fee from the account balance whenever either transaction is performed successfully. CheckingAccount's versions of these methods should invoke the base-class Account to perform the updates to an account balance. CheckingAccount's Debit method should charge a fee only if money is actually withdrawn (i.e. the debit amount does not exceed the account balance.) [Hint: Define Account's Debit method so that it returns a bool indicating whether money was withdrawn. Then use the return value to determine whether a fee should be charged.] Finally, create a method in this derived class that overrides the PrintAccount method in the base class. In it, call the base class method to print out the account's name, number, and balance, and include code in the derived class’s method to print out the information specific to the derived class (i.e. FeeCharged).

After defining the classes in this hierarchy, write an application that creates one object of each derived class and tests their methods. Add interest to the SavingsAccount object by first invoking its CalculateInterest method, then passing the returned interest amount to the object's Credit method. The order of events should be performed as follows:
1. Create a new checking account object. Assign it an initial balance of \$1,000. The account name should be your last name concatenated with the word "Checking", and the account number should be 1. The fee charged should be 3.00. Print a description of this transaction (i.e. "Created checking account with \$1,000 balance.")
2. Create a new savings account object. Assign it an initial balance of \$2,000. The account name should be your last name concatenated with the work "Savings", and the account number should be 2. The interest rate should be 5%. Print a description of this transaction (i.e. "Created savings account with \$2,000 balance.")
3. Print the checking account object's information.
4. Print the savings account object's information
5. Deposit \$100 in the checking account and print a description of this transaction (i.e. "Deposit \$100 into checking.") (this should generate a fee charged as well)
6. Print the checking account object's information
7. Withdraw \$50 from the checking account and print a description of this transaction (i.e. "Withdraw \$50 from checking.") (this should generate a fee charged as well)
8. Print the checking account object's information
9. Try to withdraw \$6,000 from the checking account and print a description of this transaction (i.e. "Withdraw \$6,000 from checking.") (This should not generate a fee but instead produce an error message that the user has Insufficient Funds. The balance should remain unchanged.)
10. Print the savings account object's information
11. Deposit \$3,000 in the savings account and print a description of this transaction (i.e. "Deposit \$3,000 into savings.")
12. Print the savings account object's information
13. Withdraw \$200 from the savings account and print a description of this transaction (i.e. "Withdraw \$200 from savings.")
14. Print the savings account object's information
15. Calculate the interest on the savings account and print a description of this transaction (i.e. "Calculate Interest on savings.")
16. Print the savings account object's information
17. Try to withdraw \$10,000 from the savings account (This should produce the Insufficient Funds error message and leave the balance unchanged.) Print a description of this transaction (i.e. "Withdraw \$10,000 from savings.")
18. Print the savings account object's information

4. ## BMIS 209 Programming Assignment 4 SavingsAccount Program

Regular Price: \$15.00

Special Price: \$12.00

BMIS 209 Programming Assignment 4 SavingsAccount Program

Create a class called SavingsAccount. Use a static variable called annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance, indicating the amount the saver currently has on deposit. Provide method CalculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12 – this interest should be added to savingsBalance. Provide static method setAnnualInterestRate to set the annualInterestRate to a new value.

Write an application to test class SavingsAccount. Create three savingsAccount objects, saver1, saver2, and saver3 with balances of \$2,000.00, \$3,000.00, and 0.00, respectively. Set annualInterestRate to 4%, then calculate the monthly interest and display the new balances for both savers. Then set the annualInterestRate to 5%, calculate the next month’s interest and display the new balances for both savers.

Technical Requirements:
Create SavingsAccount class with static variable annualInterestRate and private instance variables savingsBalance (double) and savingsAccountName (string).
Create a mutator method to set the savingsAccountName. Call this method setSavingsAccountName. The method should take a string argument and return void.
Create an accessor method to retrieve the savingsAccountName. Call this method getSavingsAccountName. The method should take no arguments and return a string (i.e. the savingsAccountName).
Create a mutator method to set the savingsBalance. Call this method setSavingsBalance. The method should take a double argument and return void.
Create an accessor method to retrieve the savingsBalance. Call this method getSavingsBalance. The method should take no arguments and return a double (i.e. the savingsBalance).
Include two constructors. The first takes no arguments and sets the savingsBalance variables to zero and sets the savingsAccountName to an empty string by calling the second (i.e. two argument) constructor with 0 and an empty string. The second constructor takes one double argument (the savingsBalance) and one string argument (the savingsAccountName), and sets the savingsBalance by calling the setSavingsBalance method and setSavingsAccountName method, respectively.
Create CalculateMonthlyInterest method with formula. The method should return void.
Create setAnnualInterestRate method to take a double argument representing the annualInterestRate and return void.
Create PrintSavingsAccount method to display the savingsBalance, savingsAccountName, and annualInterestRate for an object. Use the output shown below as a guideline for the display.
Create a separate class called SavingsAccountTest, which contains the Main() method.
In the Main() method, create three savingsAccount objects called saver1, saver2, and saver3. Initialize saver1 and saver2 with the balances listed above and the names "Saver_One" and "Saver_Two", respectively. Do not initialize saver3 with anything. Instead, create the object by invoking its zero-argument constructor, which will initialize its balance to 0 and its name to an empty string.
In the Main() method, call setAnnualInterestRate to set the interest rate to 4%.
Next, call the setSavingsAccountName for saver3 to set its name to "Saver_Three". Then, call the setSavingsAccountBalance for saver3 to set its balance to \$50,000.
Print the results by calling PrintSavingsAccount for each object.
Next, call the CalculateAnnualInterestRate method for all three saver objects.
Print the results again by calling PrintSavingsAccount for each object.
Next, change the annualInterestRate to 5% by calling the setAnnualInterestRate method.
Print the results again by calling PrintSavingsAccount for each object.

5. ## Advanced Visual Basic 2010 Chapter 4 Programming Challenge 4 Advanced Karate Member Dates

Regular Price: \$12.00

Special Price: \$10.00

Advanced Visual Basic 2010 Chapter 4 Programming Challenge 4 Advanced Karate Member Dates

Enhance the program you created in Programming Challenge 3 by giving the user a choice between displaying members who have joined before a given date and members who have joined on or after the given date. Figure 4-71 shows members who joined before 6/30/2007. Figure 4-72 displays a list of members who joined on or after the same date.
You might want to create two queries, one for each type of search. At runtime, when the user switches between the radio buttons, the event handlers can call either of the two Fill methods that you created in the TableAdapter.

6. ## Advanced Visual Basic 2010 Chapter 4 Programming Challenge 3 Karate Member Dates

Regular Price: \$12.00

Special Price: \$10.00

Advanced Visual Basic 2010 Chapter 4 Programming Challenge 3 Karate Member Dates

Create a program that uses the Members table of the Karate database. Let the user select a date from a DateTimePicker control. The program must display all members who joined before the selected date (see Figure 4-70). Use a parameterized query.

7. ## POS 409 Week 4 Employees C# Program

Regular Price: \$15.00

Special Price: \$12.00

POS 409 Week 4 Employees C# Program

Create a class called Employee that will include the attributes of all employees of your organization. Include at least five attributes. If you are not currently working, you may use a fictional organization or one with which you are familiar.

Add a second class that inherits from the Employee class and describes a subgroup of employees. For example, you may define the class as Managers. In the case of city employees, you may define the class as Police Officers. Define at least three attributes that are specific to this subclass.

Design, implement, test, and debug a C# program that asks the user to enter attributes for members of the subclass on a single form. The entries will include fields for the attributes of the main Employee class as well as the subclass. Include a second form that will display a cumulative list of all the employee data that the user has entered.

Add a button that will exit the program.
you name, date, project description and class must be in the code as comments (similar to an APA title page).
Your project must be properly documented (describe the use of variables, describe how a function or routine works, use proper naming conventions for variables and labels)

Zip all files of the project together and submit the zipped file.

8. ## CIS 170 Week 5 iLab 5 of 7 Tournament Stats and Alphabetical Order Program

Regular Price: \$15.00

Special Price: \$12.00

CIS 170 Week 5 iLab 5 of 7 Tournament Stats and Alphabetical Order Program

Part A: Tournament Stats

Requirements
Your mission: Write a program to determine statistics for a video game tournament. The user will input names and scores of all tournament players. The program will calculate the average score and display the players who scored below average.

The program will implement these functions:
• Main(): Declares variables for the number of players and average score, and two arrays of size 100: one to store player names and the other to store their respective scores. Calls the following functions in sequence, passing necessary parameters by reference:
InputData( ): Gets player names and scores from the user and stores them into the two arrays for an unknown number of players up to 100.
DisplayPlayerData(): Displays each player’s name and score.
CalculateAverageScore( ): Calculates the average score and returns it by value.
DisplayBelowAverage( ): Displays the names and scores of players who scored below average.

Sample output:
Enter Player Name (Q to quit): Bob
Enter score for Bob: 3245
Enter Player Name (Q to quit): Sue
Enter score for Sue: 1098
Enter Player Name (Q to quit): Dave
Enter score for Dave: 8219
Enter Player Name (Q to quit): Pat
Enter score for Pat: 3217
Enter Player Name (Q to quit): Q

Name Score
Bob 3245
Sue 1098
Dave 8219
Pat 3217

Average Score: 3944.75
Players who scored below average

Name Score
Bob 3245
Sue 1098
Pat 3217

Press any key to continue . . .
Tips
Best practices: Don’t try to write too much at a time! First, write an outline in comments based on the requirements and the pseudocode. Then, implement each function one at a time. Start each by writing a shell that just accepts data and perhaps prints it out for testing purposes. Test by calling the function from Main(). Then, add more functionality. Keep working incrementally, compiling and testing as you go. Set breakpoints and use the debugger at each phase to make sure your logic is working correctly. Then, use the same approach to implement each of the other functions.
Pseudocode
• Main Function
Declare player and score arrays, and variables for number of players and average score.
Call the InputData( ) function, passing arrays and number of players variable by reference
Call the DisplayPlayerData( ) function, passing arrays and number of players variable by reference
Call the CalculateAverageScore( ) function, passing arrays and number of players by reference. Store returned value in average variable.
Display the average score
Call the DisplayBelowAverage( ) function, passing arrays and number of players variable by reference, passing average variable by value

• InputData function
Loop while the number of players is less than the length of the array
Prompt for the player’s name
If the user entered Q, break out of the loop
Prompt the user for the player’s score
Add 1 to the number of players

• DisplayPlayerData function
Loop to display the name and score of each player

• CalculateAverageScore function
Loop to add up the scores
Divide by the number of players to calculate the average score
Return the average score to main

• DisplayBelowAverage function
Loop to display the names and scores of all players who scored below the average score

END OF PART A

Part B: Alphabetical Order
Requirements
Your mission: Write a program to alphabetize a list of last names. The user will input an undetermined number of last names. The program will display the number of names entered and alphabetized lists of the names in ascending (A-Z) and descending (Z-A) order.

Your program will store the names in an ArrayList object. It will use various ArrayList properties and methods to implement the program requirements.
Sample output:

Enter a last name: Roberts
Keep going? (Y/N): y
Enter a last name: DeLay
Keep going? (Y/N): y
Enter a last name: Foreman
Keep going? (Y/N): y
Enter a last name: Ganguly
Keep going? (Y/N): n
4 last names entered

Names in Ascending Order
DeLay
Foreman
Ganguly
Names in Descending Order
Roberts
Ganguly
Foreman
DeLay

Tips
Best practices: Don’t try to write too much at a time! First, write an outline in comments based on the requirements and the pseudocode. Then, work on instantiating an ArrayList object, followed by implementing the loop that will get user input. As always, keep things simple and implement incrementally. Review the list of ArrayList methods and properties in the textbook and experiment with the ones you think you’ll need.
Pseudocode
• Main function
• Instantiate ArrayList object
• Loop to get last names, until user wants to quit
o Add each last name to the ArrayList
• Display the count of the last names
• Sort the ArrayList
• Loop to display the names
• Reverse the order of the ArrayList
• Loop to display the names
END OF LAB

9. ## POS 409 Week 5 Database Application

Regular Price: \$20.00

Special Price: \$15.00

POS 409 Week 5 Database Application

Build a SQL Server database in your Visual Studio project. Add a table in the database using the properties of the classes you defined in Week Four as your fields. Populate the table with at least five records. The table can be manually populated within Visual Studio instead of populated in a programmatic manner.

Design, implement, test, and debug a C# program to access the database and display the entries in a DataGridView. As with prior weeks, remember to utilize the concepts described in the weekly reading to complete the project. The type of application to be developed is a Windows Forms application.

Use SQL to create two queries in the table adapter on the form. For the first query, sort the data in the DataGridView by one of the fields in the table. Create a button on the form to execute the query to sort the data. For the second query, use one of the fields on the form in a Where clause to only display a subset of data in the DataGridView. For example, if one of the fields in the table is QuantityOnHand, you could have the query display only records where QuantityOnHand is greater than a particular amount. Create another button on the form to execute the query to display a subset of the data using the second query.

Include identifying information in the form of block comments at the top of each class in the project (programmer name, date, program description). Include adequate comments throughout the program, utilize meaningful names for controls, variables, fields, and forms. Include white space for readability purposes in the code. The focus of the project is on learning the C#.Net syntax. However, ensure the form is simple and easy to understand for the user. Refer to the Individual Assignment grading form to view grading criteria.

Zip the files of the project together and submit the zipped file. Include the database in your zip file also.

10. ## Advanced Visual Basic 2010 Chapter 5 Programming Challenge 5 Training Workshops

Regular Price: \$25.00

Special Price: \$20.00

Advanced Visual Basic 2010 Chapter 5 Programming Challenge 5 Training Workshops

Use the Programming Challenge 3 from Chapter 1 as a starting point for this challenge.
This version will be a 3-tier application.
1. Add an ID property to the Workshop class.
2. Create a database to replace the data file that was used for input in Chapter 1. In it, create a database table named Workshops that contains the workshop ID, category ID, number of days, cost of the workshop, and workshop title. Also in the database, create a Categories table that contains category ID and category description columns.
3. Create a DataSet containing table adapters based on the two database tables. In addition, create a TableAdapter that joins the two tables and contains the workshop ID, workshop category name, number of days, cost, and workshop description.
4. The Workshop class represents the middle tier. In this class, declare an instance of the TableAdapter class so you can call the TableAdapter methods. Provide properties and methods in the Workshop class that are called by your MainForm and DetailsForm classes.
5. Display the list of workshops in a DataGridView control, as shown in Figure 5-32. When the user selects a workshop in the grid, display the Workshop Details form, as shown in Figure 5-33. The combo box is filled from the Categories TableAdapter. The user must be able to modify a workshop in this window and save his or her changes. When the details form closes, the grid must be refreshed, so the user can see the changes he or she made.