This file contains hidden or 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
#include <iostream> | |
#include <string> | |
using namespace std; | |
class Hewan { | |
protected: | |
string indra; | |
string alatGerak; | |
public: |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
class FahrenheitToCelcius { | |
public: | |
double convert(double f) { | |
return (f - 32.0) * 5 / 9; | |
} | |
float convert(float f) { |
This file contains hidden or 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 Engine { | |
//β¦ | |
private double fuel; | |
private double CV; | |
public Engine(double fuel, double CV) { | |
this.fuel = fuel; | |
this.CV = CV; | |
} | |
This file contains hidden or 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
#include <iostream> | |
#include <memory> | |
#include <vector> | |
class Binatang { | |
public: | |
std::string nama; | |
Binatang(std::string n) : nama(n) {} |
This file contains hidden or 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
#include <iostream> | |
class Shape { | |
protected: | |
double lebar; | |
double tinggi; | |
public: | |
Shape(double l, double t) { | |
lebar = l; | |
tinggi = t; |
This file contains hidden or 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
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
int main() { | |
std::string nama; | |
std::cout << "Masukkan nama = "; | |
std::cin >> nama; | |
// membuat copy dari nama dengan karakter kecil |
This file contains hidden or 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
#include <iostream> | |
class Waktu { | |
private: | |
int jam; | |
int menit; | |
public: | |
Waktu(int j, int m) { | |
jam = j; |
This file contains hidden or 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
#include <fstream> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
bool lanjutkan = true; | |
class Drug { | |
private: | |
string drugID; |
This file contains hidden or 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
// Author: Ari Supriatna | |
// Date: Sun, 26 March 2023 23:38 | |
import java.util.ArrayList; | |
public class Product { | |
private String name = ""; | |
private double price = 0.0; | |
private double shippingCost = 0.0; | |
private int quantity = 0; |
This file contains hidden or 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
import java.util.ArrayList; | |
public class Product { | |
private String name = ""; | |
private double price = 0.0; | |
private double shippingCost = 0.0; | |
private int quantity = 0; | |
public String getName() { | |
return name; |
NewerOlder