Create Supplier instance in SupplierTest class, invoke AcceptDetails method to accept the details of the supplier from the user and invoke DisplayDetails method to display the given details of the supplier.
Supplier:
Supplierid: int
SupplierName:
City: String
PhoneNum: String
Email: String
____________________
+Accept Details(Supplier): Void
+Display Details: Supplier
String Supplier Test
_________________
+Main(String[] args)
Define a single dimension array of strings to hold the name of City. Accept some values from the user and store them in the array. Use foreach loop to print all the data of the array.
Create a Class named BooksDemo accepts and displays the details of books using multidimensional array.
BooksDemo
-colName:string[4] = {"BookTitle", "Author", "Publisher", "Price"}
-bookDetails: string[2,4]
+Main(args: string[])
2. Write a program to define a two dimensional array of numbers to store 5 rows and 6 columns. Write a code to accept the data, assign it in array, and print the data entered by the user.
Create a Class named BooksDemo accepts and displays the details of books using multidimensional array.
BOOKDemo:-
colName: String[4] = {"Book title", "Author", "Publisher", "Price"}
bookDetails: String[2, 4]
____________________
+Main(args: string[])
Write a program to define a two dimensional array of numbers to store 5 rows and 6 columns. Write a code to accept the data, assign it in array, and print the data entered by the user.
Define a structure having one member variable as “Number”. Add functions to display the square and cube of the number in the same structure. In the main function, Initialize the structure variable, and display the square or the cube based on user’s choice.