Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DataTable:
- def __init__(self):
- print("empty")
- def menuBar(self):
- print("Enter 1 For Insert", end="")
- print("Enter 2 For Search")
- print("Enter 3 For Delete")
- print("Enter 4 For Show")
- print('Enter 5 For Update')
- print("__________________")
- x =input()
- if x == '1':
- self.insertData()
- if x == '2':
- self.searchData()
- if x == '3':
- self.deleteData()
- if x == '4':
- self.showData()
- if x == '5':
- self.updateData()
- else:
- print("invalid menu choice")
- self.menuBar()
- #insertData()
- def insertData(self):
- print("insert")
- self.menuBar()
- def searchData(self):
- print("search data")
- self.menuBar()
- def deleteData(self):
- print("delete")
- self.menuBar()
- def showData(self):
- print("shoe")
- self.menuBar()
- def updateData(self):
- print("update")
- self.menuBar()
- # #include <iostream>
- # #include <cstdio>
- #
- # using namespace std;
- #
- #
- # struct DataTable{
- #
- # char name[30];
- # char type[30];
- #
- # };
- #
- #
- # void insertData(){
- # }
- # void searchData(){
- # }
- # void deleteData(){
- # }
- # void showData(){
- # }
- # void updateData(){
- # }
- #
- #
- # void menuBar(){
- #
- # cout<<" Enter 1 For Insert"<<endl;
- # cout<<" Enter 2 For Search"<<endl;
- # cout<<" Enter 3 For Delete"<<endl;
- # cout<<" Enter 4 For Show"<<endl;
- # cout<<" Enter 5 For Update"<<endl;
- #
- # int n;
- # cin>>n;
- #
- # if(n ==1){
- # insertData();
- # cout<<"Data insert successfully \n";
- # menuBar();
- # }
- #
- #
- # if(n ==2){
- # searchData();
- # cout<<"Data search successfully \n";
- # menuBar();
- # }
- #
- # if(n ==3){
- # deleteData();
- # cout<<"Data delete successfully \n";
- # menuBar();
- # }
- #
- # if(n ==4){
- # showData();
- # cout<<"Data show successfully \n";
- # menuBar();
- # }
- #
- #
- # if(n ==5){
- # updateData();
- # cout<<"Data update successfully \n";
- # menuBar();
- # }
- #
- #
- # }
- #
- #
- # int main()
- # {
- #
- # struct DataTable table[50];
- #
- # cin>>table[0].name;
- # cin>>table[0].type;
- #
- # cout<<table[0].name;
- # cout<<table[0].type;
- #
- # while(true){
- #
- # menuBar();
- #
- # }
- #
- #
- #
- # return 0;
- # }
Add Comment
Please, Sign In to add comment