This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class atm { | |
private int balance; | |
public int getbalance(){ | |
return balance; | |
} | |
public void setbalance(int balance){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require ('express'); | |
const app = express(); | |
const port = 3000; | |
const mongoose = require('mongoose'); | |
const config = require ('./config/database'); | |
const routeuser = require('./routes/routeuser'); | |
const bodyParser = require('body-parser'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const router = express.Router(); | |
const User = require('../models/user'); | |
router.post("/register", (req, res) => { | |
const newUser = new User({ | |
name: req.body.name, | |
email: req.body.email, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose'); | |
const schema = mongoose.Schema | |
const userSchema = new schema({ | |
name: { type: String, required: true }, | |
email: { type: String, required: true }, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require ('express'); | |
const app = express(); | |
const port = 3000; | |
app.get("/",function(req,res){ | |
res.end("hello world"); | |
}) | |
app.listen(port,function(){ | |
console.log("server is running port " + port); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -g create-react-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.poly.overloading; | |
public class NewCircle { | |
public void draw(){ | |
System.out.println("circle with default color Black and diameter 1 cm."); | |
} | |
public void draw(int diameter){ | |
System.out.println("circle with default color Black and diameter"+diameter+"cm."); | |
} | |
public void draw(int diameter, String color){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.poly.overriding; | |
public class Square implements Shape { | |
@Override | |
public void draw() { | |
System.out.println("Drawing Square"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.poly.overriding; | |
public class Circle implements Shape{ | |
@Override | |
public void draw(){ | |
System.out.println("Drwaing circle"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.poly.overriding; | |
public interface Shape { | |
public void draw(); | |
} |
NewerOlder