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 a small java application to read the file

Write a small Java program that uses the information you gained in part (a) to read the data in the database and print it to an output text file called accounts.txt

  Write a program that prints a payroll statement

Write a program that accepts the subsequent information from the user and prints a payroll statement:

  Write a program that can be used to gather statistical data

Write a program that can be used to gather statistical data about the number of movies college students see in a month. The program should ask the user how many students were surveyed and dynamically allocate an array of that size

  Achieving simplicity and merely being simplistic

What is the difference between achieving simplicity and merely being simplistic?

  Write a java program that revise the meanmedian class

Write a Java program that Revise the MeanMedian class so that the user can enter any number of values up to 20. If the list has an even number of values, median is the numeric average of the values in the two middle positions.

  Calculate the final grade

write must ask the user to input the percent score for each of these items then calculate the final grade.

  Chat monitoring system

The name of the project is chat monitoring system. in the file you will see the screenshot diagram 2A are my design, You need to upgrade, to look professional like the diagram 2B. Java, netbeans and GUI.

  A regular polygon is an n-sided polygon

A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree(i.e the polygon is both equilateral and equiangular).

  Modify the homestead furniture store application

Design an application for the homestead furniture store that gets sales transaction data including an account number customer name and purchase price.

  Prints all real solutions to the quadratic equation

Write a Java program that prints all real solutions to the quadratic equation ax^2 + bx + c = 0. Read in a, b, c and use the quadratic formula

  Create a simple votingmachine

In this exercise you will create a simple VotingMachine. In the United States, when a candidate runs for office, the person is often identified as a Democrat, Republican, or Independent

  Write a java program that inputs a string

Write a program that inputs a string similar to: 3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3. Your program should apply the Shunting-yard algorithm to this string to ultimately produce a mathematical result.

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