Write code to store fictitious names in that array

Assignment Help JAVA Programming
Reference no: EM131385013

Activity 1: Create a Windows application to perform the following functionalities.

A) Create an array that contains the names of the months of the year.

B) Using For...Each loop, write code G display the names of the months.

C) Create a second array to store the number of days of corresponding months (ignore leap-years) of first array.

D) Request a month from the user and use "For...loop" to display the number of days for that month.

E) Request a month from the user, delete number of days for that specified month and display the deleted value by using "Do...While loop".

Activity2: Create a Windows application to perform the following functionalities.

An office building has two floors (0 to 1), each of which has four offices (0 to 3). Each office occupied by one person.

A) Declare an array to store the names of occupants for each office.

B) Write code to store fictitious names in that array.

C) Write a short routine to display the occupants of each office along with the corresponding floor and office number.

D) Write a function to display the occupants for the requested office. Use "If...Then" statement to check the existence of that office.

Activity 3: Use Linear Search technique and complete the following function to find the position of the number 55 from the following array. Create a Windows application to display the position.

17

23

31

47

55

62

69

74

88

Public Function LinearSearch() As Interger()

Dim target as integer = ................................. the element to search for

Dim s() as integer = ................................. the array to be searched

Dim last as integer = ................................. the last position of the array

Dim pos as integer = ................................. the middle position of the array

If (last < 0)

Return - 1

End if

while ((.................................) And (.................................))

pos+=1

if ((.................................) And (.................................))

return pos we found it

else

return-1 we didn't find it

end if

end while

Activity 4: Use Binary Search technique and complete the following function to find the position of the number 29 from the following array. Create a Windows application to display the position.

9

15

22

29

36

54

55

61

70

73

88

 Public function BinarySearch() As Integer()

Dim target, first, last, mid As Integer   'Declare all variables

Target = ................................. the element to search for

first = ................................. the fast position of the array

last = ................................. the last position of the array

Dim s() As Integer = ................................. the array to be searched

While (first <= last)   

mid = ................................. /2

If (.................................) Then

Return .................................

Exit While

Else

If (.................................) Then

Last = .................................

Else

first = .................................

End If

End If

End While

Return - 1End Function

Activity 5: Use editor provided test tools, create and execute/run test case for each activity. Finally, test result will be attached with the assessment.

Reference no: EM131385013

Questions Cloud

Discuss about the post given below : You recently visited a social service organization to interview a social worker and to learn more about the services the organization provides.For this Assignment, think about your experience gathering information on the social service agency. Con..
What type of customers will served by internet startup : What zoning ordinances, if any, regulate the type of home-based business you want to start?- What type of customers will be served by the Internet startup?
How different would you approach each audience : COM/295- Describe the product or service, including its main characteristics. Why do you believe this product is worthwhile? A profile of your audience/s. Why are these audience/s important? How different would you approach each audience?
What were the three least important criteria you used : What were the three most important criteria you used when deciding where to locate your company? - What were the three least important criteria you used? Why?
Write code to store fictitious names in that array : An office building has two floors (0 to 1), each of which has four offices (0 to 3). Each office occupied by one person. Declare an array to store the names of occupants for each office. Write code to store fictitious names in that array
Identify economic legal and regulatory forces and trends : Identify economic, legal, and regulatory forces and trends. Critique how well the organization adapts to change. Analyze and explain the supply chain of the new division of the existing business.
What should the waughs have done to avoid given situation : How could the Waughs be disappointed with $32 million?- What should the Waughs have done to avoid this situation?
Discuss about the post given below : In order for counselors to effectively assist clients who are of a different cultural or religious background then their own, it is required that they become multiculturally competent. In highlighting the importance of being multiculturally compet..
Do you agree with the bonneaus decision to sell : Do you agree with the Bonneaus' decision to sell? Why or why not?- Why did the buyers retain Ed as a consultant?

Reviews

len1385013

2/7/2017 3:51:32 AM

This test is based on different programming technique and logic such as syntax, language features, data structure (such as array), standard algorithms (such as sequential search, binary search, insertion and deletion to operate on arrays in aspect of VB.net. It s evaluated the candidate's key programming concepts. For the coding, consider the naming, layout & commenting convention and write internal comments as well. Use editor provided debugging tools to trace code execution and examine variable contents to detect and correct errors. Total allocated time is 3 hours.

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd