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

  Write the definition of a void method

Write the definition of a void method that takes as input two parameters of type int, say sum and testScore. The method updates the value of sum by adding the value of testScore. The new value of sum is sent back to the caller statement

  How many years we think that animal should live

Every animal also has a life expectancy, which is how many years we think that animal should live. The following rules show how to determine the life expectancy

  Organizational report

You have been hired as the CIO of a large multinational Internet advertising company. The president of the company is entertaining a major new software development project to keep track of advertising revenues.

  Vector equation of the intersection

Find the vector equation of the intersection of the surface F(x,y)= x+(pi/2)y^2+tan(xy) and the plane x=(pi/3) . let y=t.

  Design a method in a stack implementation

Design a method in a Stack implementation that allows the user to insert a new member to the "bottom" of a stack.

  Classes and pointers experience using dynamic memory

To practice defining classes using separate compilation using classes, vectors, and pointers experience using dynamic memory.

  Digital image processing using java

Digital image processing using java ..create plugin using Jedit and run it in imageJ

  Implement a personal address book

How to use the program. As soon as an address book is loaded, print out a concise but complete list of the commands a user can enter. One of them should be a "help" command to print out the list again.

  Create a webpage that prints

Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the page layout to the webpage.

  Write a program using jdbc for getting personal information

Write Java application program to change the basic = basic + 500 of all the employees whose age is greater then 40 from employee table then display how many record updated

  Implement a stock quote service as a web application

Implement a stock quote service as a web application using HTML, a java servlet, and a JSP page

  Design and implement an applet that plays a simple game

Design and implement an Applet that plays a simple game to help teach a child to read. The game displays a picture on the left hand side of the Applet and a word on the right hand side. Below the pictures are two buttons for the child to click--on..

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