Question

Instructions: Written in English (Basic Language) Modify the Base Project Sample Code to create a database...

Instructions: Written in English (Basic Language)
Modify the Base Project Sample Code to create a database of your own design that includes at least four data fields.
The overall design and format of your program is up to you.
Your program should implement the following menu options –

A. Add Item
B. List All Items
C. Quit

Any data theme or motif is acceptable, provided your project has at least four data elements.
Please make sure your data structure implements at least one numeric array, and one string array.

Base Code:

Last=1
Dim Name$(50)
'Dim Additional Fields Here
Do
Print "A. Add Name"
Print "B. List Names"
Print "Q. Quit"
Input "Enter Choice: ";Choice$
Select Case Choice$
Case "A"
Input "Enter Name: ";Name$(Last)
'Input Additional Fields Here
Last=Last+1
Case "B"
For x=1 to Last-1
Print Name$(x)
'Print Additional Fields Here
Next x
End Select
Loop Until Choice$="Q"
End

  



0 0
Add a comment Improve this question Transcribed image text
Answer #1

I'm implementing the Base code in Visual Basic, I'm adding individual details in separate arrays (ArrayLists)

The whole code in Visual Basic

Imports System
Imports System.Collections.Generic

Public Class Solution

Public Shared Sub Main(ByVal args() As String)

Dim last As Integer = 1
Dim Sno As New List(Of Integer)()
Dim Names As New List(Of String)()
Dim Job As New List(Of String)()
Dim Sex As New List(Of Char)()
Dim sc As New Scanner(System.in)
system.out.print(" Type A for Add Name" & \n & "Type B for List Names" & \n & "Type Q for Quit")
Dim choice As Char = sc.nextChar()
Do While choice <> 'Q)

If choice = "A"c Then

Console.Write("Enter new Name, sex and Job title separated by space")
Sno.Add(last)
Names.Add(sc.next())
Sex.Add(sc.nextChar())
Job.Add(sc.next())
last += 1

End If

If choice = "B"c Then

Console.Write("Serial no, Name, Sex and job titles of everyone will be displayed")
Do
Console.Write(Sno(i))
Console.Write(Names(i))
Console.Write(Sex(i))
Console.WriteLine(Job(i))
Loop

End If

Loop

' this would work fine

End Sub

End Class

Add a comment
Know the answer?
Add Answer to:
Instructions: Written in English (Basic Language) Modify the Base Project Sample Code to create a database...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Assignment Write a menu-driven C++ program to manage a class roster of student names that can...

    Assignment Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It should work something like this (user input highlighted in blue): Array size: 0, capacity: 2 MENU A Add a student D Delete a student L List all students Q Quit ...your choice: a[ENTER] Enter the student name to add: Jonas-Gunnar Iversen[ENTER] Array size: 1, capacity: 2 MENU A Add a student D Delete a student L List all students...

  • Write a menu-driven C++ program to manage a class roster of student names that can grow...

    Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It should work something like this (user input highlighted in blue): Array size: 0, capacity: 2 MENU A Add a student D Delete a student L List all students Q Quit ...your choice: a[ENTER] Enter the student name to add: Jonas-Gunnar Iversen[ENTER] Array size: 1, capacity: 2 MENU A Add a student D Delete a student L List all students Q...

  • You will modify Project 3 to include a student struct. The struct should include 3 data...

    You will modify Project 3 to include a student struct. The struct should include 3 data members a char array (for the name), a char array (for the housing response), and an int (for units). The four functions will all need to be modified to take a pointer to a student struct. Make the necessary modifications to the code in the function body. You will also provide a menu interface for the user. The menu will initially allow the user...

  • Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anythi...

    Python 3.7 to be used. Just a simple design a program that depends on its own. You should also not need to import anything. No code outside of a function! Median List Traversal and Exception Handling Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen. Your menu should have 6 options 50% below 50% above Add a number to the list/array...

  • Write the code in python, if you cannot answer all the question please dont anser, thanx very much. Please gimme a scr...

    Write the code in python, if you cannot answer all the question please dont anser, thanx very much. Please gimme a screen shot for code. Write clear code with comments and follow coding convention. Comments should include your name, student number and subject code on top of your code Question 1 Create a list to store all the subject codes that you are currently doing at UOW Then use for loop to display it in a table as in the...

  • Description Create a polynomial class with linked lists and implement some basic functions. Specifications Polynomials are...

    Description Create a polynomial class with linked lists and implement some basic functions. Specifications Polynomials are stored in a linked list of Term objects (two classes: Polynomial and Term). Term objects have two data fields: coefficient and exponent, both positive integers. Polynomial will have some methods that create linked list functionality, but not all list operations are needed; include only those used by this program. Do not use a separate linked list class. The list will be non-circular. Make a...

  • Follow instructions to create a visual C++ project, add the CH code, compile, fun and fix...

    Follow instructions to create a visual C++ project, add the CH code, compile, fun and fix errors, Write your Name, course, and date as comments on first line. Write Program's Name epp (Give it your last name with the assignment number as a name... Program0 LAST NAME). Explain what the program is to do along with any directions or instructions needed for program users (ie the purpose of each library included next to #include directive, names and uses of identifiers...etc)....

  • // C code // If you modify any of the given code, the return types, or...

    // C code // If you modify any of the given code, the return types, or the parameters, you risk getting compile error. // Yyou are not allowed to modify main (). // You can use string library functions. #include <stdio.h> #include <stdlib.h> #include <string.h> #pragma warning(disable: 4996) // for Visual Studio #define MAX_NAME 30 // global linked list 'list' contains the list of patients struct patientList {    struct patient *patient;    struct patientList *next; } *list = NULL;  ...

  • Information About This Project             In the realm of database processing, a flat file is a...

    Information About This Project             In the realm of database processing, a flat file is a text file that holds a table of records.             Here is the data file that is used in this project. The data is converted to comma    separated values ( CSV ) to allow easy reading into an array.                         Table: Consultants ID LName Fee Specialty 101 Roberts 3500 Media 102 Peters 2700 Accounting 103 Paul 1600 Media 104 Michael 2300 Web Design...

  • Write a modularized, menu-driven program to read a file with unknown number of records.

    ==============C++ or java================Write a modularized, menu-driven program to read a file with unknown number of records.Create a class Records to store the following data: first and last name, GPA , an Id number, and an emailInput file has unknown number of records; one record per line in the following order: first and last names, GPA , an Id number, and emailAll fields in the input file are separated by a tab (‘\t’) or a blank space (up to you)No error...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT