Skip to content

Code-Anamabra-Online/Exam2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Instruction: open a new project in Vscode called Exam2 and implement the folowing code

Functions:

  1. Define a Dart function that takes two parameters (int a, int b) and returns their sum.
  2. Write a function that calculates the factorial of a given number.
  3. Create a function that checks if a number is prime.
  4. Implement a function that converts Celsius to Fahrenheit.
  5. Write a Dart function that takes a string as input and returns the reversed string. Classes:
  6. Create a class named Person with attributes name and age. Implement a method to display the person's information.
  7. Define a class Rectangle with attributes length and width. Implement a method to calculate the area of the rectangle.
  8. Implement a class Circle with a method to calculate the circumference.
  9. Create a class BankAccount with methods to deposit and withdraw money, and to check the account balance. 10 Write a class Student with attributes name, age, and grade. Implement a method to determine if the student passed or failed. Function and Class Interactions:
  10. Define a class Calculator with methods for basic arithmetic operations (add, subtract, multiply, divide).
  11. Implement a class Car with methods to start, stop, and check the fuel level.
  12. Write a Dart program that uses a function to find the maximum element in a list of integers.
  13. Create a class Employee with attributes name, salary, and a method to give a bonus.
  14. Combine a function and a class to calculate the area of a triangle given its base and height. More Functions:
  15. Write a Dart program with a function to find the square root of a given number.
  16. Create a function that generates a list of Fibonacci numbers up to a specified limit.
  17. Implement a function to determine if a given year is a leap year.
  18. Define a recursive function to compute the factorial of a number.
  19. Write a function that takes a list of integers and returns a new list with only the even numbers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages