VB/C#

Need Help in Visual Basic and C# Assignments?
We can help you if you are having difficulty with your Visual Basic Assignment. Just email your assignments at support@assignmentcache.com.
We provide help for students all over the world.

Items 11 to 20 of 162 total

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

Grid  List 

Set Ascending Direction
  1. BMIS 209 Programming Assignment 5 Account Inheritance Program

    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

    Learn More
  2. Advanced Visual Basic 2010 Chapter 6 Programming Challenge 9 Weather Station Summary

    Advanced Visual Basic 2010 Chapter 6 Programming Challenge 9 Weather Station Summary

    Regular Price: $20.00

    Special Price: $15.00

    Advanced Visual Basic 2010 Chapter 6 Programming Challenge 9 Weather Station Summary


    The purpose of this programming challenge is to show how events raised by a class can be broadcast to more than one class. Use the Weather Station Events application from Tutorial 6-7 as a starting point for this programming challenge. Create a Summary form, as shown in Figure 6-29, that keeps a running count of each type of event raised by the WeatherStation class. The Summary form’s class contains an event handler for each type of event raised by the WeatherStation class. Just before showing the Summary form, the main form can pass to it a reference to the same WeatherStation object declared at the top of the main form. Use the Show (not ShowDialog) method to display the Summary form. As events appear on the main form, the summary form counts the number of each type of event that has been raised so far.

    Learn More
  3. Visual Basic 2010 How to Program Deitel Exercise 9.7 Employee Class

    Visual Basic 2010 How to Program Deitel Exercise 9.7 Employee Class

    Regular Price: $12.00

    Special Price: $10.00

    Visual Basic 2010 How to Program Deitel Exercise 9.7 Employee Class


    (Employee Class) Create a class called Employee that includes three pieces of information as instance variables-a first name (type String), a last name (type String) and a monthly salary (type Integer). Your class should have a constructor that initializes the three instance variables. Provide a property for each instance variable. The property for the monthly salary should ensure that its value remains positive-if an attempt is made to assign a negative value, throw an exception. Write an application that demonstrates class Employee's capabilities. Create two Employee objects and display each object's yearly salary. Then give each Employee a 10% raise and display each Employee's yearly salary again.

    Learn More
  4. Visual Basic 2010 How to Program Deitel Exercise 7.4 Write statements

    Visual Basic 2010 How to Program Deitel Exercise 7.4 Write statements

    Regular Price: $12.00

    Special Price: $10.00

    Visual Basic 2010 How to Program Deitel Exercise 7.4 Write statements


    Write statements to accomplish each of the following task:
    a) Display the value of element 6 of array members.


    b) Using a For...Next statement, assign the value 8 to each of the five elements of one-dimensional Integer array values.


    c) Total the 100 elements of floating-point array results.


    d) Copy 11-element array source into the first portion of 34-element array sourceCopy.


    e) Determine the smallest and largest values in 99-element floating-point array data.

    Learn More
  5. Visual Basic 2010 How to Program Deitel Exercise 7.15 Telephone-Number Word Generator

    Visual Basic 2010 How to Program Deitel Exercise 7.15 Telephone-Number Word Generator

    Regular Price: $20.00

    Special Price: $15.00

    Visual Basic 2010 How to Program Deitel Exercise 7.15 Telephone-Number Word Generator


    (Telephone-Number Word Generator) Standard telephone keypads contain the digits zero through nine. The numbers two through nine each have three letters associated with them(Fig 7.29). Many people find it difficult to memorize phone numbers, so they use the correspondence between digits and letters to develop seven-letter words that correspond to their phone numbers. For example, a person whose telephone number is 686-2377 might use the correspondence indicated in Fig. 7.29 to develop the seven-letter word "NUMBERS." Every seven-letter word corresponds to exactly one seven-digit telephone number. A restaurant wishing to increase its takeout business could surely do so with the numbers 825-3688 (that is, "TAKEOUT"). Every seven-letter phone number corresponds to many different seven-letter combinations. Unfortunately, most of these represent unrecognizable juxtapositions of letter. It's possible, however, that the owner of a barbershop would be pleased to know that the shop's telephone number, 424-7288, corresponds to "HAIRCUT." A veterinarian with the phone number 738-2273 would be pleased to know that the number corresponds to the letters "PETCARE." An automotive dealership would be pleased to know that the dealership number, 639-2277, corresponds to "NEW CARS."


    Write an application that allows the user to enter a seven-digit number in a TextBox, and displays every possible seven-letter word combination corresponding to that number in a multiple line scrollable TextBox when the user clicks the Generate Words button. There are 2,187 (3 To the seventh power) such combinations. Avoid phone numbers with the digits 0 and 1.

    Learn More
  6. Programming in Visual Basic 2010 Chapter 4 Novelty Solution

    Programming in Visual Basic 2010 Chapter 4 Novelty Solution

    Regular Price: $15.00

    Special Price: $12.00

    Programming in Visual Basic 2010 Chapter 4 Novelty Solution


    Create a Visual Basic Windows application. Use the following names for the solution, project, and form file, respectively: Novelty Solution, Novelty Project, and Main Form.vb. Save the application in the VB2010\Chap04 folder. Create the interface shown in the figure 4-65. When the user clicks the Calculate Total button, the button's Click event procedure should add the item price to the total of the prices already entered; this amount represents the subtotal owed by the customer. The procedure should display the subtotal on the form. It also should display a 3% sales tax, the shipping charge, and the grand total owed by the customer. The grand total is calculated by adding together the subtotal, the 3% sales tax, and a $15 shipping charge. For example, if the user enters 26.75 as the item price and then clicks the Calculate Total button, the button's Click event procedure should display 26.75 as the subtotal, 0.80 as the sales tax, 15.00 as the shipping charge, and 42.55 as the grand total. If the user subsequently enters 30 as the price and then clicks the Calculate Total button, the button's Click event procedure should display 56.75 as the subtotal, 1.70 as the sales tax, 15.00 as the shipping charge, and 73.45 as the grand total. However, when the subtotal is at least $100, the shipping charge is 0.00. Code the application. Save the solution and then start and test the application. Close the code editor window and then close the solution.

    Learn More
  7. BMIS 209 Programming Assignment 7 Account hierarchy

    BMIS 209 Programming Assignment 7 Account hierarchy

    Regular Price: $15.00

    Special Price: $12.00

    BMIS 209 Programming Assignment 7 Account hierarchy


    Based on the program you created for Assignment 5, modify your code to perform the following steps.


    In Assignment 5, you created an Account hierarchy with a base class (Account) and two derived classes (SavingsAccount and CheckingAccount). Three of the mutator methods in this assignment validated user input: setBalance, setInterestRate, and setFeeCharged. In all of these methods, you were instructed to set the respective variables equal to zero if the user passed in a negative amount. In this assignment, you will modify your code such that if the user passes in a negative amount, an exception will be thrown that alerts the user that a negative amount has been entered. The program should catch the exception and display the error message to the user. Once an error (negative amount) has occurred, the program should inform the user that negative numbers are not permitted. It should then redisplay the menu. If an exception has not occurred, and a checking or savings object has been successfully created, the program should print the information for that object.


    [Hint: You will need to create an exception class – call it NegativeNumberException – that takes a string as an argument to its constructor that represents the error. The string should be "Invalid Entry – Negative numbers are not permitted."]


    Modify your Main() method such that instead of hardcoding the SavingsAccount and CheckingAccount information, you prompt the user to enter the needed information. Generate a menu like the one below and loop until the user enters "Q" to quit the application.


    Based on the 18 steps required for Assignment 5, you only need to implement steps 1 and 2 and instantiate their creation based on the user's menu selections. You may remove steps 3 through 18. This assignment is only intended to demonstrate your ability to handle exceptions.

    Learn More
  8. Advanced Visual Basic 2010 Chapter 5 Programming Challenge 5 Training Workshops

    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.

    Learn More
  9. BMIS 209 Programming Assignment 6 Polymorphic Banking Application

    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
    [your name]-Savings-1 1 1,000 4%
    [your name]-Savings-2 2 2,000 5%
    [your name]-Checking-1 3 3,000 3.00
    [your name]-Checking-2 4 4,000 4.00


    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();

    Learn More
  10. Advanced Visual Basic 2010 Programming Challenge 3 Winter Sports Rentals

    Advanced Visual Basic 2010 Programming Challenge 3 Winter Sports Rentals

    Regular Price: $20.00

    Special Price: $15.00

    Advanced Visual Basic 2010 Programming Challenge 3 Winter Sports Rentals


    A winter sports rentals store needs an application that will let the user (a store clerk) enter information about each customer’s rental. The user should be able to select multiple equipment items, a rental duration, and insurance. Figure 2-46 shows a sample design, after the user has selected all items and clicked the Calculate button. Include a check box showing that a liability waiver was signed, and let the user input the deposit amount. Use a combo box to list the rental durations, but do not let the user type in an arbitrary duration. When the user clicks the Calculate button, the application should calculate the subtotal, tax, and balance due. Also, use a LinkLabel control (Weather forecast) to display a second form containing a WebBrowser control.


    The form containing the WebBrowser control, shown in Figure 2-47, should display a series of links to weather forecasts for the area near the winter sports rental store. Place a ToolStrip container at the top of the form; it should contain a text box (for entering a Web address), a Go button to navigate to the address typed into the text box, and a Close button that closes the browser window. Note: We do not endorse any particular Web search engine, so you may substitute another of your choosing.


    Error Checking: When the user clicks the Calculate button, make sure that at least one item has been selected from the equipment list box. Also, a rental duration must have been selected, and the Deposit amount must be a positive number. Use the ErrorProvider control to display all error messages. The following rental durations should appear in the combo box: 1 day, 2 days, 3 days, 1 week, 2 weeks.


    Calculations: Each equipment item has a rental rate based on different durations. Create a two-dimensional array containing all possible rental rates. Each row should contain the rental rates for a single item, using the different rental durations. The following first row of the array, for example, contains rental rates for Skis, beginner:
    35,45,80,150,280
    For this equipment, the rates are $35.00 for 1 day, $45.00 for 2 days, $80.00 for 3 days, $150.00 for a week, and $280.00 for 2 weeks. Damage insurance costs 10 percent of the total rental charge before taxes.

    Learn More

Items 11 to 20 of 162 total

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

Grid  List 

Set Ascending Direction