Write a program that declares a simple structure, declare at least two
variables with different data types and a static method in c#
“Our state of the art algorithm allows you to simply input the width and height of your skyscraper, and using a specially trained machine learning model, it would automatically generate a “star” (*) image of the entire structure. Specifically, the foundation of the building would always be width + 2 stars wide, while the top of the tower contains 1 star if the width is an odd number, or 2 stars if the width is an even number. Are you ready to see how it works?”
) Apart from the base and the top level of the tower, every level starts and ends with a white space(" ").
The first line will contain a message prompt to width of the skyscraper.
The second line will contain a message prompt to height of the skyscraper.
The succeeding lines will contain the skyscraper pattern.
Create a program to Delete and copy a file in C#.
Write a program to act as a digital combination lock safe. Create 3 buttons representing 1, 2 and 3. The user clicks on the buttons trying to guess the correct numbers eg (3321). Use a label to keep track of and display code enrered so far. Only once the correct numbers are pressed, the program congratulates the user with a message.
Challenging Numerical Triangles
by CodeChum Admin
You probably have encountered Triangle pattern problems before when you started learning programming. Let’s see how well you do with numbers this time. Try to look at the examples closely and think of an algorithm that replicates the outputs. Go for it!
The first line will contain a message prompt to width of the skyscraper.
The second line will contain a message prompt to height of the skyscraper.
The succeeding lines will contain the skyscraper pattern.
Programming
a. Create class name Employee
b. add the attributes: firstName, LastName, MiddleName, Age, Company,Salary and
IDNumber
c. create a getters and setter for the class
d. add constructors (with and without parameters)
e. add function in your class name it DisplayInfo to display all details of the employee
f. add a function name it SalWithVat, to calculate the salary with 12% tax deduction.
g. Create main class to test your Class
(FOR C #) A class called Company is to be defined as illustrated in the class diagram. It contains two data members: name (of type string) and salary (of type int); and three member functions: getName(), getSalary (), and getEmployee().
Three instances of Company called s1, s2, and s3 shall then be constructed with their respective data members, as shown in the instance diagrams.
Company
-name:string=”Cube”
-salary:int=470000000
+Company()
+Company(n:string)
+Company(n:string, s:int)
+getName():string
+getSalary():int
+getEmployee():int
S3 - Contractor
-name:string=”Jake”
-salary:int=1800
+ getName()
+ getSalary ()
+ getEmployee()
Objects
S1 - Employee
-name:string=”Mark”
-salary:int=1900
+ getName()
+ getSalary ()
+ getEmployee()
S2 - Manager
-name:string=”Kai”
-salary:int=1700
+ getName()
+ getSalary ()
+ getEmployee()
Write a program with structure Inventory(name, colour, size, cost). Then create 3 objects and write code to print information about Inventory with the highest cost. (FOR C #)
5.1. [15 marks] Write a method with the following details:
5.2. [10 marks] Using the method below, write the code statements to call this method ten times with angle values of 0.500, 0.501, 0.502, 0.503, ... 0.509 and printout the values for the angle, resulting sine and cosine in a tabular format. Use a “for” looping structure.