Inventory3

Modify the Inventory Program by adding a button to the GUI that allows the user to move to the first item, the previous item, the next item, and the last item in the inventory. If the first item is displayed and the user clicks on the Previous button, the last item should display. If the last item is displayed and the user clicks on the Next button, the first item should display.
Add a company logo to the GUI using Java graphics classes.

Inventory3

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/YIsAK

 

 

CIS247_WK1_Lab

In order to reuse the code in the following weeks, you will include different parts of the program in the following three separate files within Visual Studio:

1.Program.cs will hold the Main method, which is the starting point for the program execution.
2.ApplicationUtilities.cs will hold the re-usable methods that provide the user information about the application.
3.InputUtilities.cs will hold the re-usable methods that will collect the user information.
Using the methods defined in these classes you will construct a program that prompts the user for the following:

1.Your name, which will be a string data type
2.Your age, which will be an integer data type
3.The gas mileage for your car, which will be a double data type
Also, note that the program should contain a well document program header and demonstrated and explained in the Programming and Convention Standards document found in the Week 1 lecture and Doc Sharing.

Deliverables
Step Deliverable
Step 4 Screen shots of running program results
Step 5 Zip file with entire Lab files

Preparation:

•If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home.
•Locate the Visual Studio 2010 icon and launch the program.
iLAB STEPS STEP 1: Review the Design Back to Top
Download the program description and pseudocode. Make sure you fully understand the program design and ask any questions that you may have BEFORE you start programming.

Click Week 1 Lab Design to download the program design:

STEP 2: Construct the Program Back to Top
1.Start Visual Studio and create a new project titled “CIS247_WK1_Lab_LASTNAME”
2.Using the Week 1 Lab Design construct the methods
3.Once the methods are constructed, use the Week 1 Lab Design document to create the Main method.
STEP 3: Compile and Test Back to Top
•When done, compile your code by clicking on Build->Build Solution. Then debug any errors until your code is error-free. If you click on the error in the Error Window, it takes you to the statement in your code, which produced the error. You can then click on F1, which launches the Microsoft Help Library, to see additional information and possible suggestions on how to fix your error.
•To execute your code, click Start and then Start Debugging. Check your output to ensure that you have the desired output. If you need to fix anything, close your execution window, modify your code as necessary, and rebuild.
•Create a test plan in order to make sure your application runs properly. A test plan is a series of tests you choose to perform, where you predefine the input values and write down the expected output. When you execute your code given the input values, your program should display the expected output. If it does not, this means you need to review your code and correct any mistakes. Creating several scenarios, based on the program complexity, ensures that your code runs properly.
•Execute your code and check your output to ensure that you have the desired output. If you need to fix anything, close your execution window, modify your code as necessary, and rebuild.
STEP 4: Screen Prints Back to Top
•Capture a screen shot of your application’s output and paste it into a Word Document.
•The output of your program should resemble the following:

CIS247_WK1_Lab

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/EUkBR

 

 

10-1 Create an object inheritance hierarchy

Create an object inheritance hierarchy that a bank might use to represent customer’s bank accounts. Here are the specifications:

 

Class hierarchy:

 

  1. Create a Windows Form project.
  2. Add a Class “Account” (base class)anddefine the following members (Use the names given below):
    1. Instance variable balanceValue

Decimal type, stores the account balance

    1. Constructor Sub New

Need one Decimal parameter, initialize instance variable balanceValue using the parameter

    1. Property Balance

i.      Define Get method to return balanceValue

ii.      Define Set method

a)      If paramater >=0.0, assign it to balanceValue

b)      If paramater < 0.0, assign 0.0 to balanceValue.

    1. Sub Credit

i.      Declared as overridable, so its derived classes could override it.

ii.      Need one Decimal parameter

iii.      Add this parameter to balanceValue

    1. Function Debit

i.      Declared as overridable, so its derived classes could override it.

ii.      Return a Boolean value

iii.      Need one Decimal parameter

iv.      If parameter > balanceValue, then just return False.

v.      If parameter <= balanceValue, deduct parameter value from balanceValue and return True.

    1. Function ToString

i.      Overrides Object’s ToString function

ii.      Display account’s balance

iii.      Please use the following definition in order to make testing easier.

 

‘overrides ToString() to display account’s information

Public Overrides Function ToString() As String

Return (String.Format(“Balance: {0:C2}”, Balance) & vbCrLf)

End Function

 

  1. Add Class “CheckingAccount” in the project, which inherits from class Account and includes the following members (Use the names given below):
    1. Instance variable transactionFee

Decimal type, stores the fee chared per transaction

    1. Constructor Sub New

i.      Need two Decimal parameter

ii.      Call base class’s constructor to set up base class part

iii.      Initializes instance variable transactionFee using parameter’s value, if parameter < 0.0, initialize transactionFee to 0

    1. Property Fee

i.      Define Get method to return transactionFee

ii.      Define Set method

a)      If paramater >=0.0, assign it to transactionFee

b)      If paramater < 0.0, assign 0.0 to transactionFee.

    1. Sub Credit

i.      Overrides base class’s Credit method.

ii.      Call base class’s Credit method to perform credit transaction

iii.      Deduct transactionFee from balance

    1. Function Debit

i.      Overrides base class’s Debit method.

ii.      Call base class’s Debit method to perform debit transaction

a)      If the call returns True (successful), deduct transactionFee from balance and return True

b)      If the call returns False (unsuccessful), do NOT deduct transactionFee from balance, just return False

    1. Function ToString

i.      Overrides base class’s ToString function

ii.      Display transaction fee and balance (calling base class’s method)

iii.      Please use the following definition in order to make testing easier.

 

‘overrides ToString() function to display checking’s information

Public Overrides Function ToString() As String

Dim message As String

message = String.Format(“Transaction fee: {0:C2}”, Fee) & vbCrLf

message &= MyBase.ToString()

Return message

End Function

 

  1. Add another class “SavingsAccount” inproject, which inherits from base class “Account” and includs the following members(Use the names given below):
    1. Instance variable interestRate

Doublel type, stores the inerest rate of savings account

    1. Constructor Sub New

i.      Need one Decimal parameter and one Double parameter

ii.      Call base class’s constructor to set up base class part

iii.      Initializes instance variable interestRate using the 2nd parameter’s value, if parameter < 0.0, initialize inerestRate to 0

    1. Property Rate

i.      Define Get method to return interestRate

ii.      Define Set method

a)      If paramater >=0.0, assign it to interestRate

b)      If paramater < 0.0, assign 0.0 to interestRate

    1. Function CalculateInterest

i.      No parameter

ii.      Return a decimal value

iii.      interest = balance * interestRate / 12

iv.      add this interest to balance

v.      return the interest

    1. Function ToString

i.      Overrides base class’s ToString function

ii.      Display interest rate and interest amount, as well as balance (calling base class’s method)

iii.      Please use the following definition in order to make testing easier.

 

‘overrides ToString() function to display savingsAccount’s information

Public Overrides Function ToString() As String

Dim message As String

message = String.Format(“Interest rate: {0:p2}”, Rate) & vbCrLf

message &= String.Format(“Interest earned: {0:c2}”, CalculateInterest()) & vbCrLf

message &= MyBase.ToString()

Return message

End Function

 

  1. Now, let’s test the classes, rename the file “Form1.vb” to “AccountTesterForm.vb”, create “Form_Load” event handler method, copy the following code and paste into the “Form_Load” method. Please do not modify the code in this tester in order to make testing easier.

 

BalanceLabel
BankAccountForm

 

 

Dim account1 As New SavingsAccount(25, 0.03)

Dim account2 As New CheckingAccount(80, 1)

 

‘ display initial balance of each object

balanceLabel.Text = “account1″ & vbCrLf & Convert.ToString(account1.GetType()) & vbCrLf & account1.ToString() & vbCrLf

balanceLabel.Text &= “account2″ & vbCrLf & Convert.ToString(account2.GetType()) & vbCrLf & account2.ToString() & vbCrLf

‘ debit each account and show new balance

 

balanceLabel.Text &= “Attempting to debit account1 by $20.00.” & vbCrLf

If account1.Debit(20) = True Then

balanceLabel.Text &= account1.ToString() & vbCrLf

End If

 

balanceLabel.Text &= “Attempting to debit account2 by $40.00.” & vbCrLf

If account2.Debit(40) Then

balanceLabel.Text &= account2.ToString() & vbCrLf

End If

 

‘ credit each account and show new balance

balanceLabel.Text &= “Crediting $40.00 to account1.” & vbCrLf

account1.Credit(40)

balanceLabel.Text &= account1.ToString() & vbCrLf

 

balanceLabel.Text &= “Crediting $65.00 to account2.” & vbCrLf

account2.Credit(65)

balanceLabel.Text &= account2.ToString()

 

  1. Run your project in your computer, you should get the similar output, If not, please debug your code and run it again.

10-1 Create an object inheritance hierarchy

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/vBxu

 

 

!Code a doubly Java

Code a doubly links, sorted list (in ascending order). Each item of the list will just store int. You need to code three classes: Node, SortedList, and GroupProject,

The Node class has three instance variables, all private:
*an int, representing the value stored inside the Node

*a Node (next)

*Another Node (previous)

The methods to code are : constructor (at least one), assessors, mutators.

The SortedList class is a doubly linked list, sorted in ascending order. it has two instance variables, both private:
*an int, representing the number of items in the list

*a Node, representing the head node in the list

The methods to code are:
*insert: this method takes one parameter, an int; it has a void return value.

*delete: this method takes one parameter, an int; it returns a boolean value. If we were successful in deleting the item (ie., the value of the parameter was found in the list), then we return true; if we were not successful, then we want to output a message that the value was not found, and therefore, not deleted, and return false.

*toString: this method takes no parameters and returns a String representation of the list.

*constructor (at least one), and assessors and mutators as appropriate.

All methods should keep the list sorted in ascending order.

The GroupProject class contains the main method; it should do the following:
*create SortedList object reference

*insert successively the values 25, 17, 12, 21, 78, and 47 in the sorted list

*output the contents of the sorted list using the toString method (obviously, 30 will not be found)

*output the contents of the sorted list using the toString method

*delete from the sorted list the value 21, using the delete method

*output the contents of the sorted list using the toString method

Your insert and delete methods should work properly in all possible scenarios: inserting in an empty list, inserting at the beginning of a list, inserting in the middle of a list, inserting at the end of a list, deleting from an empty list (cannot delete), deleting an item not in the list (cannot delete), deleting the first item in a list, deleting in the middle of a list, deleting the last item in a list.

!Code a doubly Java

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/WonC

 

 

Write a java program and pseudocode to read a number

Write a java program and pseudocode to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form. Example: for input 234334564456455 the output should be : 234,334,564,456,455 is two hundred thirty four trillion, and three hundred thirty four billion, and five hundred sixty four million, and four hundred fifty six thousand, and four hundred fifty five. For input 23/3/1996 it should print: March 23, 1996. Split your program into appropriate methods. Note 1: Use arrays of strings. Note 2: Avoid using excessive if-else statements

Write a java program and pseudocode to read a number

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/uUjuF

Pseudocode stack and queue

The task this week is to complete the following 2 structures using a linked list:

 

 

  • Stack

 

  • Queue

 

 

Assume the occurrence of a linked list node is represented by the object “Node” and its “Data” and “NextRef” attributes.

 

 

 

Part 1: Assume a “Head” node exists with the NextRef attribute pointing to the first node in the stack or being null if the stack is empty. Create pseudo code for the following 3 stack methods, showing the logic tied to the inverted list. Include a summary of these actions.

 

push( item )
pop( )
display( )

 

Part 2: Assume “Front” and “Rear” nodes exist with the “NextRef” attributes pointing to the first and last nodes of the queue or being null if the queue is empty. Create pseudo code for the following 3 queue methods, showing the logic tied to the inverted list. Include a summary of these actions.

 

enqueue( item )
dequeue( )
display( )

 

Deliverables:

 

 

  • Pseudo code implemented for both the stack and queue methods

 

  • Documented pseudo code

 

  • Add the completed pseudo code and discussion to the Key Assignment template Section 1: Lists, Stacks, and Queues.

 

Pseudocode stack and queue

Need Solution Email me at: Topsolutions8@gmail.com

or

https://gum.co/EhrS